-fu_LIBADD = @LIBOBJS@ @ALLOCA@
-
-noinst_HEADERS = argmatch.h backupfile.h error.h fnmatch.h fsusage.h \
-getline.h getopt.h group-member.h long-options.h makepath.h modechange.h \
-mountlist.h obstack.h path-concat.h pathmax.h save-cwd.h xstrtol.h xstrtoul.h
-
-BUILT_SOURCES = getdate.c posixtm.c
-
-# 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
+libfu_a_LIBADD = @LIBOBJS@ @ALLOCA@
+libfu_a_DEPENDENCIES = $(libfu_a_LIBADD)
+
+noinst_HEADERS = argmatch.h backupfile.h closeout.h \
+dirname.h error.h exclude.h filemode.h fnmatch.h fsusage.h \
+getdate.h getline.h getopt.h group-member.h human.h lchown.h long-options.h \
+makepath.h modechange.h mountlist.h hash.h path-concat.h pathmax.h \
+posixtm.h quotearg.h regex.h safe-read.h save-cwd.h savedir.h strverscmp.h \
+xalloc.h xstrtol.h xstrtoul.h
+
+BUILT_SOURCES = getdate.c lstat.c stat.c strcasecmp.c strncasecmp.c
+
+EXTRA_DIST = xstat.in strcasecmp.cin
+lstat.c: xstat.in
+ sed -e '/@IGNORE@/d' -e 's/@xstat@/lstat/g' $(srcdir)/xstat.in > $@-t
+ mv $@-t $@
+
+stat.c: xstat.in
+ sed -e '/@IGNORE@/d' -e 's/@xstat@/stat/g' $(srcdir)/xstat.in > $@-t
+ mv $@-t $@
+
+strcasecmp.c: strcasecmp.cin
+ sed \
+ -e '/@IGNORE@/d' \
+ -e 's/@xstrcasecmp@/strcasecmp/g' \
+ -e 's/{{.*}}//g' \
+ $(srcdir)/strcasecmp.cin > $@-t
+ mv $@-t $@
+
+strncasecmp.c: strcasecmp.cin
+ sed \
+ -e '/@IGNORE@/d' \
+ -e 's/@xstrcasecmp@/strncasecmp/g' \
+ -e 's/{{\(.*\)}}/\1/g' \
+ $(srcdir)/strcasecmp.cin > $@-t
+ mv $@-t $@