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