From 1c54930c9d6c93201808b45a2cdcf32bb2b5ee26 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 23 Sep 1996 06:57:05 +0000 Subject: [PATCH] start of --help/--version testing --- ChangeLog | 3 +++ Makefile.in | 44 +++++++++++++++++++++++++++++++++++--------- TODO | 25 ++++++++++++++++++------- automake.in | 2 +- lib/am/scripts.am | 15 +++++++++++++++ m4/Makefile.in | 10 +++++----- scripts.am | 15 +++++++++++++++ tests/Makefile.in | 10 +++++----- 8 files changed, 97 insertions(+), 27 deletions(-) diff --git a/ChangeLog b/ChangeLog index 41a90f54..0a1508e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ Mon Sep 23 00:04:48 1996 Tom Tromey + * automake.in (handle_scripts): Push new target onto @check. + * scripts.am (check-@DIR@SCRIPTS): New target. + * automake.in (initialize_global_constants): Define %dist, dist_header, dist_trailer. (handle_dist): Make dist-all target. diff --git a/Makefile.in b/Makefile.in index a4a14743..39f2f36d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -89,10 +89,10 @@ texinfo.tex version.texi ylwrap PACKAGE = @PACKAGE@ VERSION = @VERSION@ -DISTFILES = $(DIST_COMMON) $(SOURCES) $(BUILT_SOURCES) $(HEADERS) \ - $(TEXINFOS) $(INFOS) $(MANS) $(EXTRA_DIST) $(DATA) -DEP_DISTFILES = $(DIST_COMMON) $(SOURCES) $(BUILT_SOURCES) $(HEADERS) \ - $(TEXINFOS) $(INFO_DEPS) $(MANS) $(EXTRA_DIST) $(DATA) +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) \ + $(TEXINFOS) $(INFOS) $(MANS) $(EXTRA_DIST) +DEP_DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) \ + $(TEXINFOS) $(INFO_DEPS) $(MANS) $(EXTRA_DIST) TAR = tar default: all @@ -133,6 +133,20 @@ uninstall-binSCRIPTS: rm -f $(bindir)/`echo $$p|sed '$(transform)'`; \ done +check-binSCRIPTS: + pid=$$$$; list="$(bin_SCRIPTS)"; for p in $$list; do \ + for opt in --help --version; do \ + if test -f $$p; then :; \ + else if test -f $(srcdir)/$$p; then \ + p=$(srcdir)/$$p; \ + else exit 1; fi; fi; \ + if $$p $$opt > .chkout$$pid 2> .chkerr$$pid \ + && test -n "`cat .chkout$$pid`" \ + && test -z "`cat .chkerr$$pid`"; then :; \ + else echo "$$p failed $$opt test" 1>&2; exit 1; fi; \ + done; \ + done; rm -f .chk???$$pid + install-pkgdataSCRIPTS: $(pkgdata_SCRIPTS) $(NORMAL_INSTALL) $(mkinstalldirs) $(pkgdatadir) @@ -150,6 +164,20 @@ uninstall-pkgdataSCRIPTS: rm -f $(pkgdatadir)/`echo $$p|sed '$(transform)'`; \ done +check-pkgdataSCRIPTS: + pid=$$$$; list="$(pkgdata_SCRIPTS)"; for p in $$list; do \ + for opt in --help --version; do \ + if test -f $$p; then :; \ + else if test -f $(srcdir)/$$p; then \ + p=$(srcdir)/$$p; \ + else exit 1; fi; fi; \ + if $$p $$opt > .chkout$$pid 2> .chkerr$$pid \ + && test -n "`cat .chkout$$pid`" \ + && test -z "`cat .chkerr$$pid`"; then :; \ + else echo "$$p failed $$opt test" 1>&2; exit 1; fi; \ + done; \ + done; rm -f .chk???$$pid + version.texi: stamp-vti stamp-vti: automake.texi $(top_srcdir)/configure.in @@ -265,9 +293,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(CONFIG_HEADER) \ tags=; \ here=`pwd`; \ for subdir in $(SUBDIRS); do \ - test -f $$subdir/TAGS && { \ - tags="$$tags -i $$here/$$subdir/TAGS"; \ - } \ + test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ done; \ test -z "$(ETAGS_ARGS)$(CONFIG_HEADER)$(SOURCES)$(HEADERS)$$tags" \ || etags $(ETAGS_ARGS) $$tags $(CONFIG_HEADER) $(SOURCES) $(HEADERS) @@ -339,7 +365,7 @@ info: $(INFO_DEPS) info-recursive dvi: $(DVIS) dvi-recursive -check: check-recursive +check: check-binSCRIPTS check-pkgdataSCRIPTS check-recursive installcheck: installcheck-recursive installcheck-local @@ -378,7 +404,7 @@ clean-generic: distclean-generic: rm -f Makefile $(DISTCLEANFILES) - rm -f config.cache config.log $(CONFIG_HEADER) stamp-h + rm -f config.cache config.log stamp-h test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: diff --git a/TODO b/TODO index 9f716ec6..8d8455d5 100644 --- a/TODO +++ b/TODO @@ -17,7 +17,7 @@ info files, which is currently somewhat broken). Per Bothner says: Per> 1) Being able to build a set of non-source programs -Per> from source porgrams, without necessarily linking them together. +Per> from source programs, without necessarily linking them together. Per> I.e. one should be able to say something like: Per> dummy_SOURCES=foo.c bar.c Per> and automake should realize that it needs to build foo.o and bar.o. @@ -47,12 +47,6 @@ Per> .class files from a list of .java source files. !! should write autoconf-style doc entries for each m4 macro - [ this should really go into autoconf in some automatic way ] -Joel> I know that the following is needed at the end of configure.in: -Joel> [test -z "$CONFIG_HEADERS" || echo timestamp >stamp-h]) -Joel> However, if automake checked that this line is present, it would -Joel> help...this bit me for a while. - Jim's idea: should look for @setfilename and warn if filenames too long * guess split size * allow ".info" to be missing @@ -225,6 +219,10 @@ Multi-language support: * should automatically handle the linking issue (special-case C++) * must get compile rules for various languages; FORTRAN probably most important unimplemented language +This should be integrated in some way with Per's idea. +Eg .f.o rules should be recognized & auto-handled in _SOURCES +That way any random language can be treated with C/C++ on a first-class +basis (maybe) Should 'distclean' "rm -rf .deps"? @@ -354,6 +352,19 @@ use of (eg) EXTRA_PROGRAMS is not very clear right now ================================================================ +Things to do for autoconf: + +* allow random code to be inserted a la the 2nd arg to AC_OUTPUT: +Joel> I know that the following is needed at the end of configure.in: +Joel> [test -z "$CONFIG_HEADERS" || echo timestamp >stamp-h]) +Joel> However, if automake checked that this line is present, it would +Joel> help...this bit me for a while. + +* patch autoreconf to run automake and aclocal (this is done but + not really available) + +================================================================ + Libraries: * Should support standalone library along with subdir library in same diff --git a/automake.in b/automake.in index c434eaa9..e35aff7e 100755 --- a/automake.in +++ b/automake.in @@ -1175,7 +1175,7 @@ sub handle_scripts && &variable_defined ($key . '_SCRIPTS')) { $scripts_installed = 1; - last; + # push (@check, 'check-' . $key . 'SCRIPTS'); } } diff --git a/lib/am/scripts.am b/lib/am/scripts.am index 8a2ec1fa..b4d71de7 100644 --- a/lib/am/scripts.am +++ b/lib/am/scripts.am @@ -33,3 +33,18 @@ uninstall-@DIR@SCRIPTS: list="$(@DIR@_SCRIPTS)"; for p in $$list; do \ rm -f $(@DIR@dir)/`echo $$p|sed '$(transform)'`; \ done + +## Uncomment line in handle_scripts when this is uncommented. +## check-@DIR@SCRIPTS: +## pid=$$$$; list="$(@DIR@_SCRIPTS)"; for p in $$list; do \ +## for opt in --help --version; do \ +## if test -f $$p; then :; \ +## else if test -f $(srcdir)/$$p; then \ +## p=$(srcdir)/$$p; \ +## else exit 1; fi; fi; \ +## if $$p $$opt > .chkout$$pid 2> .chkerr$$pid \ +## && test -n "`cat .chkout$$pid`" \ +## && test -z "`cat .chkerr$$pid`"; then :; \ +## else echo "$$p failed $$opt test" 1>&2; exit 1; fi; \ +## done; \ +## done; rm -f .chk???$$pid diff --git a/m4/Makefile.in b/m4/Makefile.in index 7383738c..9b9fdbbc 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -57,10 +57,10 @@ DIST_COMMON = Makefile.am Makefile.in PACKAGE = @PACKAGE@ VERSION = @VERSION@ -DISTFILES = $(DIST_COMMON) $(SOURCES) $(BUILT_SOURCES) $(HEADERS) \ - $(TEXINFOS) $(INFOS) $(MANS) $(EXTRA_DIST) $(DATA) -DEP_DISTFILES = $(DIST_COMMON) $(SOURCES) $(BUILT_SOURCES) $(HEADERS) \ - $(TEXINFOS) $(INFO_DEPS) $(MANS) $(EXTRA_DIST) $(DATA) +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) \ + $(TEXINFOS) $(INFOS) $(MANS) $(EXTRA_DIST) +DEP_DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) \ + $(TEXINFOS) $(INFO_DEPS) $(MANS) $(EXTRA_DIST) TAR = tar default: all @@ -135,7 +135,7 @@ clean-generic: distclean-generic: rm -f Makefile $(DISTCLEANFILES) - rm -f config.cache config.log $(CONFIG_HEADER) stamp-h + rm -f config.cache config.log stamp-h test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: diff --git a/scripts.am b/scripts.am index 8a2ec1fa..b4d71de7 100644 --- a/scripts.am +++ b/scripts.am @@ -33,3 +33,18 @@ uninstall-@DIR@SCRIPTS: list="$(@DIR@_SCRIPTS)"; for p in $$list; do \ rm -f $(@DIR@dir)/`echo $$p|sed '$(transform)'`; \ done + +## Uncomment line in handle_scripts when this is uncommented. +## check-@DIR@SCRIPTS: +## pid=$$$$; list="$(@DIR@_SCRIPTS)"; for p in $$list; do \ +## for opt in --help --version; do \ +## if test -f $$p; then :; \ +## else if test -f $(srcdir)/$$p; then \ +## p=$(srcdir)/$$p; \ +## else exit 1; fi; fi; \ +## if $$p $$opt > .chkout$$pid 2> .chkerr$$pid \ +## && test -n "`cat .chkout$$pid`" \ +## && test -z "`cat .chkerr$$pid`"; then :; \ +## else echo "$$p failed $$opt test" 1>&2; exit 1; fi; \ +## done; \ +## done; rm -f .chk???$$pid diff --git a/tests/Makefile.in b/tests/Makefile.in index 1f492bb4..19661fb7 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -64,10 +64,10 @@ DIST_COMMON = ChangeLog Makefile.am Makefile.in PACKAGE = @PACKAGE@ VERSION = @VERSION@ -DISTFILES = $(DIST_COMMON) $(SOURCES) $(BUILT_SOURCES) $(HEADERS) \ - $(TEXINFOS) $(INFOS) $(MANS) $(EXTRA_DIST) $(DATA) -DEP_DISTFILES = $(DIST_COMMON) $(SOURCES) $(BUILT_SOURCES) $(HEADERS) \ - $(TEXINFOS) $(INFO_DEPS) $(MANS) $(EXTRA_DIST) $(DATA) +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) \ + $(TEXINFOS) $(INFOS) $(MANS) $(EXTRA_DIST) +DEP_DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) \ + $(TEXINFOS) $(INFO_DEPS) $(MANS) $(EXTRA_DIST) TAR = tar default: all @@ -146,7 +146,7 @@ clean-generic: distclean-generic: rm -f Makefile $(DISTCLEANFILES) - rm -f config.cache config.log $(CONFIG_HEADER) stamp-h + rm -f config.cache config.log stamp-h test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: -- 2.43.5