Makefile revision 1.2
1# $NetBSD: Makefile,v 1.2 2016/01/14 02:30:18 christos 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 18.include <bsd.prog.mk> 19 20majorminor.cpp: ${GROFF_DIST}/VERSION ${GROFF_DIST}/REVISION 21 ${_MKTARGET_CREATE} 22 (\ 23 maj=`${TOOL_SED} -e 's/^\([^.]*\)\..*$$/\1/' \ 24 ${GROFF_DIST}/VERSION` ;\ 25 min=`${TOOL_SED} -e 's/^[^.]*\.\([0-9]*\).*$$/\1/' \ 26 ${GROFF_DIST}/VERSION` ;\ 27 r=`cat ${GROFF_DIST}/REVISION` ;\ 28 echo 'const char *major_version = "'$$maj'";' ;\ 29 echo 'const char *minor_version = "'$$min'";' ;\ 30 echo 'const char *revision = "'$$r'";' ;\ 31 ) > ${.TARGET} 32