-fu_SOURCES = getdate.c posixtm.c argmatch.c backupfile.c basename.c \
-dirname.c error.c fileblocks.c filemode.c \
-full-write.c getopt.c getopt1.c getversion.c group-member.c idcache.c \
-isdir.c long-options.c makepath.c modechange.c obstack.c \
-safe-read.c save-cwd.c savedir.c stripslash.c userspec.c xgetcwd.c \
-xmalloc.c xstrdup.c xstrtol.c xstrtoul.c yesno.c
+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 getpagesize.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 same.h save-cwd.h \
+savedir.h strverscmp.h \
+version-etc.h xalloc.h xstrtol.h
+
+BUILT_SOURCES = getdate.c lstat.c stat.c
+
+EXTRA_DIST = xstat.in
+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 $@