.
[gnulib.git] / lib / Makefile.in
index 55a95ad..8efdba4 100644 (file)
@@ -40,16 +40,12 @@ transform = @program_transform_name@
 
 noinst_LIBRARIES = fu
 
-EXTRA_DIST = basename.c euidaccess.c \
-getdate.y group-member.c memcpy.c memset.c \
-mkdir.c posixtm.y \
-rename.c rmdir.c rpmatch.c \
-stpcpy.c strcasecmp.c strdup.c strndup.c strstr.c strtol.c strtoul.c
+EXTRA_DIST = group-member.c
 
 INCLUDES = -I.. -I$(srcdir)
 INCLUDES = -I.. -I$(srcdir) -I../intl
 
-fu_SOURCES = getdate.c getopt.c getopt1.c posixtm.c \
+fu_SOURCES = getdate.y posixtm.y getopt.c getopt1.c \
 argmatch.c backupfile.c dirname.c filemode.c \
 full-write.c getversion.c idcache.c \
 isdir.c long-options.c makepath.c modechange.c path-concat.c \
@@ -76,7 +72,7 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I..
 CPPFLAGS = @CPPFLAGS@
 LDFLAGS = @LDFLAGS@
 LIBS = @LIBS@
-fu_OBJECTS =  getdate.o getopt.o getopt1.o posixtm.o argmatch.o \
+fu_OBJECTS =  getdate.o posixtm.o getopt.o getopt1.o argmatch.o \
 backupfile.o dirname.o filemode.o full-write.o getversion.o idcache.o \
 isdir.o long-options.o makepath.o modechange.o path-concat.o \
 safe-read.o save-cwd.o savedir.o stripslash.o userspec.o xgetcwd.o \
@@ -86,15 +82,21 @@ LIBFILES  =  $(pkglib_LIBFILES) $(noinst_LIBFILES) $(check_LIBFILES) \
 $(lib_LIBFILES)
 AR = ar
 RANLIB = @RANLIB@
+YACC = @YACC@
+INTERLOCK = ./interlock
+YLWRAP = ./ylwrap
 CC = @CC@
 CFLAGS = @CFLAGS@
 COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
 LINK = $(CC) $(LDFLAGS) -o $@
 HEADERS =  $(noinst_HEADERS)
 
-DIST_COMMON =  Makefile.am Makefile.in alloca.c error.c error.h \
-fileblocks.c fnmatch.c fsusage.c ftruncate.c getline.c mktime.c \
-mountlist.c obstack.c obstack.h regex.c regex.h rx.c rx.h
+DIST_COMMON =  Makefile.am Makefile.in alloca.c basename.c error.c \
+error.h euidaccess.c fileblocks.c fnmatch.c fsusage.c ftruncate.c \
+getdate.c getline.c group_member.c interlock memcmp.c memcpy.c memset.c \
+mkdir.c mktime.c mountlist.c obstack.c obstack.h posixtm.c regex.c \
+regex.h rename.c rmdir.c rpmatch.c rx.c rx.h stpcpy.c strcasecmp.c \
+strdup.c strndup.c strstr.c strtol.c strtoul.c ylwrap
 
 
 PACKAGE = @PACKAGE@
@@ -107,15 +109,20 @@ DEP_DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) \
 
 TAR = tar
 DEP_FILES =  .deps/alloca.P .deps/argmatch.P .deps/backupfile.P \
-.deps/dirname.P .deps/error.P .deps/fileblocks.P .deps/filemode.P \
-.deps/fnmatch.P .deps/fsusage.P .deps/ftruncate.P .deps/full-write.P \
-.deps/getdate.P .deps/getline.P .deps/getopt.P .deps/getopt1.P \
-.deps/getversion.P .deps/idcache.P .deps/isdir.P .deps/long-options.P \
-.deps/makepath.P .deps/mktime.P .deps/modechange.P .deps/mountlist.P \
-.deps/obstack.P .deps/path-concat.P .deps/posixtm.P .deps/regex.P \
-.deps/rx.P .deps/safe-read.P .deps/save-cwd.P .deps/savedir.P \
-.deps/stripslash.P .deps/userspec.P .deps/xgetcwd.P .deps/xmalloc.P \
-.deps/xstrdup.P .deps/xstrtol.P .deps/xstrtoul.P .deps/yesno.P
+.deps/basename.P .deps/dirname.P .deps/error.P .deps/euidaccess.P \
+.deps/fileblocks.P .deps/filemode.P .deps/fnmatch.P .deps/fsusage.P \
+.deps/ftruncate.P .deps/full-write.P .deps/getdate.P .deps/getline.P \
+.deps/getopt.P .deps/getopt1.P .deps/getversion.P .deps/group_member.P \
+.deps/idcache.P .deps/isdir.P .deps/long-options.P .deps/makepath.P \
+.deps/memcmp.P .deps/memcpy.P .deps/memset.P .deps/mkdir.P \
+.deps/mktime.P .deps/modechange.P .deps/mountlist.P .deps/obstack.P \
+.deps/path-concat.P .deps/posixtm.P .deps/regex.P .deps/rename.P \
+.deps/rmdir.P .deps/rpmatch.P .deps/rx.P .deps/safe-read.P \
+.deps/save-cwd.P .deps/savedir.P .deps/stpcpy.P .deps/strcasecmp.P \
+.deps/strdup.P .deps/stripslash.P .deps/strndup.P .deps/strstr.P \
+.deps/strtol.P .deps/strtoul.P .deps/userspec.P .deps/xgetcwd.P \
+.deps/xmalloc.P .deps/xstrdup.P .deps/xstrtol.P .deps/xstrtoul.P \
+.deps/yesno.P
 SOURCES = $(fu_SOURCES)
 OBJECTS = $(fu_OBJECTS)
 
@@ -125,7 +132,7 @@ default: all
 $(srcdir)/Makefile.in: @MAINT@Makefile.am $(top_srcdir)/configure.in
        cd $(top_srcdir) && automake $(subdir)/Makefile
 
-Makefile: $(top_builddir)/config.status $(srcdir)/Makefile.in
+Makefile: $(top_builddir)/config.status $(srcdir)/Makefile.in $(BUILT_SOURCES)
        cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
 
 mostlyclean-noinstLIBRARIES:
@@ -155,6 +162,8 @@ libfu.a: $(fu_OBJECTS) $(fu_DEPENDENCIES)
        rm -f libfu.a
        $(AR) cru libfu.a $(fu_OBJECTS) $(fu_LIBADD)
        $(RANLIB) libfu.a
+.y.c:
+       $(INTERLOCK) =yacclockdir $(YLWRAP) "$(YACC)" y.tab.c $*.c y.tab.h $*.h -- $(YFLAGS) $<
 
 ID: $(HEADERS) $(SOURCES)
        here=`pwd` && cd $(srcdir) && mkid -f$$here/ID $(SOURCES) $(HEADERS)
@@ -186,7 +195,7 @@ distdir: $(DEP_DISTFILES)
 MKDEP = gcc -M $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
 
 -include .deps/.P
-.deps/.P: $(BUILT_SOURCES)
+.deps/.P:
        test -d .deps || mkdir .deps
        echo > $@
 
@@ -273,26 +282,8 @@ installcheck install-exec install-data install uninstall all \
 installdirs mostlyclean-generic distclean-generic clean-generic \
 maintainer-clean-generic clean mostlyclean distclean maintainer-clean
 
-
-# Since this directory contains two parsers, we have to be careful to avoid
-# running two $(YACC)s during parallel makes.  See below.
-getdate.c: @MAINT@getdate.y
-       @echo expect 10 shift/reduce conflicts
-       $(YACC) $(srcdir)/getdate.y
-       mv y.tab.c getdate.c
-
-# Make the rename atomic, in case sed is interrupted and later rerun.
-# 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: @MAINT@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
 .SUFFIXES:
-.SUFFIXES: .c .o
+.SUFFIXES: .c .o .y
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.