From 9ae48df8e8eefbd30407cc1c8c19f912620ed3e0 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 21 Nov 1999 21:35:41 +0000 Subject: [PATCH] Merged from user-dep-gen-branch. --- AUTHORS | 3 + ChangeLog | 317 ++++++++++++++++++++++++++++++++++++++++ HACKING | 3 + Makefile.am | 8 +- Makefile.in | 13 +- NEWS | 3 + THANKS | 3 +- TODO | 6 + automake.in | 395 ++++++++++++++++---------------------------------- automake.texi | 11 +- dejagnu.am | 4 +- depcomp | 284 ++++++++++++++++++++++++++++++++++++ depend.am | 15 +- depend2.am | 63 +++----- dist.am | 2 +- lib/am/Makefile.am | 8 +- lib/am/dejagnu.am | 4 +- lib/am/depend.am | 15 +- lib/am/depend2.am | 63 +++----- lib/am/texinfos.am | 4 +- lib/depcomp | 284 ++++++++++++++++++++++++++++++++++++ lib/missing | 54 ++++++- m4/Makefile.am | 8 +- m4/Makefile.in | 13 +- m4/depend.m4 | 99 +++++++++++++ m4/depout.m4 | 46 ++++++ m4/init.m4 | 43 +++--- m4/lex.m4 | 4 +- m4/missing.m4 | 41 ++++-- missing | 54 ++++++- stamp-vti | 2 +- tests/ChangeLog | 34 +++++ tests/Makefile.am | 1 - tests/Makefile.in | 6 - tests/defs | 7 +- tests/depend2.test | 71 --------- tests/exsource.test | 8 +- tests/mdate3.test | 1 + tests/specflags3.test | 2 +- tests/suffix.test | 2 +- texinfos.am | 4 +- version.texi | 2 +- 42 files changed, 1461 insertions(+), 549 deletions(-) create mode 100755 depcomp create mode 100755 lib/depcomp create mode 100644 m4/depend.m4 create mode 100644 m4/depout.m4 delete mode 100755 tests/depend2.test diff --git a/AUTHORS b/AUTHORS index 49de6bb..591f31a 100644 --- a/AUTHORS +++ b/AUTHORS @@ -5,3 +5,6 @@ Wrote sh version of automake.in. Tom Tromey. Touched all ".am" files. Rewrote automake.in + +Alexandre Oliva. Some of the user-side dependency tracking system. +Some more random hacking. diff --git a/ChangeLog b/ChangeLog index b042309..4aa31e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,208 @@ +1999-11-21 Tom Tromey + + * automake.in (finish_languages): Only generate suffix rule when + not doing dependency tracking. + + * m4/init.m4 (AM_INIT_AUTOMAKE): Use AM_MISSING_INSTALL_SH. + * m4/missing.m4 (AM_MISSING_INSTALL_SH): New macro. + + * depend2.am: Use @SOURCE@, @OBJ@, @LTOBJ@, @OBJOBJ@, and @BASE@. + Always use `-o'. + +1999-11-19 Tom Tromey + + * dist.am: Set `CDPATH=:' to avoid problems. Merged from + Alexandre's change on branch. + +1999-10-02 Alexandre Oliva + + * Makefile.am (maintainer-check): Look for occurrences of ``cd' + without `CDPATH'. + * dejagnu.am: Set CDPATH before cd. + * Makefile.in: Rebuilt. + + * automake.in (handle_single_transform_list): Change `\1' for `$1' + in `s///' replacement. + + * automake.in (handle_dist): Set CDPATH before cd. + * dejagnu.am (check-DEJAGNU): Likewise. + * texinfos.am (install-info-am, dist-info): Likewise. + * m4/init.m4 (AM_INIT_AUTOMAKE): Likewise. + * m4/missing.m4 (AM_MISSING_HAS_RUN): Likewise. + * aclocal.m4, configure, Makefile.in: Rebuilt. + + * AUTHORS: Added myself. + +1999-09-14 Alexandre Oliva + + * m4/missing.m4: Support relative srcdir and ac_aux_dir. + Reported by Tim Wilkinson + * aclocal.m4, configure: Rebuilt. + +1999-08-17 Alexandre Oliva + + * m4/lex.m4 (AM_PROG_LEX): Require AM_MISSING_HAS_RUN and, if no + LEX program is found, use `${am_missing_run}flex'. + +1999-08-16 Alexandre Oliva + + * automake.in (handle_single_transform_list): Replace `$(OBJEXT)' + with `o' in depfile. + + * automake.in (handle_lib_objects_cond): Remove second dot from + dependency file names. + + * depend2.am (OBJEXT@EXT@.obj): Dependency file should be .Po, + regardless of OBJEXT. + + * automake.in (handle_dependencies): Add blank line after depend2. + (handle_dependencies): Start DEP_FILES with `@AMDEP@'. Output + blank line before `include's, not after them. + (scan_one_configure_file): Do not special-case `DEP_' any more. + + * m4/depout.m4 (AM_OUTPUT_DEPENDENCY_COMMANDS): Run for loop only + if AMDEP is empty. + * aclocal.m4, configure: Rebuilt. + + * m4/depend.m4 (AMDEPBACKSLASH): Define. + * depend2.am (@EXT@.o, @EXT@.lo, @EXT@.obj): Use AMDEPBACKSLASH. + + * automake.in (handle_dependencies): Generate `include's for + dependency files after `@AMDEP@'. + + * m4/missing.m4: Use eval, instead of a sub-shell, to test for + --run support in the missing script, since SHELL is not exported. + Reported by job bogan + * aclocal.m4, configure: Rebuilt. + +1999-08-15 Alexandre Oliva + + * aclocal.m4, configure: Rebuilt with itself. + * Makefile.in, m4/Makefile.in, tests/Makefile.in: Likewise. + + * m4/missing.m4 (AM_MISSING_PROG): Remove DIRECTORY argument. + Require AM_MISSING_HAS_RUN. Use am_missing_run, defined by... + (AM_MISSING_HAS_RUN): New macro. + * m4/init.m4: Remove missing_dir from calls to AM_MISSING_PROG. + * automake.texi (Requirements): Likewise. + * version.texi, stamp-vti: Rebuilt. + +1999-07-28 Tom Tromey + + * depcomp: Handle the `hp' mode. + +1999-07-06 Tom Tromey + + * depcomp: Work around HP-UX 10.20 sed bug. + +1999-07-05 Tom Tromey + + * automake.in (handle_dependencies): Generate a separate include + for each dep file. Report from Alexandre Oliva. + * depend.am: Don't include DEP_FILES. + +1999-06-01 Alexandre Oliva + + * depend.am: Add @AMDEP@ before `include', so that dependency + tracking can be disabled. + * depend2.am: Ditto, before all lines related with dependency + tracking. + * m4/depend.m4 (AM_DEP_TRACK): New macro, that documents + --enable/disable-dependency-tracking and sets AMDEP accordingly. + It is implicitly disabled if depcomp is missing. + (AM_DEPENDENCIES): Disable dependency tracking unless it can be + generated by side-effect. + * m4/init.m4 (AM_INIT_AUTOMAKE): Require AM_DEP_TRACK. + * automake.in (handle_dependencies): Add @AMDEP@ before the value + of DEP_FILES. + * m4/depout.m4 (AM_OUTPUT_DEPENDENCY_COMMANDS): Handle DEP_FILES + starting with `#'. + + * depcomp: Support -xM for dependency generation, for Sun CC. + Reported by Alex Hornby + * m4/depend.m4: Extract the list of supported dependency-tracking + mechanisms from the depcomp script and use it to test each one. + * THANKS: Added Alex Hornby. + + * depend2.am: Move $(depcomp) to the line of $(...DEPMODE), so as + to leave $(...COMPILE) in a line by itself. + + * THANKS: Added Miles Bader. + +1999-06-01 Miles Bader + + * m4/depend.m4 (AM_DEPENDENCIES): Add check for `makedepend'. + Fix `dashmstdout' to ignore non-dependency-generating uses of the + -M flag. + * depcomp (makedepend): New dependency-generating method. + +1999-06-01 Alexandre Oliva + + * missing: If given `--run' as first argument, try to run the + given program before falling back to the ``emulated'' behavior. + Add support for `tar'. + * automake.in: Use new `tar' support for `dist'. + * m4/missing.m4 (AM_MISSING_PROG): Instead of checking for the + program, prepend `missing --run' to the given program name. + * m4/init.m4: Remove AMTAR-related stuff. + * NEWS: Updated. + + * m4/depout.m4: Instead of `find'ing Makefiles, just iterate on + CONFIG_FILES. Do not use temporary variable for list of + dependency files, it breaks Cygwin. + +1999-04-27 Alexandre Oliva + + * depcomp (gcc): Imported comments removed from depend2.am, so + that we don't lose them. + + * m4/depout.m4 (AM_OUTPUT_DEPENDENCY_COMMANDS): Avoid sed s/$U// + when not using ansi2knr. + +1999-04-26 Alexandre Oliva + + * m4/depend.m4 (AM_DEPENDENCIES): Test for depcc -E support. + * depcomp (cpp): Extract dependencies from `# nnn "..."' lines. + +1999-04-25 Alexandre Oliva + + * m4/depend.m4 (AM_DEPENDENCIES): Add a definition to conftest.h, + so as not to compile an empty source; some compilers fail on this. + Redirect stderr of depcc to /dev/null. Test for -M with -o, + because some compilers will output the rules to the output file. + * depcomp (dashmstdout): Add --silent before --mode=compile, so + that we don't get libtool output mixed up with make rules. + + * m4/init.m4 (AM_INIT_AUTOMAKE): Require AM_SET_DEPDIR. + * depend2.am: Set tmpdepfile too, to speed up depcomp. Always use + -o for libtool, otherwise it may try to deduce the object name + from the dependency-generation flag. + * depcomp: Assume depdir exists. Preserve depfile on unsuccessful + compilations. + + * libtool.am: Do not emit .c.lo here... + * depend2.am: ... emit .*.lo here, only when using libtool. + * automake.in (get_object_extension): No more @MINUSO@ here. + (handle_single_transform_list): Set $depfile from $object. + (handle_dependencies): Emit depend2.am for all used languages, + regardless of $use_dependencies; the setting of depcomp makes the + difference. + (lang_cxx_finish): Do not emit compilation rules. + (lang_objc_finish): Likewise. + (lang_java_finish): Likewise. + +1999-04-21 Tom Tromey + + * m4/depout.m4 (AM_OUTPUT_DEPENDENCY_COMMANDS): Correctly + interpolate DEPDIR in DEP_FILES expansion. + +1999-04-20 Lee Iverson + + * m4/depend.m4 (AM_DEPENDENCIES): Fix up test for SGI-style + dependency updating. + * m4/depout.m4 (AM_OUTPUT_DEPENDENCY_COMMANDS): Fix sed script to + handle multi-line dependency lists. + 1999-11-12 Tom Tromey Fix for PR automake/14: @@ -577,6 +782,118 @@ * automake.in (handle_tests): support XFAIL_TEST * automake.texi: document it +1999-04-12 Alexandre Oliva + + * End of merge from trunk. + +1999-04-12 Alexandre Oliva + + * automake.in (cmdline_use_dependencies): Reintroduce it. + (--ignore-deps): Set cmdline_use_dependencies again. + (handle_dependencies): If use_dependencies is not set, define + depcomp as empty. + (handle_configure): Pass --ignore-deps to generated Makefile.ins. + (scan_configure): Do not require depcomp when ignoring + dependencies. + (initialize_global_constants): Reintroduce --ignore-deps. + +1999-04-10 Alexandre Oliva + + * depcomp: New file. + * Makefile.am (dist_script_DATA): Added depcomp. + * automake.in (cmdline_use_dependencies, omit_dependencies, + dependency_macros): Removed. + (--ignore-deps): Just ignore. + (handle_single_transform_list, dep_files): Named dependency files + as \$(DEPDIR)/$base.P$obj + (handle_lib_objects_cond): Likewise. + (generate_dependency_code): Do not check for AM_*_DEPENDENCIES. + (scan_one_configure_file): Likewise. + (handle_dependencies): Always enable auto-dep. Define `depcomp'. + Ignore OMIT_DEPENDENCIES. + (handle_configure): Do not pass --ignore-deps. + (scan_configure): Require `depcomp'. + (initialize_global_constants): Make `depcomp' common. Remove + `--ignore-deps' from usage. + (get_object_extension): No more NOTDEPEND in compile nor libtool. + * compile.am: Remove rules for .c.o and .c.obj + * depend.am (distclean-depend): Wipe out $(DEPDIR) + * depend2.am (@FPFX@DEPMODE): Define from config.status. + Use it and depcomp in suffix rules. + * libtool.m4: Likewise. + * m4/ccdepend.m4, m4/cxxdepend.m4: Removed. + * m4/depvars.m4, m4/objcdepend.m4: Likewise. + * m4/Makefile.am (dist_m4data_DATA): Likewise. + * m4/depout.m4 (AM_OUTPUT_DEPENDENCY_COMMANDS): Extract DEPDIR + from the Makefile and subst it in deps. Report creation of deps + files (for now). Replace $U with `_' and the empty string. Write + a comment to each created file. + * m4/depend.m4 (AM_SET_DEPDIR): Select a valid deps dir name. + (AM_DEPENDENCIES): Accept CC, CXX and OBJC. Just determine the + dependency mode and AC_SUBST [$1]DEPMODE. + * m4/init.m4 (AM_INIT_AUTOMAKE): Automatically call + AM_DEPENDENCIES for CC and CXX, if the corresponding AC_PROG + appears in configure.in, before or after AM_INIT_AUTOMAKE. + +1999-04-02 Raja R Harinath + + * depout.m4: Fix sed expression for extracting `dirpart'. + +1999-03-29 Tom Tromey + + * depend2.am (DEP_@FPFX@COMPILE): Use `!=' and not `-ne'. + + * compile.am (.c.obj): Also disabled when dependency tracking + enabled. + * depend2.am (@EXT@.obj): New target. + * automake.in (get_object_extension): Added explanatory comment. + (generate_dependency_code): Handle $seen_objext. + + * depend.am: Removed obsolete comment. + * depend2.am: Minor formatting fix. + +1999-03-28 Tom Tromey + + * m4/Makefile.am (dist_m4data_DATA): Renamed, and added new + files. + (EXTRA_DIST): Removed. + * automake.in (dependency_macros): New global. + (scan_one_configure_file): Recognize new dependency tracking + macros, and define new resulting configure variables. + (generate_dependency_code): New sub. + (handle_dependencies): Use it. + * depend2.am (DEP_@FPFX@COMPILE): New macro. + (@EXT@.o): Use it. + (@EXT@.lo): Likewise. + * m4/depvars.m4: New file. + * m4/objcdepend.m4: New file. + * m4/cxxdepend.m4: New file. + * m4/init.m4: Moved dependency handling code into depout.m4. + * m4/depout.m4: New file. + * m4/ccdepend.m4: New file. + * m4/depend.m4: New file. + + * depend2.am (@EXT@.o): Renamed to be old-style suffix pattern. + (@EXT@.lo): Likewise. + * m4/init.m4 (AM_INIT_AUTOMAKE): Don't create `.deps/.P'; it is no + longer needed. + + * m4/init.m4 (AM_INIT_AUTOMAKE): Add code to config.status which + will create the required .P files for dependency tracking. + * automake.in (scan_dependency_file): Removed. + (handle_dependencies): Never call scan_dependency_file. + (generate_deps): Removed. + (parse_arguments): Don't recognize --generate-deps, --build-dir, + --srcdir-name, or --include-deps. Do recognize --ignore-deps. + (srcdir_name): Removed. + (build_directory): Removed. + (initialize_global_constants): Changed $USAGE to reflect argument + parsing changes. + (handle_dist_worker): Never run automake in `dist' rule. + (handle_configure): Use --ignore-deps, not --include-deps. + * depend.am (DEPS_MAGIC): Removed. + (DEP_FILES): Unconditionally include. + 1999-03-27 Tom Tromey * automake.in (saw_sources_p): Correctly count header extensions diff --git a/HACKING b/HACKING index 0ac188d..2bd825a 100644 --- a/HACKING +++ b/HACKING @@ -45,6 +45,9 @@ * Never use basename or dirname. Instead use sed +* If you run `cd' within back-quotes, make sure you set `CDPATH=:', + otherwise the directory name may be printed, depending on CDPATH. + * For install and uninstall rules, if a loop is required, it should be silent. Then the body of the loop itself should print each "important" comman it runs. The printed commands should be preceded diff --git a/Makefile.am b/Makefile.am index 4c2dac4..6d192d5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -26,7 +26,7 @@ $(amfiles) ## what we want. So we make them executable by hand. scriptdir = $(pkgdatadir) dist_script_DATA = config.guess config.sub install-sh mdate-sh missing \ -mkinstalldirs elisp-comp ylwrap acinstall compile +mkinstalldirs elisp-comp ylwrap acinstall depcomp compile install-data-hook: @$(POST_INSTALL) @@ -104,6 +104,12 @@ maintainer-check: automake aclocal echo "Found bad split in automake.in" 1>&2; \ exit 1; \ fi +## Look for cd within backquotes without CDPATH=: + @if grep '` *cd ' $(srcdir)/automake.in $(srcdir)/*.am \ + $(srcdir)/m4/*.m4; then \ + echo "Consider setting CDPATH in the lines above" 1>&2; \ + exit 1; \ + fi # Tag before making distribution. Also, don't make a distribution if # checks fail. Also, make sure the NEWS file is up-to-date. diff --git a/Makefile.in b/Makefile.in index 1a515a5..ebd01fb 100644 --- a/Makefile.in +++ b/Makefile.in @@ -90,7 +90,7 @@ $(amfiles) scriptdir = $(pkgdatadir) dist_script_DATA = config.guess config.sub install-sh mdate-sh missing \ -mkinstalldirs elisp-comp ylwrap acinstall compile +mkinstalldirs elisp-comp ylwrap acinstall depcomp compile TAGS_FILES = automake.in aclocal.in $(amfiles) @@ -249,7 +249,7 @@ install-info-am: $(INFO_DEPS) @list='$(INFO_DEPS)'; \ for file in $$list; do \ d=$(srcdir); \ - for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \ + for ifile in `CDPATH=: && cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \ if test -f $$d/$$ifile; then \ echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \ $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \ @@ -287,7 +287,7 @@ dist-info: $(INFO_DEPS) list='$(INFO_DEPS)'; \ for base in $$list; do \ d=$(srcdir); \ - for file in `cd $$d && eval echo $$base*`; do \ + for file in `CDPATH=: && cd $$d && eval echo $$base*`; do \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file; \ @@ -456,7 +456,7 @@ distcheck: dist mkdir $(distdir)/=build mkdir $(distdir)/=inst chmod a-w $(distdir) - dc_install_base=`cd $(distdir)/=inst && pwd` \ + dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \ && cd $(distdir)/=build \ && ../configure --srcdir=.. --prefix=$$dc_install_base \ && $(MAKE) $(AM_MAKEFLAGS) \ @@ -661,6 +661,11 @@ maintainer-check: automake aclocal echo "Found bad split in automake.in" 1>&2; \ exit 1; \ fi + @if grep '` *cd ' $(srcdir)/automake.in $(srcdir)/*.am \ + $(srcdir)/m4/*.m4; then \ + echo "Consider setting CDPATH in the lines above" 1>&2; \ + exit 1; \ + fi # Tag before making distribution. Also, don't make a distribution if # checks fail. Also, make sure the NEWS file is up-to-date. diff --git a/NEWS b/NEWS index ef17825..2bb626c 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ +New in 1.4a-dep: +* Faster AM_INIT_AUTOMAKE (requires update of `missing' script) +* User-side dependency tracking. Developers no longer need GNU make New in 1.4a: * Many files (but not all) are correctly handled if they appear in subdirs For instance, a _DATA file can appear in a subdir diff --git a/THANKS b/THANKS index cd58546..695cbb1 100644 --- a/THANKS +++ b/THANKS @@ -3,8 +3,8 @@ It would not be what it is today without the invaluable help of these people: Akim Demaille demaille@inf.enst.fr +Alex Hornby alex@anvil.co.uk Alexander V. Lukyanov lav@yars.free.net -Alexandre Oliva oliva@dcc.unicamp.br Andreas Schwab schwab@lamothe.informatik.uni-dortmund.de Andrew Cagney cagney@tpgi.com.au Andris Pavenis pavenis@lanet.lv @@ -76,6 +76,7 @@ Matthias Clasen clasen@mathematik.uni-freiburg.de Matthew D. Langston langston@SLAC.Stanford.EDU Michael Brantley Michael-Brantley@deshaw.com Michel de Ruiter mdruiter@cs.vu.nl +Miles Bader miles@ccs.mt.nec.co.jp Miodrag Vallat miodrag@ifrance.com Motoyuki Kasahara m-kasahr@sra.co.jp NISHIDA Keisuke knishida@nn.iij4u.or.jp diff --git a/TODO b/TODO index 135ede9..250bc67 100644 --- a/TODO +++ b/TODO @@ -5,6 +5,12 @@ * if automake -a, and dangling links exist, automake should remove and reinstall +* add a way to require C++ support even when no apparent C++ code + exists. Likewise for other langs. + +* in depend2.am, in specialization case, what if @SOURCE@ is found + in srcdir? We can't depend on $$output_directory/.dep_segment") - || die "automake: Could not open `$output_directory/.dep_segment': $!\n"; - - &handle_dependencies; - print GDEP $output_rules; - - close(GDEP); - exit $exit_status; -} - # Now do all the work on each file. foreach $am_file (@input_files) { @@ -464,28 +429,6 @@ sub parse_arguments shift (@arglist); $am_dir = $arglist[0]; } - elsif ($arglist[0] =~ /^--build-dir=(.+)$/) - { - # Must end in /. - $build_directory = $1 . '/'; - } - elsif ($arglist[0] eq '--build-dir') - { - &require_argument (@arglist); - shift (@arglist); - # Must end in /. - $build_directory = $arglist[0] . '/'; - } - elsif ($arglist[0] =~ /^--srcdir-name=(.+)$/) - { - $srcdir_name = $1; - } - elsif ($arglist[0] eq '--srcdir-name') - { - &require_argument (@arglist); - shift (@arglist); - $srcdir_name = $arglist[0]; - } elsif ($arglist[0] eq '--gnu') { &set_strictness ('gnu'); @@ -502,13 +445,13 @@ sub parse_arguments { &set_strictness ('foreign'); } - elsif ($arglist[0] eq '--include-deps' || $arglist[0] eq '-i') + elsif ($arglist[0] eq '--include-deps') { - $cmdline_use_dependencies = 0; + $cmdline_use_dependencies = 1; } - elsif ($arglist[0] eq '--generate-deps') + elsif ($arglist[0] eq '--ignore-deps' || $arglist[0] eq '-i') { - $generate_deps = 1; + $cmdline_use_dependencies = 0; } elsif ($arglist[0] eq '--no-force') { @@ -878,10 +821,7 @@ sub get_object_extension if ($seen_libtool && ! $included_libtool_compile) { # Output the libtool compilation rules. - $output_rules .= - &file_contents_with_transform - ($use_dependencies ? 's/^NOTDEPEND.*$//;' : 's/^NOTDEPEND//;', - 'libtool'); + $output_rules .= &file_contents ('libtool'); &push_phony_cleaners ('libtool'); @@ -981,9 +921,20 @@ sub finish_languages { $lang = $extension_map{$ext}; - # Generate the appropriate rules for this extension. + # Generate the appropriate rules for this extension. If + # dependency tracking was requested, and this extension + # supports it, then we don't generate the rule here. local ($comp) = ''; - if (defined $language_map{$lang . '-compile'}) + + if ($use_dependencies && $language_map{$lang . '-autodep'} ne 'no') + { + # Don't generate the rule, but still generate the variables. + if (defined $language_map{$lang . '-compile'}) + { + $comp = $language_map{$lang . '-compile'}; + } + } + elsif (defined $language_map{$lang . '-compile'}) { $comp = $language_map{$lang . '-compile'}; @@ -1399,7 +1350,10 @@ sub handle_single_transform_list # Transform .o or $o file into .P file (for automatic # dependency code). - $dep_files{'.deps/' . $xbase . '.P'} = 1; + local ($depfile) = $object; + $depfile =~ s/\.([^.]*)$/.P$1/; + $depfile =~ s/\$\(OBJEXT\)$/o/ if $seen_objext; + $dep_files{'$(DEPDIR)/' . $depfile} = 1; } } @@ -1616,6 +1570,8 @@ sub handle_lib_objects_cond # means adding entries to dep_files. if ($lsearch =~ /^\@(LT)?LIBOBJS\@$/) { + local ($myobjext) = ($1 ? 'l' : '') . 'o'; + push (@dep_list, $lsearch); $seen_libobjs = 1; if (! keys %libsources) @@ -1638,8 +1594,8 @@ sub handle_lib_objects_cond } elsif ($iter ne 'alloca.c') { - ($rewrite = $iter) =~ s/\.c$/.P/; - $dep_files{'.deps/' . $rewrite} = 1; + ($rewrite = $iter) =~ s/\.c$/.P$myobjext/; + $dep_files{'$(DEPDIR)/' . $rewrite} = 1; ($rewrite = $iter) =~ s/(\W)/\\$1/g; $rewrite = "^" . $rewrite . "\$"; # Only require the file if it is not a built source. @@ -1655,11 +1611,13 @@ sub handle_lib_objects_cond } elsif ($lsearch =~ /^\@(LT)?ALLOCA\@$/) { + local ($myobjext) = ($1 ? 'l' : '') . 'o'; + push (@dep_list, $lsearch); &am_line_error ($var, "\@$1" . "ALLOCA\@ seen but \`AC_FUNC_ALLOCA' not in \`configure.in'") if ! defined $libsources{'alloca.c'}; - $dep_files{'.deps/alloca.P'} = 1; + $dep_files{'$(DEPDIR)/alloca.P' . $myobjext} = 1; &require_file_with_line ($var, $FOREIGN, 'alloca.c'); &saw_extension ('c'); } @@ -2613,42 +2571,6 @@ sub handle_dist_worker . "\tmkdir \$(distdir)\n"); } - # Only run automake in `dist' target if --include-deps and - # `no-dependencies' not specified. That way the recipient of a - # distribution can run "make dist" and not need Automake. You - # might be wondering why we run automake once for each directory - # we distribute, instead of running it once at the top level. The - # answer is that we want to run automake after the dependencies - # have been generated. This occurs when "make" is run in the - # subdir. So automake must be run after make has updated the - # Makefile, which means that it must run once per directory. - if ($use_dependencies) - { - $output_rules .= - ( - # There are several directories we need to know about - # when rebuilding the Makefile.ins. They are: - # here - The absolute path to our topmost build directory. - # top_distdir - The absolute path to the top of our dist - # hierarchy. - # distdir - The path to our sub-part of the dist hierarchy. - # If this directory is the topmost directory, we set - # top_distdir from distdir; that lets us pass in distdir - # from an enclosing package. - "\t" . 'here=`cd $(top_builddir) && pwd`; ' . "\\\n" - . "\t" . 'top_distdir=`cd $(' - . (($relative_dir eq '.') ? 'distdir' : 'top_distdir') - . ') && pwd`; ' . "\\\n" - . "\t" . 'distdir=`cd $(distdir) && pwd`; ' . "\\\n" - . "\tcd \$(top_srcdir) \\\n" - . "\t && \$(AUTOMAKE) --include-deps --build-dir=\$\$here --srcdir-name=\$(top_srcdir) --output-dir=\$\$top_distdir " - # Set strictness of output. - . ($cygnus_mode ? '--cygnus' : ('--' . $strictness_name)) - . ($cmdline_use_dependencies ? '' : ' --include-deps') - . " " . $makefile . "\n" - ); - } - # Scan EXTRA_DIST to see if we need to distribute anything from a # subdir. If so, add it to the list. I didn't want to do this # originally, but there were so many requests that I finally @@ -2913,112 +2835,6 @@ sub handle_dist &handle_dist_worker ($makefile); } -# Scan a single dependency file and rewrite the dependencies as -# appropriate. Essentially this means: -# * Clean out absolute dependencies which are not desirable. -# * Rewrite other dependencies to be relative to $(top_srcdir). -sub scan_dependency_file -{ - local ($depfile) = @_; - - if (! open (DEP_FILE, $depfile)) - { - &am_error ("couldn't open \`$depfile': $!"); - return; - } - print "automake: reading $depfile\n" if $verbose; - - # Sometimes it is necessary to omit some dependencies. - local (%omit) = %omit_dependencies; - if (&variable_defined ('OMIT_DEPENDENCIES')) - { - # FIXME: Doesn't work with conditionals. I'm not sure if this - # matters. - grep ($omit{$_} = 1, - &variable_value_as_list ('OMIT_DEPENDENCIES', '')); - } - - local ($first_line) = 1; - local ($last_line) = 0; - local ($target, @dependencies); - local ($one_dep, $xform); - local ($just_file); - - local ($srcdir_rx, $fixup_rx); - ($fixup_rx = $srcdir_name . '/' . $relative_dir . '/') - =~ s/(\W)/\\$1/g; - ($srcdir_rx = $srcdir_name . '/') =~ s/(\W)/\\$1/g; - - local ($rewrite_builddir) = (($top_builddir eq '.') - ? '' - : $top_builddir . '/'); - - while () - { - last if $last_line; - next if (/$WHITE_PATTERN/o); - chop; - if (! s/\\$//) - { - # No trailing "\" means this should be the last line of - # the first target. We can have multiple targets due to - # the "deleted header file" fix. For the generated - # Makefile we simply skip these fake targets. - $last_line = 1; - } - - if ($first_line) - { - if (! /^([^:]+:)(.+)$/) - { - bad_format: - &am_error ("\`$depfile' has incorrect format"); - close (DEP_FILE); - return; - } - - $_ = $2; - # Make sure to strip the .P file from the target. - ($target = $1) =~ s, *\.deps/[^.]+\.P,,; - - $first_line = 0; - } - - foreach $one_dep (split (' ', $_)) - { - ($just_file = $one_dep) =~ s,^.*/,,; - next if defined $omit{$just_file}; - - if ($one_dep =~ /^$fixup_rx/) - { - # The dependency points to the current directory in - # some way. - ($xform = $one_dep) =~ s/^$fixup_rx//; - push (@dependencies, $xform); - } - elsif ($one_dep =~ /^$srcdir_rx/) - { - # The dependency is in some other directory in the package. - ($xform = $one_dep) =~ s/^$srcdir_rx/$rewrite_builddir/; - push (@dependencies, $xform); - } - elsif ($one_dep =~ /^\// || $one_dep =~ /^[A-Za-z]:\\/) - { - # Absolute path; ignore. - } - else - { - # Anything else is assumed to be correct. - push (@dependencies, $one_dep); - } - } - } - - &pretty_print_rule ($target, "\t", @dependencies); - - close (DEP_FILE); -} - # A subroutine of handle_dependencies. This function includes # `depend2' with appropriate transformations. sub add_depend2 @@ -3028,16 +2844,26 @@ sub add_depend2 # First include code for ordinary objects. local ($key) = $lang . '-autodep'; local ($xform, $ext); - $xform = ('s/\@COMPILE\@/\$(' . $language_map{$key} . 'COMPILE)/g;' - . 's/\@LTCOMPILE\@/\$(LT' . $language_map{$key} . 'COMPILE)/g;' - . 's/\@OBJ\@/%.o/g;' - . 's/\@LTOBJ\@/%.lo/g;'); + + local ($pfx) = $language_map{$key}; + local ($fpfx) = ($pfx eq '') ? 'CC' : $pfx; + $xform = ('s/\@PFX\@/' . $pfx . '/g;' + . 's/\@FPFX\@/' . $fpfx . '/g;' + . ($seen_objext ? 's/^OBJEXT//;' : 's/^OBJEXT.*$//;') + . ($seen_libtool ? 's/^LIBTOOL//;' : 's/^LIBTOOL.*$//;')); + + local ($xform1) = ($xform + . 's/\@BASE\@/\$\*/g;' + . 's/\@SOURCE\@/\$\ $(distdir).bz2' + . '$(AMTAR) chof - $(distdir) | bzip --best -c > $(distdir).bz2' . "\n"); $dist{'dist-tarZ'} = ("\t" - . '$(AMTAR) ch$(AMTARFLAGS)f - $(distdir) | compress -c > $(distdir).tar.Z' + . '$(AMTAR) chof - $(distdir) | compress -c > $(distdir).tar.Z' . "\n"); $dist{'dist-shar'} = ("\t" . 'shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c > $(distdir).shar.gz' @@ -6721,7 +6580,7 @@ sub initialize_global_constants $dist{'dist-zip'} = ("\t" . '-rm -f $(distdir).zip' . "\n" . "\t" . 'zip -rq $(distdir).zip $(distdir)' . "\n"); $dist{'dist'} = ("\t" - . '$(AMTAR) ch$(AMTARFLAGS)f - $(distdir) | GZIP=$(GZIP_ENV) gzip -c > $(distdir).tar.gz' + . '$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c > $(distdir).tar.gz' . "\n"); $dist_trailer = "\t" . '-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)' . "\n"; } diff --git a/automake.texi b/automake.texi index 0af48b2..399ec9f 100644 --- a/automake.texi +++ b/automake.texi @@ -966,12 +966,11 @@ Use @code{AM_MISSING_PROG} to see whether the programs @code{aclocal}, @code{autoconf}, @code{automake}, @code{autoheader}, and @code{makeinfo} are in the build environment. Here is how this is done: @example -missing_dir=`cd $ac_aux_dir && pwd` -AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) -AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) -AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) -AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) -AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) +AM_MISSING_PROG(ACLOCAL, aclocal) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) @end example @end itemize diff --git a/dejagnu.am b/dejagnu.am index fbe0943..f199ebe 100644 --- a/dejagnu.am +++ b/dejagnu.am @@ -27,12 +27,12 @@ RUNTESTDEFAULTFLAGS = --tool $(DEJATOOL) --srcdir $$srcdir check-DEJAGNU: site.exp ## Life is easiest with an absolute srcdir, so do that. - srcdir=`cd $(srcdir) && pwd`; export srcdir; \ + srcdir=`CDPATH=: && cd $(srcdir) && pwd`; export srcdir; \ EXPECT=$(EXPECT); export EXPECT; \ ## Allow this to work when expect and DejaGNU are in tree. ## Only required when --cygnus in force. CYGNUS if [ -f $(top_builddir)/../expect/expect ]; then \ -CYGNUS TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \ +CYGNUS TCL_LIBRARY=`CDPATH=: && cd $(top_srcdir)/../tcl/library && pwd`; \ CYGNUS export TCL_LIBRARY; \ CYGNUS fi; \ runtest=$(RUNTEST); \ diff --git a/depcomp b/depcomp new file mode 100755 index 0000000..eb42e39 --- /dev/null +++ b/depcomp @@ -0,0 +1,284 @@ +#! /bin/sh + +# depcomp - compile a program generating dependencies as side-effects +# Copyright (C) 1999 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# Originally written by Alexandre Oliva . + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +case "$depmode" in +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + if "$@" -Wp,"$gccflag$tmpdepfile"; then : + else + stat=$? + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + sed 's/^[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashmd) + # The Java front end to gcc doesn't run cpp, so we can't use the -Wp + # trick. Instead we must use -M and then rename the resulting .d + # file. This is also the case for older versions of gcc, which + # don't implement -Wp. + if "$@" -MD; then : + else + stat=$? + rm -f FIXME + exit $stat + fi + FIXME: rewrite the file + ;; + +sgi) + if "$@" -MDupdate "$tmpdepfile"; then : + else + stat=$? + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + sed 's/^[^:]*: / /' < "$tmpdepfile" >> "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the proprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + ( IFS=" " + case " $* " in + *" --mode=compile "*) # this is libtool, let us make it quiet + for arg + do # cycle over the arguments + case "$arg" in + "--mode=compile") + # insert --quiet before "--mode=compile" + set fnord "$@" --quiet + shift # fnord + ;; + esac + set fnord "$@" "$arg" + shift # fnord + shift # "$arg" + done + ;; + esac + "$@" -M | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + ) & + proc=$! + "$@" + stat=$? + wait "$proc" + if test "$stat" != 0; then exit $stat; fi + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the proprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + ( IFS=" " + case " $* " in + *" --mode=compile "*) # this is libtool, let us make it quiet + for arg + do # cycle over the arguments + case "$arg" in + "--mode=compile") + # insert --quiet before "--mode=compile" + set fnord "$@" --quiet + shift # fnord + ;; + esac + set fnord "$@" "$arg" + shift # fnord + shift # "$arg" + done + ;; + esac + "$@" -xM | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + ) & + proc=$! + "$@" + stat=$? + wait "$proc" + if test "$stat" != 0; then exit $stat; fi + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +makedepend) + # X makedepend + ( + shift + cleared=no + for arg in "$@"; do + case $cleared in no) + set ""; shift + cleared=yes + esac + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift;; + -*) + ;; + *) + set fnord "$@" "$arg"; shift;; + esac + done + obj_suffix="`echo $object | sed 's/^.*\././'`" + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@" + ) & + proc=$! + "$@" + stat=$? + wait "$proc" + if test "$stat" != 0; then exit $stat; fi + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tail +3 "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the proprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + ( IFS=" " + case " $* " in + *" --mode=compile "*) + for arg + do # cycle over the arguments + case "$arg" in + "--mode=compile") + # insert --quiet before "--mode=compile" + set fnord "$@" --quiet + shift # fnord + ;; + esac + set fnord "$@" "$arg" + shift # fnord + shift # "$arg" + done + ;; + esac + "$@" -E | + sed -n '/^# [0-9][0-9]* "\([^"]*\)"/ s::'"$object"'\: \1:p' > "$tmpdepfile" + ) & + proc=$! + "$@" + stat=$? + wait "$proc" + if test "$stat" != 0; then exit $stat; fi + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed < "$tmpdepfile" -e 's/^[^:]*: //' -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 diff --git a/depend.am b/depend.am index 9717458..881326b 100644 --- a/depend.am +++ b/depend.am @@ -1,5 +1,5 @@ ## automake - create Makefile.in from Makefile.am -## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. +## Copyright (C) 1994, 1995-98, 1999 Free Software Foundation, Inc. ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -16,22 +16,11 @@ ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. -## This fragment is probably only useful for maintainers. It relies -## on GNU make and gcc. It is only included in the generated -## Makefile.in if `automake' is not passed the `--include-deps' flag. - -## We must create the .deps directory if it doesn't exist. We do it -## in this strange way to make sure the .deps directory exists, -## without trying to run mkdir for each compilation. -DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) - --include $(DEP_FILES) - mostlyclean-depend: clean-depend: distclean-depend: - -rm -rf .deps + -rm -rf $(DEPDIR) maintainer-clean-depend: diff --git a/depend2.am b/depend2.am index 7d68dbf..1c3a5d7 100644 --- a/depend2.am +++ b/depend2.am @@ -15,45 +15,26 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. -@OBJ@: @SOURCE@ - @echo '@COMPILE@ -c -o $@ $<'; \ -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). -## - Using -M directly means running the compiler twice (even worse -## than renaming). - @COMPILE@ -Wp,-MD,.deps/$(*D)/$(*F).pp -c -o $@ $< -## This next piece of magic avoids the `deleted header file' problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. - @-cp .deps/$(*D)/$(*F).pp .deps/$(*D)/$(*F).P; \ - tr ' ' '\012' < .deps/$(*D)/$(*F).pp \ -## Some versions of gcc put a space before the `:'. On the theory -## that the space means something, we add a space to the output as -## well. - | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ - >> .deps/$(*D)/$(*F).P; \ - rm .deps/$(*D)/$(*F).pp +## Note that this must all be on one line to avoid a problem with +## automake's `.am' file reader. This is a convenience macro a user +## can use to run a compilation. You should set the shell variables +## `file' and `compile' first. +@AMDEP@@FPFX@DEPMODE = @@FPFX@DEPMODE@ -@LTOBJ@: @SOURCE@ - @echo '@LTCOMPILE@ -c -o $@ $<'; \ -## See above to understand implementation weirdness. - @LTCOMPILE@ -Wp,-MD,.deps/$(*D)/$(*F).pp -c -o $@ $< -## Account for versions of gcc that put a space before the `:'. - @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ - < .deps/$(*D)/$(*F).pp > .deps/$(*D)/$(*F).P; \ -## See above to understand deleted header file trick. - tr ' ' '\012' < .deps/$(*D)/$(*F).pp \ -## Some versions of gcc put a space before the `:'. On the theory -## that the space means something, we add a space to the output as -## well. - | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ - >> .deps/$(*D)/$(*F).P; \ - rm -f .deps/$(*D)/$(*F).pp +@EXT@.o: +@AMDEP@ source='@SOURCE@' object='@OBJ@' @AMDEPBACKSLASH@ +@AMDEP@ depfile='$(DEPDIR)/@BASE@.Po' tmpdepfile='$(DEPDIR)/@BASE@.TPo' @AMDEPBACKSLASH@ +@AMDEP@ $(@FPFX@DEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(@PFX@COMPILE) -c -o @OBJ@ @SOURCE@ + +LIBTOOL@EXT@.lo: +LIBTOOL@AMDEP@ source='@SOURCE@' object='@LTOBJ@' @AMDEPBACKSLASH@ +LIBTOOL@AMDEP@ depfile='$(DEPDIR)/@BASE@.Plo' tmpdepfile='$(DEPDIR)/@BASE@.TPlo' @AMDEPBACKSLASH@ +LIBTOOL@AMDEP@ $(@FPFX@DEPMODE) $(depcomp) @AMDEPBACKSLASH@ +LIBTOOL $(LT@PFX@COMPILE) -c -o @LTOBJ@ @SOURCE@ + +OBJEXT@EXT@.obj: +OBJEXT@AMDEP@ source='@SOURCE@' object='@OBJOBJ@' @AMDEPBACKSLASH@ +OBJEXT@AMDEP@ depfile='$(DEPDIR)/@BASE@.Po' tmpdepfile='$(DEPDIR)/@BASE@.TPo' @AMDEPBACKSLASH@ +OBJEXT@AMDEP@ $(@FPFX@DEPMODE) $(depcomp) @AMDEPBACKSLASH@ +OBJEXT $(@PFX@COMPILE) -c -o @OBJOBJ@ `cygpath -w @SOURCE@` diff --git a/dist.am b/dist.am index 347ac16..5c3f561 100644 --- a/dist.am +++ b/dist.am @@ -30,7 +30,7 @@ distcheck: dist mkdir $(distdir)/=inst ## Undo the write access. chmod a-w $(distdir) - dc_install_base=`cd $(distdir)/=inst && pwd` \ + dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \ DISTHOOK && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \ && cd $(distdir)/=build \ && ../configure --srcdir=.. --prefix=$$dc_install_base \ diff --git a/lib/am/Makefile.am b/lib/am/Makefile.am index 4c2dac4..6d192d5 100644 --- a/lib/am/Makefile.am +++ b/lib/am/Makefile.am @@ -26,7 +26,7 @@ $(amfiles) ## what we want. So we make them executable by hand. scriptdir = $(pkgdatadir) dist_script_DATA = config.guess config.sub install-sh mdate-sh missing \ -mkinstalldirs elisp-comp ylwrap acinstall compile +mkinstalldirs elisp-comp ylwrap acinstall depcomp compile install-data-hook: @$(POST_INSTALL) @@ -104,6 +104,12 @@ maintainer-check: automake aclocal echo "Found bad split in automake.in" 1>&2; \ exit 1; \ fi +## Look for cd within backquotes without CDPATH=: + @if grep '` *cd ' $(srcdir)/automake.in $(srcdir)/*.am \ + $(srcdir)/m4/*.m4; then \ + echo "Consider setting CDPATH in the lines above" 1>&2; \ + exit 1; \ + fi # Tag before making distribution. Also, don't make a distribution if # checks fail. Also, make sure the NEWS file is up-to-date. diff --git a/lib/am/dejagnu.am b/lib/am/dejagnu.am index fbe0943..f199ebe 100644 --- a/lib/am/dejagnu.am +++ b/lib/am/dejagnu.am @@ -27,12 +27,12 @@ RUNTESTDEFAULTFLAGS = --tool $(DEJATOOL) --srcdir $$srcdir check-DEJAGNU: site.exp ## Life is easiest with an absolute srcdir, so do that. - srcdir=`cd $(srcdir) && pwd`; export srcdir; \ + srcdir=`CDPATH=: && cd $(srcdir) && pwd`; export srcdir; \ EXPECT=$(EXPECT); export EXPECT; \ ## Allow this to work when expect and DejaGNU are in tree. ## Only required when --cygnus in force. CYGNUS if [ -f $(top_builddir)/../expect/expect ]; then \ -CYGNUS TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \ +CYGNUS TCL_LIBRARY=`CDPATH=: && cd $(top_srcdir)/../tcl/library && pwd`; \ CYGNUS export TCL_LIBRARY; \ CYGNUS fi; \ runtest=$(RUNTEST); \ diff --git a/lib/am/depend.am b/lib/am/depend.am index 9717458..881326b 100644 --- a/lib/am/depend.am +++ b/lib/am/depend.am @@ -1,5 +1,5 @@ ## automake - create Makefile.in from Makefile.am -## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. +## Copyright (C) 1994, 1995-98, 1999 Free Software Foundation, Inc. ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -16,22 +16,11 @@ ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. -## This fragment is probably only useful for maintainers. It relies -## on GNU make and gcc. It is only included in the generated -## Makefile.in if `automake' is not passed the `--include-deps' flag. - -## We must create the .deps directory if it doesn't exist. We do it -## in this strange way to make sure the .deps directory exists, -## without trying to run mkdir for each compilation. -DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) - --include $(DEP_FILES) - mostlyclean-depend: clean-depend: distclean-depend: - -rm -rf .deps + -rm -rf $(DEPDIR) maintainer-clean-depend: diff --git a/lib/am/depend2.am b/lib/am/depend2.am index 7d68dbf..1c3a5d7 100644 --- a/lib/am/depend2.am +++ b/lib/am/depend2.am @@ -15,45 +15,26 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. -@OBJ@: @SOURCE@ - @echo '@COMPILE@ -c -o $@ $<'; \ -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). -## - Using -M directly means running the compiler twice (even worse -## than renaming). - @COMPILE@ -Wp,-MD,.deps/$(*D)/$(*F).pp -c -o $@ $< -## This next piece of magic avoids the `deleted header file' problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. - @-cp .deps/$(*D)/$(*F).pp .deps/$(*D)/$(*F).P; \ - tr ' ' '\012' < .deps/$(*D)/$(*F).pp \ -## Some versions of gcc put a space before the `:'. On the theory -## that the space means something, we add a space to the output as -## well. - | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ - >> .deps/$(*D)/$(*F).P; \ - rm .deps/$(*D)/$(*F).pp +## Note that this must all be on one line to avoid a problem with +## automake's `.am' file reader. This is a convenience macro a user +## can use to run a compilation. You should set the shell variables +## `file' and `compile' first. +@AMDEP@@FPFX@DEPMODE = @@FPFX@DEPMODE@ -@LTOBJ@: @SOURCE@ - @echo '@LTCOMPILE@ -c -o $@ $<'; \ -## See above to understand implementation weirdness. - @LTCOMPILE@ -Wp,-MD,.deps/$(*D)/$(*F).pp -c -o $@ $< -## Account for versions of gcc that put a space before the `:'. - @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ - < .deps/$(*D)/$(*F).pp > .deps/$(*D)/$(*F).P; \ -## See above to understand deleted header file trick. - tr ' ' '\012' < .deps/$(*D)/$(*F).pp \ -## Some versions of gcc put a space before the `:'. On the theory -## that the space means something, we add a space to the output as -## well. - | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ - >> .deps/$(*D)/$(*F).P; \ - rm -f .deps/$(*D)/$(*F).pp +@EXT@.o: +@AMDEP@ source='@SOURCE@' object='@OBJ@' @AMDEPBACKSLASH@ +@AMDEP@ depfile='$(DEPDIR)/@BASE@.Po' tmpdepfile='$(DEPDIR)/@BASE@.TPo' @AMDEPBACKSLASH@ +@AMDEP@ $(@FPFX@DEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(@PFX@COMPILE) -c -o @OBJ@ @SOURCE@ + +LIBTOOL@EXT@.lo: +LIBTOOL@AMDEP@ source='@SOURCE@' object='@LTOBJ@' @AMDEPBACKSLASH@ +LIBTOOL@AMDEP@ depfile='$(DEPDIR)/@BASE@.Plo' tmpdepfile='$(DEPDIR)/@BASE@.TPlo' @AMDEPBACKSLASH@ +LIBTOOL@AMDEP@ $(@FPFX@DEPMODE) $(depcomp) @AMDEPBACKSLASH@ +LIBTOOL $(LT@PFX@COMPILE) -c -o @LTOBJ@ @SOURCE@ + +OBJEXT@EXT@.obj: +OBJEXT@AMDEP@ source='@SOURCE@' object='@OBJOBJ@' @AMDEPBACKSLASH@ +OBJEXT@AMDEP@ depfile='$(DEPDIR)/@BASE@.Po' tmpdepfile='$(DEPDIR)/@BASE@.TPo' @AMDEPBACKSLASH@ +OBJEXT@AMDEP@ $(@FPFX@DEPMODE) $(depcomp) @AMDEPBACKSLASH@ +OBJEXT $(@PFX@COMPILE) -c -o @OBJOBJ@ `cygpath -w @SOURCE@` diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am index db4c79a..da022d8 100644 --- a/lib/am/texinfos.am +++ b/lib/am/texinfos.am @@ -146,7 +146,7 @@ CYGNUS if test -f $$file; then d=.; else d=$(srcdir); fi; \ NOTCYGNUS d=$(srcdir); \ ## We use these strange circumlocutions because we want the "ifile" to ## be relative, for the install. - for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \ + for ifile in `CDPATH=: && cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \ if test -f $$d/$$ifile; then \ echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \ $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \ @@ -201,7 +201,7 @@ dist-info: $(INFO_DEPS) ## other modes, allow only source dir. NOTCYGNUS d=$(srcdir); \ CYGNUS if test -f $$base; then d=.; else d=$(srcdir); fi; \ - for file in `cd $$d && eval echo $$base*`; do \ + for file in `CDPATH=: && cd $$d && eval echo $$base*`; do \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file; \ diff --git a/lib/depcomp b/lib/depcomp new file mode 100755 index 0000000..eb42e39 --- /dev/null +++ b/lib/depcomp @@ -0,0 +1,284 @@ +#! /bin/sh + +# depcomp - compile a program generating dependencies as side-effects +# Copyright (C) 1999 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# Originally written by Alexandre Oliva . + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +case "$depmode" in +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + if "$@" -Wp,"$gccflag$tmpdepfile"; then : + else + stat=$? + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + sed 's/^[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashmd) + # The Java front end to gcc doesn't run cpp, so we can't use the -Wp + # trick. Instead we must use -M and then rename the resulting .d + # file. This is also the case for older versions of gcc, which + # don't implement -Wp. + if "$@" -MD; then : + else + stat=$? + rm -f FIXME + exit $stat + fi + FIXME: rewrite the file + ;; + +sgi) + if "$@" -MDupdate "$tmpdepfile"; then : + else + stat=$? + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + sed 's/^[^:]*: / /' < "$tmpdepfile" >> "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the proprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + ( IFS=" " + case " $* " in + *" --mode=compile "*) # this is libtool, let us make it quiet + for arg + do # cycle over the arguments + case "$arg" in + "--mode=compile") + # insert --quiet before "--mode=compile" + set fnord "$@" --quiet + shift # fnord + ;; + esac + set fnord "$@" "$arg" + shift # fnord + shift # "$arg" + done + ;; + esac + "$@" -M | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + ) & + proc=$! + "$@" + stat=$? + wait "$proc" + if test "$stat" != 0; then exit $stat; fi + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the proprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + ( IFS=" " + case " $* " in + *" --mode=compile "*) # this is libtool, let us make it quiet + for arg + do # cycle over the arguments + case "$arg" in + "--mode=compile") + # insert --quiet before "--mode=compile" + set fnord "$@" --quiet + shift # fnord + ;; + esac + set fnord "$@" "$arg" + shift # fnord + shift # "$arg" + done + ;; + esac + "$@" -xM | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + ) & + proc=$! + "$@" + stat=$? + wait "$proc" + if test "$stat" != 0; then exit $stat; fi + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +makedepend) + # X makedepend + ( + shift + cleared=no + for arg in "$@"; do + case $cleared in no) + set ""; shift + cleared=yes + esac + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift;; + -*) + ;; + *) + set fnord "$@" "$arg"; shift;; + esac + done + obj_suffix="`echo $object | sed 's/^.*\././'`" + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@" + ) & + proc=$! + "$@" + stat=$? + wait "$proc" + if test "$stat" != 0; then exit $stat; fi + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tail +3 "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the proprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + ( IFS=" " + case " $* " in + *" --mode=compile "*) + for arg + do # cycle over the arguments + case "$arg" in + "--mode=compile") + # insert --quiet before "--mode=compile" + set fnord "$@" --quiet + shift # fnord + ;; + esac + set fnord "$@" "$arg" + shift # fnord + shift # "$arg" + done + ;; + esac + "$@" -E | + sed -n '/^# [0-9][0-9]* "\([^"]*\)"/ s::'"$object"'\: \1:p' > "$tmpdepfile" + ) & + proc=$! + "$@" + stat=$? + wait "$proc" + if test "$stat" != 0; then exit $stat; fi + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed < "$tmpdepfile" -e 's/^[^:]*: //' -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 diff --git a/lib/missing b/lib/missing index 7789652..b965c14 100755 --- a/lib/missing +++ b/lib/missing @@ -1,7 +1,7 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -# Copyright (C) 1996, 1997 Free Software Foundation, Inc. -# Franc,ois Pinard , 1996. +# Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -23,6 +23,19 @@ if test $# -eq 0; then exit 1 fi +run=: + +case "$1" in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. case "$1" in -h|--h|--he|--hel|--help) @@ -35,6 +48,7 @@ error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' @@ -45,11 +59,12 @@ Supported PROGRAM values: flex create \`lex.yy.c', if possible, from existing .c lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing - GNU libit 0.0" + echo "missing 0.2 - GNU automake" ;; -*) @@ -175,6 +190,39 @@ WARNING: \`$1' is missing on your system. You should only need it if touch $file ;; + tar) + shift + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + fi + + # we have already tried tar in the generic part + gnutar ${1+"$@"} && exit 0 + gtar ${1+"$@"} && exit 0 + firstarg="$1" + if shift; then + case "$firstarg" in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" ${1+"$@"} && exit 0 + ;; + esac + case "$firstarg" in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" ${1+"$@"} && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + *) echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your diff --git a/m4/Makefile.am b/m4/Makefile.am index ecdcabe..3f7b750 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -4,9 +4,9 @@ AUTOMAKE_OPTIONS = gnits MAINT_CHARSET = latin1 m4datadir = $(datadir)/aclocal -m4data_DATA = ccstdc.m4 cond.m4 dmalloc.m4 error.m4 gcj.m4 header.m4 \ -init.m4 lex.m4 lispdir.m4 maintainer.m4 minuso.m4 missing.m4 multi.m4 \ -obstack.m4 protos.m4 ptrdiff.m4 regex.m4 sanity.m4 strtod.m4 \ -termios.m4 winsz.m4 +m4data_DATA = ccstdc.m4 cond.m4 depend.m4 depout.m4 dmalloc.m4 \ +error.m4 gcj.m4 header.m4 init.m4 lex.m4 lispdir.m4 maintainer.m4 \ +minuso.m4 missing.m4 multi.m4 obstack.m4 protos.m4 ptrdiff.m4 regex.m4 \ +sanity.m4 strtod.m4 termios.m4 winsz.m4 EXTRA_DIST = $(m4data_DATA) diff --git a/m4/Makefile.in b/m4/Makefile.in index 41f7a36..4ccd58c 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -71,10 +71,10 @@ AUTOMAKE_OPTIONS = gnits MAINT_CHARSET = latin1 m4datadir = $(datadir)/aclocal -m4data_DATA = ccstdc.m4 cond.m4 dmalloc.m4 error.m4 gcj.m4 header.m4 \ -init.m4 lex.m4 lispdir.m4 maintainer.m4 minuso.m4 missing.m4 multi.m4 \ -obstack.m4 protos.m4 ptrdiff.m4 regex.m4 sanity.m4 strtod.m4 \ -termios.m4 winsz.m4 +m4data_DATA = ccstdc.m4 cond.m4 depend.m4 depout.m4 dmalloc.m4 \ +error.m4 gcj.m4 header.m4 init.m4 lex.m4 lispdir.m4 maintainer.m4 \ +minuso.m4 missing.m4 multi.m4 obstack.m4 protos.m4 ptrdiff.m4 regex.m4 \ +sanity.m4 strtod.m4 termios.m4 winsz.m4 EXTRA_DIST = $(m4data_DATA) @@ -124,11 +124,6 @@ TAGS: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) distdir: $(DISTFILES) - here=`cd $(top_builddir) && pwd`; \ - top_distdir=`cd $(top_distdir) && pwd`; \ - distdir=`cd $(distdir) && pwd`; \ - cd $(top_srcdir) \ - && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnits m4/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ diff --git a/m4/depend.m4 b/m4/depend.m4 new file mode 100644 index 0000000..c768e68 --- /dev/null +++ b/m4/depend.m4 @@ -0,0 +1,99 @@ +dnl See how the compiler implements dependency checking. +dnl Usage: +dnl AM_DEPENDENCIES(NAME) +dnl NAME is "CC", "CXX" or "OBJC". + +dnl We try a few techniques and use that to set a single cache variable. + +AC_DEFUN(AM_DEPENDENCIES,[ +AC_REQUIRE([AM_SET_DEPDIR]) +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS]) +ifelse([$1],CC,[ +AC_REQUIRE([AC_PROG_CC]) +AC_REQUIRE([AC_PROG_CPP]) +depcc="$CC" +depcpp="$CPP"],[$1],CXX,[ +AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([AC_PROG_CXXCPP]) +depcc="$CXX" +depcpp="$CXXCPP"],[$1],OBJC,[ +am_cv_OBJC_dependencies_compiler_type=gcc],[ +AC_REQUIRE([AC_PROG_][$1]) +depcc="$[$1]" +depcpp=""]) +AC_MSG_CHECKING([dependency style of $depcc]) +AC_CACHE_VAL(am_cv_[$1]_dependencies_compiler_type,[ +if test -z "$AMDEP"; then + echo '#include "conftest.h"' > conftest.c + echo 'int i;' > conftest.h + + am_cv_[$1]_dependencies_compiler_type=none + for depmode in `sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < "$am_depcomp"`; do + case "$depmode" in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + if depmode="$depmode" \ + source=conftest.c object=conftest.o \ + depfile=conftest.Po tmpdepfile=conftest.TPo \ + $SHELL $am_depcomp $depcc -c conftest.c 2>/dev/null && + grep conftest.h conftest.Po > /dev/null 2>&1; then + am_cv_[$1]_dependencies_compiler_type="$depmode" + break + fi + done + + rm -f conftest.* +else + am_cv_[$1]_dependencies_compiler_type=none +fi +]) +AC_MSG_RESULT($am_cv_[$1]_dependencies_compiler_type) +[$1]DEPMODE="depmode=$am_cv_[$1]_dependencies_compiler_type" +AC_SUBST([$1]DEPMODE) +]) + +dnl Choose a directory name for dependency files. +dnl This macro is AC_REQUIREd in AM_DEPENDENCIES + +AC_DEFUN(AM_SET_DEPDIR,[ +if test -d .deps || mkdir .deps 2> /dev/null || test -d .deps; then + DEPDIR=.deps +else + DEPDIR=_deps +fi +AC_SUBST(DEPDIR) +]) + +AC_DEFUN(AM_DEP_TRACK,[ +AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking Speeds up one-time builds + --enable-dependency-tracking Do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" = xno; then + AMDEP="#" +else + am_depcomp="$ac_aux_dir/depcomp" + if test ! -f "$am_depcomp"; then + AMDEP="#" + else + AMDEP= + fi +fi +AC_SUBST(AMDEP) +if test -z "$AMDEP"; then + AMDEPBACKSLASH='\' +else + AMDEPBACKSLASH= +fi +pushdef([subst], defn([AC_SUBST])) +subst(AMDEPBACKSLASH) +popdef([subst]) +]) diff --git a/m4/depout.m4 b/m4/depout.m4 new file mode 100644 index 0000000..aae9d44 --- /dev/null +++ b/m4/depout.m4 @@ -0,0 +1,46 @@ +dnl Generate code to set up dependency tracking. +dnl This macro should only be invoked once -- use via AC_REQUIRE. +dnl Usage: +dnl AM_OUTPUT_DEPENDENCY_COMMANDS + +dnl +dnl This code is only required when automatic dependency tracking +dnl is enabled. FIXME. This creates each `.P' file that we will +dnl need in order to bootstrap the dependency handling code. +AC_DEFUN(AM_OUTPUT_DEPENDENCY_COMMANDS,[ +AC_OUTPUT_COMMANDS([ +test x"$AMDEP" != x"" || +for mf in $CONFIG_FILES; do + case "$mf" in + Makefile) dirpart=.;; + */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;; + *) continue;; + esac + grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue + # Extract the definition of DEP_FILES from the Makefile without + # running `make'. + DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` + test -z "$DEPDIR" && continue + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n -e '/^U = / s///p' < "$mf"` + test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" + # We invoke sed twice because it is the simplest approach to + # changing $(DEPDIR) to its actual value in the expansion. + for file in `sed -n -e ' + /^DEP_FILES = .*\\\\$/ { + s/^DEP_FILES = // + :loop + s/\\\\$// + p + n + /\\\\$/ b loop + p + } + /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + test -f "$dirpart/$file" && continue + echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done +], [AMDEP="$AMDEP"])]) diff --git a/m4/init.m4 b/m4/init.m4 index 6ce9d65..d8ddaa5 100644 --- a/m4/init.m4 +++ b/m4/init.m4 @@ -16,7 +16,8 @@ AC_SUBST(PACKAGE) VERSION=[$2] AC_SUBST(VERSION) dnl test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then +if test "`CDPATH=: && cd $srcdir && pwd`" != "`pwd`" && + test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi ifelse([$3],, @@ -24,31 +25,21 @@ AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) AC_REQUIRE([AM_SANITY_CHECK]) AC_REQUIRE([AC_ARG_PROGRAM]) -dnl FIXME This is truly gross. -missing_dir=`cd $ac_aux_dir && pwd` -AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) -AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) -AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) -AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) -AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) -dnl Set install_sh for make dist -install_sh="$missing_dir/install-sh" -test -f "$install_sh" || install_sh="$missing_dir/install.sh" -AC_SUBST(install_sh) -dnl We check for tar when the user configures the end package. -dnl This is sad, since we only need this for "dist". However, -dnl there's no other good way to do it. We prefer GNU tar if -dnl we can find it. If we can't find a tar, it doesn't really matter. -AC_CHECK_PROGS(AMTAR, gnutar gtar tar) +AM_MISSING_PROG(ACLOCAL, aclocal) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_MISSING_PROG(AMTAR, tar) +AM_MISSING_INSTALL_SH(install_sh) dnl We need awk for the "check" target. The system "awk" is bad on dnl some platforms. AC_REQUIRE([AC_PROG_AWK]) -AMTARFLAGS= -if test -n "$AMTAR"; then - if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then - dnl We have GNU tar. - AMTARFLAGS=o - fi -fi -AC_SUBST(AMTARFLAGS) -AC_REQUIRE([AC_PROG_MAKE_SET])]) +AC_REQUIRE([AC_PROG_MAKE_SET]) +AC_REQUIRE([AM_DEP_TRACK]) +AC_REQUIRE([AM_SET_DEPDIR]) +ifdef([AC_PROVIDE_AC_PROG_CC], [AM_DEPENDENCIES(CC)], [ + define([AC_PROG_CC], defn([AC_PROG_CC])[AM_DEPENDENCIES(CC)])]) +ifdef([AC_PROVIDE_AC_PROG_CXX], [AM_DEPENDENCIES(CXX)], [ + define([AC_PROG_CXX], defn([AC_PROG_CXX])[AM_DEPENDENCIES(CXX)])]) +]) diff --git a/m4/lex.m4 b/m4/lex.m4 index bb49045..f3c20e5 100644 --- a/m4/lex.m4 +++ b/m4/lex.m4 @@ -4,7 +4,7 @@ dnl AM_PROG_LEX dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT AC_DEFUN(AM_PROG_LEX, -[missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1) -AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex") +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +AC_CHECK_PROGS(LEX, flex lex, [${am_missing_run}flex]) AC_PROG_LEX AC_DECL_YYTEXT]) diff --git a/m4/missing.m4 b/m4/missing.m4 index 39178df..6dcfcaf 100644 --- a/m4/missing.m4 +++ b/m4/missing.m4 @@ -1,18 +1,33 @@ ## --------------------------------------------------------- ## ## Fake the existence of programs that GNU maintainers use. ## ## --------------------------------------------------------- ## -dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) -dnl The program must properly implement --version. -AC_DEFUN(AM_MISSING_PROG, -[AC_MSG_CHECKING(for working $2) -# Run test in a subshell; some versions of sh will print an error if -# an executable is not found, even if stderr is redirected. -# Redirect stdin to placate older versions of autoconf. Sigh. -if ($2 --version) < /dev/null > /dev/null 2>&1; then - $1=$2 - AC_MSG_RESULT(found) -else - $1="$3/missing $2" - AC_MSG_RESULT(missing) +dnl AM_MISSING_PROG(NAME, PROGRAM) +AC_DEFUN(AM_MISSING_PROG, [ +AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + +dnl Like AM_MISSING_PROG, but only looks for install-sh. +dnl AM_MISSING_INSTALL_SH(NAME) +AC_DEFUN(AM_MISSING_INSTALL_SH, [ +AC_REQUIRE([AM_MISSING_HAS_RUN]) +if test -z "$1"; then + $1="${am_missing_run}install-sh" + test -f "$1" || $1="${am_missing_run}install.sh" fi AC_SUBST($1)]) + +dnl AM_MISSING_HAS_RUN. +dnl Define MISSING if not defined so far and test if it supports --run. +dnl If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], [ +test x"${MISSING+set}" = xset || \ + MISSING="\${SHELL} `CDPATH=: && cd $ac_aux_dir && pwd`/missing" +dnl Use eval to expand $SHELL +if eval "$MISSING --run :"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([\`missing' script is too old or missing]) +fi +]) diff --git a/missing b/missing index 7789652..b965c14 100755 --- a/missing +++ b/missing @@ -1,7 +1,7 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -# Copyright (C) 1996, 1997 Free Software Foundation, Inc. -# Franc,ois Pinard , 1996. +# Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -23,6 +23,19 @@ if test $# -eq 0; then exit 1 fi +run=: + +case "$1" in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. case "$1" in -h|--h|--he|--hel|--help) @@ -35,6 +48,7 @@ error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' @@ -45,11 +59,12 @@ Supported PROGRAM values: flex create \`lex.yy.c', if possible, from existing .c lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing - GNU libit 0.0" + echo "missing 0.2 - GNU automake" ;; -*) @@ -175,6 +190,39 @@ WARNING: \`$1' is missing on your system. You should only need it if touch $file ;; + tar) + shift + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + fi + + # we have already tried tar in the generic part + gnutar ${1+"$@"} && exit 0 + gtar ${1+"$@"} && exit 0 + firstarg="$1" + if shift; then + case "$firstarg" in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" ${1+"$@"} && exit 0 + ;; + esac + case "$firstarg" in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" ${1+"$@"} && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + *) echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your diff --git a/stamp-vti b/stamp-vti index 20c10b2..d8c30bd 100644 --- a/stamp-vti +++ b/stamp-vti @@ -1,3 +1,3 @@ -@set UPDATED 12 November 1999 +@set UPDATED 19 November 1999 @set EDITION 1.4a @set VERSION 1.4a diff --git a/tests/ChangeLog b/tests/ChangeLog index e0dec02..2b3677d 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,37 @@ +1999-11-21 Tom Tromey + + * specflags3.test: Updated test for new dependency + implementation. + +1999-10-02 Alexandre Oliva + + * defs: Set CDPATH to avoid verbose cd. + +1999-09-14 Alexandre Oliva + + * defs: Avoid printing the full pathname of testSubDir. + + * exsource.test: Update. + +1999-06-01 Alexandre Oliva + + * exsource.test: sed @AMDEP@ away from `include' line. + + * compile_f_c_cxx.test: depcomp is no longer in the same line. + +1999-04-25 Alexandre Oliva + + * compile_f_c_cxx.test: Look for $(depcomp) for C and C++. + * suffix.test: We no longer emit % rules. + +1999-04-10 Alexandre Oliva + + * defs: Create link or copy of depcomp. + * depend2.test: Removed, no more disted dependencies. + * Makefile.am (TESTS): Likewise. + * exsource.test: Adjust dependency filenames. + * mdate3.test: Adjust for depcomp. + 1999-11-07 Tom Tromey * dash.test: New file. diff --git a/tests/Makefile.am b/tests/Makefile.am index 4324404..eb32a41 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -80,7 +80,6 @@ dejagnu.test \ depacl.test \ depacl2.test \ depend.test \ -depend2.test \ depend3.test \ discover.test \ distdir.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index b435a17..fed66d6 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -147,7 +147,6 @@ dejagnu.test \ depacl.test \ depacl2.test \ depend.test \ -depend2.test \ depend3.test \ discover.test \ distdir.test \ @@ -333,11 +332,6 @@ TAGS: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) distdir: $(DISTFILES) - here=`cd $(top_builddir) && pwd`; \ - top_distdir=`cd $(top_distdir) && pwd`; \ - distdir=`cd $(distdir) && pwd`; \ - cd $(top_srcdir) \ - && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnits tests/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ diff --git a/tests/defs b/tests/defs index e66f96b..ea8c639 100644 --- a/tests/defs +++ b/tests/defs @@ -15,13 +15,13 @@ case "$srcdir" in ;; *) - srcdir="`cd $srcdir && pwd`" + srcdir=`CDPATH=: && cd "$srcdir" && pwd` ;; esac rm -rf testSubDir > /dev/null 2>&1 mkdir testSubDir -cd testSubDir +cd ./testSubDir # Build appropriate environment in test directory. Eg create # configure.in, touch all necessary files, etc. @@ -36,6 +36,9 @@ END : > install-sh : > mkinstalldirs : > missing +ln $srcdir/../depcomp depcomp 2> /dev/null || +ln -s $srcdir/../depcomp depcomp 2> /dev/null || +cp $srcdir/../depcomp depcomp || exit 1 # See how redirections should work. User can set VERBOSE to see all # output. diff --git a/tests/depend2.test b/tests/depend2.test deleted file mode 100755 index 8978165..0000000 --- a/tests/depend2.test +++ /dev/null @@ -1,71 +0,0 @@ -#! /bin/sh - -# Test that automatically generated dependencies are correctly -# rewritten into distribution Makefiles. This test is set up to look -# like a C program was built in a subdir of the distribution. - -. $srcdir/defs || exit 1 - -cat > configure.in << 'END' -PACKAGE=nonesuch -VERSION=nonesuch -AC_ARG_PROGRAM -AC_PROG_MAKE_SET -AC_PROG_INSTALL -AC_PROG_CC -AC_OUTPUT(Makefile src/Makefile) -END - -cat > Makefile.am << 'END' -SUBDIRS = src -END - -mkdir src -cat > src/Makefile.am << 'END' -bin_PROGRAMS = copyin -END - -: > src/copyin.c - -mkdir build -mkdir build/src -mkdir build/src/.deps - -: > build/src/.deps/.P - -cat > build/src/.deps/copyin.P << 'END' -copyin.o: ../../src/copyin.c ../config.h /usr/include/stdio.h \ - /usr/include/features.h /usr/include/sys/cdefs.h /usr/include/libio.h \ - /usr/local/lib/gcc-lib/i586-unknown-linuxaout/cygnus-2.7.1-951112/../../../../i586-unknown-linuxaout/include/_G_config.h \ - /usr/include/sys/types.h /usr/include/linux/types.h \ - /usr/include/asm/types.h /usr/include/sys/stat.h \ - /usr/include/linux/stat.h ../../lib/filetypes.h ../../src/system.h \ - /usr/include/string.h \ - /usr/local/lib/gcc-lib/i586-unknown-linuxaout/cygnus-2.7.1-951112/include/stddef.h \ - /usr/include/time.h /usr/include/stdlib.h /usr/include/errno.h \ - /usr/include/linux/errno.h \ - /usr/local/lib/gcc-lib/i586-unknown-linuxaout/cygnus-2.7.1-951112/include/float.h \ - /usr/include/alloca.h /usr/include/unistd.h /usr/include/posix_opt.h \ - /usr/include/gnu/types.h /usr/include/confname.h \ - /usr/include/sys/sysmacros.h /usr/include/fcntl.h \ - /usr/include/linux/fcntl.h /usr/include/utime.h \ - /usr/include/linux/utime.h /usr/include/dirent.h \ - /usr/include/linux/limits.h /usr/include/linux/dirent.h \ - /usr/include/posix1_lim.h ../../src/cpiohdr.h ../../src/cpio.h \ - ../../src/extern.h \ - /usr/local/lib/gcc-lib/i586-unknown-linuxaout/cygnus-2.7.1-951112/../../../../include/libintl.h \ - /usr/include/locale.h ../../lib/ansidecl.h ../../lib/dstring.h \ - ../../lib/error.h ../../src/defer.h ../../src/rmt.h \ - ../../lib/fnmatch.h -END - -mkdir outdir - -$AUTOMAKE --include-deps --build-dir=`pwd`/build --srcdir-name=../.. \ - --output-dir=`pwd`/outdir src/Makefile || exit 1 - -# The buggy output contains this string. -fgrep '../../lib/filetypes.h' outdir/src/Makefile.in && exit 1 - -# Also make sure that filetypes.h is mentioned at all. -fgrep filetypes.h outdir/src/Makefile.in diff --git a/tests/exsource.test b/tests/exsource.test index 1ebfaef..4a1578f 100755 --- a/tests/exsource.test +++ b/tests/exsource.test @@ -28,10 +28,4 @@ END $AUTOMAKE || exit 1 -# Make sure the Makefile.in can find the .-files it needs. -mkdir .deps -echo > .deps/.P -echo > .deps/xtra.P -echo > .deps/www.P - -$MAKE -s -f Makefile.in SHELL=/bin/sh srcdir=`pwd` magic | grep xtra +grep 'include .*/xtra\.P' Makefile.in diff --git a/tests/mdate3.test b/tests/mdate3.test index 26618cb..8440c5a 100755 --- a/tests/mdate3.test +++ b/tests/mdate3.test @@ -25,6 +25,7 @@ mkdir foo mv install-sh foo mv missing foo mv mkinstalldirs foo +mv depcomp foo $AUTOMAKE || exit 1 diff --git a/tests/specflags3.test b/tests/specflags3.test index 460c3ac..c99aa40 100755 --- a/tests/specflags3.test +++ b/tests/specflags3.test @@ -18,4 +18,4 @@ END $AUTOMAKE || exit 1 -grep 'CC.*-Wp' Makefile.in +grep -e '-o foo-foo' Makefile.in diff --git a/tests/suffix.test b/tests/suffix.test index 3556a39..ee42679 100755 --- a/tests/suffix.test +++ b/tests/suffix.test @@ -17,4 +17,4 @@ $AUTOMAKE -i || exit 1 grep '^\.c\.o' Makefile.in > /dev/null || exit 1 $AUTOMAKE || exit 1 -grep '%\.o: %\.c' Makefile.in > /dev/null || exit 1 +grep '^\.c\.o' Makefile.in > /dev/null || exit 1 diff --git a/texinfos.am b/texinfos.am index db4c79a..da022d8 100644 --- a/texinfos.am +++ b/texinfos.am @@ -146,7 +146,7 @@ CYGNUS if test -f $$file; then d=.; else d=$(srcdir); fi; \ NOTCYGNUS d=$(srcdir); \ ## We use these strange circumlocutions because we want the "ifile" to ## be relative, for the install. - for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \ + for ifile in `CDPATH=: && cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \ if test -f $$d/$$ifile; then \ echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \ $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \ @@ -201,7 +201,7 @@ dist-info: $(INFO_DEPS) ## other modes, allow only source dir. NOTCYGNUS d=$(srcdir); \ CYGNUS if test -f $$base; then d=.; else d=$(srcdir); fi; \ - for file in `cd $$d && eval echo $$base*`; do \ + for file in `CDPATH=: && cd $$d && eval echo $$base*`; do \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file; \ diff --git a/version.texi b/version.texi index 20c10b2..d8c30bd 100644 --- a/version.texi +++ b/version.texi @@ -1,3 +1,3 @@ -@set UPDATED 12 November 1999 +@set UPDATED 19 November 1999 @set EDITION 1.4a @set VERSION 1.4a -- 2.7.4