Makefile revision 1.1
1# $NetBSD: Makefile,v 1.1 2016/01/13 19:01:57 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 6 7.include <bsd.init.mk> 8 9PROG_CXX= troff 10SRCS= dictionary.cpp div.cpp env.cpp input.cpp \ 11 majorminor.cpp mtsm.cpp node.cpp number.cpp reg.cpp 12CLEANFILES= majorminor.cpp ${MAN} 13USETBL= 14 15CWARNFLAGS.clang+= -Wno-format-security 16 17.include <bsd.prog.mk> 18 19majorminor.cpp: ${GROFF_DIST}/VERSION ${GROFF_DIST}/REVISION 20 ${_MKTARGET_CREATE} 21 (\ 22 maj=`${TOOL_SED} -e 's/^\([^.]*\)\..*$$/\1/' \ 23 ${GROFF_DIST}/VERSION` ;\ 24 min=`${TOOL_SED} -e 's/^[^.]*\.\([0-9]*\).*$$/\1/' \ 25 ${GROFF_DIST}/VERSION` ;\ 26 r=`cat ${GROFF_DIST}/REVISION` ;\ 27 echo 'const char *major_version = "'$$maj'";' ;\ 28 echo 'const char *minor_version = "'$$min'";' ;\ 29 echo 'const char *revision = "'$$r'";' ;\ 30 ) > ${.TARGET} 31