From 95d357833e1694fcf61a0c72567b081cb4bb9c05 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 10 Dec 1995 22:45:27 +0000 Subject: [PATCH] Many bug fixes --- ChangeLog | 9 +++++++ Makefile.am | 8 ++++++- Makefile.in | 8 ++++++- TODO | 2 ++ automake.in | 58 +++++++++++++++++++++++----------------------- depend.am | 2 +- lib/am/Makefile.am | 8 ++++++- lib/am/depend.am | 2 +- 8 files changed, 63 insertions(+), 34 deletions(-) diff --git a/ChangeLog b/ChangeLog index d6531f5d..73c5bbeb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ Sun Dec 10 11:59:33 1995 Tom Tromey + * depend.am (DEP_FILES): Bug fix. + + * automake.in (do_one_clean_target): Typo. + + * Makefile.am (check-local): Run syntax check under Perl 4. + + * automake.in: Fixes for Perl 4, from Gord Matzigkeit. + (handle_source_transform): Loop variable is now $_. From Gor + * Makefile.am (check-local): Check for 'true' in source. * texinfos.am (install-info): Can't use "true" in any rule. diff --git a/Makefile.am b/Makefile.am index aad64943..f6ca533e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,13 +23,19 @@ DIST_SUBDIRS = samples/cpio/*Makefile.am ETAGS_ARGS = automake.in --lang=none \ --regex='/^@node[ \t]+\([^,]+\)/\1/' automake.texi -# The simplest form of checking. +# Some simple checks: +# * syntax check with perl4 and perl5. +# * make sure the scripts don't use 'true' +# These are only really guaranteed to work on my machine. check-local: automake @PERL@ -c -w automake if grep '^[^#].*true' *.am; then :; else \ echo "can't use 'true' in GNU Makefile" 1>&2; \ exit 1; \ fi + if test -f /usr/local/bin/perl4.036; then \ + /usr/local/bin/perl4.036 -c -w automake; \ + else :; fi automake: automake.in CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status diff --git a/Makefile.in b/Makefile.in index a81f03f8..761f529a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -290,13 +290,19 @@ maintainer-clean: distclean maintainer-clean-binSCRIPTS maintainer-clean-vti mai # CONFIG_HEADER = config.h # Gross. # The following requires a fixed version of the Emacs 19.30 etags. -# The simplest form of checking. +# Some simple checks: +# * syntax check with perl4 and perl5. +# * make sure the scripts don't use 'true' +# These are only really guaranteed to work on my machine. check-local: automake @PERL@ -c -w automake if grep '^[^#].*true' *.am; then :; else \ echo "can't use 'true' in GNU Makefile" 1>&2; \ exit 1; \ fi + if test -f /usr/local/bin/perl4.036; then \ + /usr/local/bin/perl4.036 -c -w automake; \ + else :; fi automake: automake.in CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status diff --git a/TODO b/TODO index 3a5dae2e..2a0b6373 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,8 @@ Top priorities: * Fix up how 'clean' interacts with new naming scheme. +uninstall and pkg-dirs should rm -rf the dir. + Clean up the output: * Order rules sensibly * Ensure every line has a purpose. Omit unused stuff diff --git a/automake.in b/automake.in index 22055fe1..996c28e6 100755 --- a/automake.in +++ b/automake.in @@ -200,7 +200,7 @@ sub generate_makefile $relative_dir = &dirname ($makefile); # FIXME with new 'dist' target, don't need Makefile.in. Probably # should remove it here. - push_dist_common ('Makefile.in', 'Makefile.am'); + &push_dist_common ('Makefile.in', 'Makefile.am'); push (@sources, '$(SOURCES)') if (defined $contents{'SOURCES'}); push (@objects, '$(OBJECTS)') if (defined $contents{'OBJECTS'}); @@ -321,13 +321,13 @@ sub handle_source_transform # Ugh: Perl syntax vs Emacs. local ($krc1, $krc2) = ('\.\$\{kr\}c', '\.\$\(kr\)c'); local (@result) = (); - foreach $one_source (@files) + foreach (@files) { if (/^(.*)\.[yl]$/) { # Automatically include generated .c file in # distribution. - push_dist_common ($1 . '.c'); + &push_dist_common ($1 . '.c'); } # Transform source files into .o files. @@ -483,7 +483,7 @@ sub handle_texinfo { # Got a hit. push (@texis, 'version.texi'); - push_dist_common ('version.texi', 'stamp-vti'); + &push_dist_common ('version.texi', 'stamp-vti'); push (@clean, 'vti'); local ($tfile); @@ -498,7 +498,7 @@ sub handle_texinfo if (defined $contents{$infobase . "_TEXINFOS"}) { push (@texis, "\$" . $infobase . '_TEXINFOS'); - push_dist_common ("\$" . $infobase . '_TEXINFOS'); + &push_dist_common ("\$" . $infobase . '_TEXINFOS'); } if ($#texis >= 0) @@ -640,7 +640,7 @@ sub handle_dist { if (-f ($relative_dir . "/" . $cfile)) { - push_dist_common ($cfile); + &push_dist_common ($cfile); } } @@ -745,7 +745,7 @@ sub handle_configure if (-f 'aclocal.m4') { $output_vars .= "ACLOCAL = aclocal.m4\n"; - push_dist_common ('aclocal.m4'); + &push_dist_common ('aclocal.m4'); } $output_rules .= &file_contents ('remake'); @@ -761,20 +761,20 @@ sub handle_configure if (-f 'acconfig.h') { $output_vars .= "ACCONFIG = acconfig.h\n"; - push_dist_common ('acconfig.h'); + &push_dist_common ('acconfig.h'); } if (-f 'config.h.top') { $output_vars .= "CONFIG_TOP = config.h.top\n"; - push_dist_common ('config.h.top'); + &push_dist_common ('config.h.top'); } if (-f 'config.h.bot') { $output_vars .= "CONFIG_BOT = config.h.bot\n"; - push_dist_common ('config.h.bot'); + &push_dist_common ('config.h.bot'); } - push_dist_common ('stamp-h.in', $contents{'CONFIG_HEADER'} . '.in'); + &push_dist_common ('stamp-h.in', $contents{'CONFIG_HEADER'} . '.in'); $output_rules .= &file_contents ('remake-hdr'); } @@ -1001,7 +1001,7 @@ sub do_one_clean_target . "tools to rebuild.\"\n"); } elsif ($name . $target eq 'distclean' - || $name . $tar eq 'maintainer-clean') + || $name . $target eq 'maintainer-clean') { $output_rules .= "\trm -f config.status\n"; } @@ -1013,12 +1013,12 @@ sub do_one_clean_target # Do any extra checking for GNU standards. sub check_gnu_standards { - require_file ($GNU, 'ChangeLog'); + &require_file ($GNU, 'ChangeLog'); if ($relative_dir eq '.') { # In top level (or only) directory. - require_file ($GNU, 'INSTALL', 'NEWS', 'README'); + &require_file ($GNU, 'INSTALL', 'NEWS', 'README'); } } @@ -1137,20 +1137,20 @@ sub initialize_global_constants # corresponding directory should be installed during # 'install-exec' phase. %exec_dir_p = - ('bin' => 1, - 'sbin' => 1, - 'libexec' => 1, - 'data' => 0, - 'sysconf' => 1, - 'localstate' => 1, - 'lib' => 1, - 'info' => 0, - 'man' => 0, - 'include' => 0, - 'oldinclude' => 0, - 'pkgdata' => 0, - 'pkglib' => 1, - 'pkginclude' => 0 + ('bin', 1, + 'sbin', 1, + 'libexec', 1, + 'data', 0, + 'sysconf', 1, + 'localstate', 1, + 'lib', 1, + 'info', 0, + 'man', 0, + 'include', 0, + 'oldinclude', 0, + 'pkgdata', 0, + 'pkglib', 1, + 'pkginclude', 0 ); # Helper text for dealing with man pages. @@ -1409,7 +1409,7 @@ sub require_file if (-f $fullfile) { - push_dist_common ($file); + &push_dist_common ($file); } elsif ($strictness >= $mystrict) { diff --git a/depend.am b/depend.am index c1fdc904..2b89c13b 100644 --- a/depend.am +++ b/depend.am @@ -5,7 +5,7 @@ MKDEP = gcc -MM ## Use ${kr} in case we are doing auto-deANSIfication. -DEP_FILES = $(patsubst %.{kr}o,.deps/%.P,$(OBJECTS)) +DEP_FILES = $(patsubst %.${kr}o,.deps/%.P,$(OBJECTS)) ## We use ".P" as the name of our placeholder because it can't be ## duplicated by any C source file. (Well, there could be ".c", but diff --git a/lib/am/Makefile.am b/lib/am/Makefile.am index aad64943..f6ca533e 100644 --- a/lib/am/Makefile.am +++ b/lib/am/Makefile.am @@ -23,13 +23,19 @@ DIST_SUBDIRS = samples/cpio/*Makefile.am ETAGS_ARGS = automake.in --lang=none \ --regex='/^@node[ \t]+\([^,]+\)/\1/' automake.texi -# The simplest form of checking. +# Some simple checks: +# * syntax check with perl4 and perl5. +# * make sure the scripts don't use 'true' +# These are only really guaranteed to work on my machine. check-local: automake @PERL@ -c -w automake if grep '^[^#].*true' *.am; then :; else \ echo "can't use 'true' in GNU Makefile" 1>&2; \ exit 1; \ fi + if test -f /usr/local/bin/perl4.036; then \ + /usr/local/bin/perl4.036 -c -w automake; \ + else :; fi automake: automake.in CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status diff --git a/lib/am/depend.am b/lib/am/depend.am index c1fdc904..2b89c13b 100644 --- a/lib/am/depend.am +++ b/lib/am/depend.am @@ -5,7 +5,7 @@ MKDEP = gcc -MM ## Use ${kr} in case we are doing auto-deANSIfication. -DEP_FILES = $(patsubst %.{kr}o,.deps/%.P,$(OBJECTS)) +DEP_FILES = $(patsubst %.${kr}o,.deps/%.P,$(OBJECTS)) ## We use ".P" as the name of our placeholder because it can't be ## duplicated by any C source file. (Well, there could be ".c", but -- 2.43.5