diff options
author | Jim Meyering <jim@meyering.net> | 2003-04-04 16:03:50 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-04-04 16:03:50 +0000 |
commit | 22ad36e73c1884c4b6dbb70b66a09b21b389c18a (patch) | |
tree | 54e3e7209f82c061c47bfef1e3c180f6d4f82247 | |
parent | d8981ba19e5ddac98cd806dff61f09d8b33424bb (diff) | |
download | coreutils-22ad36e73c1884c4b6dbb70b66a09b21b389c18a.tar.xz |
Clean up rules for automatically generated sources:
(dircolors.h, wheel-size.h, wheel.h, false.c):
Make each generated file be read-only.
Add each file name to BUILT_SOURCES separately.
(MAINTAINERCLEANFILES): Set to $(BUILT_SOURCES).
-rw-r--r-- | src/Makefile.am | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 4f51e79f3..e5751392a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -155,40 +155,46 @@ localedir.h: Makefile @chmod a-w $@-t cmp $@-t $@ 2>&1 > /dev/null && rm -f $@-t || { rm -f $@; mv $@-t $@; } -MAINTAINERCLEANFILES = dircolors.h \ - wheel.h wheel-size.h - +BUILT_SOURCES += dircolors.h dircolors.h: dcgen dircolors.hin + @rm -f $@ $@-t $(PERL) -w -- $(srcdir)/dcgen $(srcdir)/dircolors.hin > $@-t + @chmod a-w $@-t mv $@-t $@ wheel_size = 5 +BUILT_SOURCES += wheel-size.h wheel-size.h: Makefile.am + @rm -f $@ $@-t echo '#define WHEEL_SIZE $(wheel_size)' > $@-t + @chmod a-w $@-t mv $@-t $@ +BUILT_SOURCES += wheel.h wheel.h: wheel-gen.pl Makefile.am - $(srcdir)/wheel-gen.pl $(wheel_size) \ - > $@-t + @rm -f $@ $@-t + $(srcdir)/wheel-gen.pl $(wheel_size) > $@-t + @chmod a-w $@-t mv $@-t $@ -BUILT_SOURCES += dircolors.h false.c wheel.h wheel-size.h - # false exits nonzero even with --help or --version. # Tell automake to exempt it from that installcheck test. AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = false +BUILT_SOURCES += false.c false.c: true.c - rm -f $@ + @rm -f $@ $@-t sed \ -e s/true/false/g \ -e s/success/failure/g \ -e 's/(EXIT_SUCCESS)/(EXIT_FAILURE)/g' \ $(srcdir)/true.c > $@-t - chmod a-w $@-t + @chmod a-w $@-t mv $@-t $@ +MAINTAINERCLEANFILES = $(BUILT_SOURCES) + all_programs = \ $(bin_PROGRAMS) \ $(bin_SCRIPTS) \ |