b6d4ec1fa8849989e13a83188c88a2281480cb46
[gnulib.git] / lib / Makefile.am
1 noinst_LIBRARIES = fu
2
3 DIST_OTHER = alloca.c euidaccess.c fnmatch.c fsusage.c ftruncate.c \
4 getdate.y memcmp.c memcpy.c memset.c mkdir.c mktime.c mountlist.c \
5 posixtm.y rename.c rmdir.c stpcpy.c strdup.c strstr.c strtol.c strtoul.c
6
7 INCLUDES = -I.. -I$(srcdir)
8
9 fu_SOURCES = getdate.c posixtm.c argmatch.c backupfile.c basename.c \
10 dirname.c error.c fileblocks.c filemode.c \
11 full-write.c getopt.c getopt1.c getversion.c group-member.c idcache.c \
12 isdir.c long-options.c makepath.c modechange.c obstack.c \
13 safe-read.c save-cwd.c savedir.c stripslash.c userspec.c xgetcwd.c \
14 xmalloc.c xstrdup.c xstrtol.c xstrtoul.c yesno.c
15
16 fu_LIBADD = @LIBOBJS@ @ALLOCA@
17
18 HEADERS = argmatch.h backupfile.h error.h fnmatch.h fsusage.h getopt.h \
19 group-member.h long-options.h makepath.h modechange.h mountlist.h \
20 obstack.h pathmax.h save-cwd.h xstrtol.h xstrtoul.h
21
22 CONFIG_HEADER = ../config.h
23 BUILT_SOURCES = getdate.c posixtm.c
24
25 # Since this directory contains two parsers, we have to be careful to avoid
26 # running two $(YACC)s during parallel makes.  See below.
27 getdate.c: getdate.y
28         @echo expect 10 shift/reduce conflicts
29         $(YACC) $(srcdir)/getdate.y
30         mv y.tab.c getdate.c
31
32 # Make the rename atomic, in case sed is interrupted and later rerun.
33 # The artificial dependency on getdate.c keeps the two parsers from being
34 # built in parallel.  Enforcing this little bit of sequentiality lets
35 # everyone (even those without bison) still run mostly parallel builds.
36 posixtm.c: posixtm.y getdate.c
37         $(YACC) $(srcdir)/posixtm.y
38         mv y.tab.c posixtm.tab.c
39         sed -e 's/yy/zz/g' posixtm.tab.c > tposixtm.c
40         mv tposixtm.c posixtm.c
41         rm -f posixtm.tab.c