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.
This commit is contained in:
parent
c0a15f333f
commit
33c198cc5f
@ -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 <bsd.prog.mk>
|
||||
|
||||
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}
|
||||
|
Loading…
Reference in New Issue
Block a user