Makefile revision 1.3
1# $NetBSD: Makefile,v 1.3 2019/10/13 07:28:08 mrg Exp $ 2 3# $FreeBSD: src/gnu/usr.bin/groff/src/roff/troff/Makefile,v 1.4 2003/05/01 13:22:20 ru Exp $ 4 5DIST_SUBDIR= src/roff/troff 6NOLIBDRIVER= 7 8.include <bsd.init.mk> 9 10PROG_CXX= troff 11SRCS= dictionary.cpp div.cpp env.cpp input.cpp \ 12 majorminor.cpp mtsm.cpp node.cpp number.cpp reg.cpp 13CLEANFILES= majorminor.cpp ${MAN} 14USETBL= 15 16CWARNFLAGS.clang+= -Wno-format-security 17 18COPTS.input.cpp+= ${GCC_NO_STRINGOP_OVERFLOW} 19 20.include <bsd.prog.mk> 21 22majorminor.cpp: ${GROFF_DIST}/VERSION ${GROFF_DIST}/REVISION 23 ${_MKTARGET_CREATE} 24 (\ 25 maj=`${TOOL_SED} -e 's/^\([^.]*\)\..*$$/\1/' \ 26 ${GROFF_DIST}/VERSION` ;\ 27 min=`${TOOL_SED} -e 's/^[^.]*\.\([0-9]*\).*$$/\1/' \ 28 ${GROFF_DIST}/VERSION` ;\ 29 r=`cat ${GROFF_DIST}/REVISION` ;\ 30 echo 'const char *major_version = "'$$maj'";' ;\ 31 echo 'const char *minor_version = "'$$min'";' ;\ 32 echo 'const char *revision = "'$$r'";' ;\ 33 ) > ${.TARGET} 34