From 33c198cc5f9ac3bddf0eab1b1547c1f76bfb37af Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Fri, 20 Mar 1998 12:03:53 +0000 Subject: [PATCH] Don't use beforedepend to complicate and break things. Just put generated source files in SRCS. Don't use MANDEPEND to complicate things. Just set MAN1 and put generated man pages in CLEANFILES. Added temporary files to CLEANFILES. Partly fixed a potentially fatal bug involving the yacc header. We generate eqn.cc (even if there is a version of it in the source directory older than eqn.y) and a matching eqn.tab.h, but only use the possibly-non-matching eqn.tab.h in the source directory. This works because Cygnus's yacc happened to generate a y.tab.h identical to the current generated one. The correct version will be used when the wrong version is deleted from the source tree. Kludge to get the header generated early enough. Yacc headers are mishandled everywhere they are renamed (and used). Generate neqn at build time, not at install time. Fixed some style bugs. --- gnu/usr.bin/groff/eqn/Makefile | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/gnu/usr.bin/groff/eqn/Makefile b/gnu/usr.bin/groff/eqn/Makefile index c7773ccd95a..5ea45a1ac30 100644 --- a/gnu/usr.bin/groff/eqn/Makefile +++ b/gnu/usr.bin/groff/eqn/Makefile @@ -1,26 +1,25 @@ -# Makefile for eqn +# $Id$ PROG= eqn -MAN1= eqn.1 neqn.1 -SRCS= main.cc lex.cc box.cc limit.cc list.cc over.cc text.cc\ +SRCS= eqn.cc eqn.tab.h main.cc lex.cc \ + box.cc limit.cc list.cc over.cc text.cc \ script.cc mark.cc other.cc delim.cc sqrt.cc pile.cc special.cc -OBJS= eqn.o -#CFLAGS+= -I. -I${.CURDIR}/../include -LDADD+= ${LIBGROFF} -DPADD+= ${LIBGROFF} +CFLAGS+= -I. +DPADD= ${LIBGROFF} +LDADD= ${LIBGROFF} +MAN1= eqn.1 neqn.1 +CLEANFILES= eqn.cc eqn.tab.h ${MAN1} neqn y.tab.c y.tab.h -MANDEPEND= neqn.1 eqn.1 -CLEANFILES+= eqn.cc eqn.tab.h neqn ${MANDEPEND} +all: neqn -afterinstall: neqn +beforeinstall: neqn ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} neqn \ - ${DESTDIR}${BINDIR} + ${DESTDIR}${BINDIR} -beforedepend: eqn.cc +eqn.tab.h: eqn.cc .include "../Makefile.cfg" .include -neqn: ${DIST_DIR}/neqn.sh - sed -e 's/@g@/${g}/g' ${DIST_DIR}/neqn.sh > neqn - +neqn: ${DIST_DIR}/neqn.sh + sed -e 's/@g@/${g}/g' ${.ALLSRC} > ${.TARGET}