X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2FMakefile.in;h=3377776edcd3020ff3f8d03bcd0ce837d7387e6e;hb=ff9a646b84f2efe592f16cab668ea5538171bc83;hp=d441c4e3c2b579208fd56ffc329457505d041695;hpb=d87c39464604e74f580c7fae835be31a4c125c36;p=gnulib.git diff --git a/lib/Makefile.in b/lib/Makefile.in index d441c4e3c..3377776ed 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -43,7 +43,7 @@ fnmatch.h fsusage.h mountlist.h pathmax.h system.h $(SOURCES) all: libfu.a .c.o: - $(CC) -c $(CFLAGS) $(CPPFLAGS) $(DEFS) -I$(srcdir) $< + $(CC) -c $(DEFS) -I$(srcdir) $(CPPFLAGS) $(CFLAGS) $< install: all @@ -64,24 +64,30 @@ realclean: distclean rm -f TAGS dist: - ln $(DISTFILES) ../`cat ../.fname`/lib + for file in $(DISTFILES); do \ + ln $$file ../`cat ../.fname`/lib \ + || cp -p $$file ../`cat ../.fname`/lib; \ + done libfu.a: $(OBJECTS) rm -f $@ $(AR) cr $@ $(OBJECTS) -$(RANLIB) $@ -# Since this directory contains two parsers, using bison without -y -# is the only way to reliably do a parallel make. +# Since this directory contains two parsers, we have to be careful to avoid +# running two $(YACC)s during parallel makes. See below. getdate.c: getdate.y @echo expect 9 shift/reduce conflicts - -bison -o getdate.c $(srcdir)/getdate.y || yacc $(srcdir)/getdate.y - test ! -f y.tab.c || mv y.tab.c getdate.c + $(YACC) $(srcdir)/getdate.y + mv y.tab.c getdate.c # Make the rename atomic, in case sed is interrupted and later rerun. -posixtm.c: posixtm.y - -bison -o posixtm.tab.c $(srcdir)/posixtm.y || yacc $(srcdir)/posixtm.y - test ! -f y.tab.c || mv y.tab.c posixtm.tab.c +# The artificial dependency on getdate.c keeps the two parsers from being +# built in parallel. Enforcing this little bit of sequentiality lets +# everyone (even those without bison) still run mostly parallel builds. +posixtm.c: posixtm.y getdate.c + $(YACC) $(srcdir)/posixtm.y + mv y.tab.c posixtm.tab.c sed -e 's/yy/zz/g' posixtm.tab.c > tposixtm.c mv tposixtm.c posixtm.c rm -f posixtm.tab.c