Tom Tromey. Touched all ".am" files.
Rewrote automake.in
+
+Alexandre Oliva. Some of the user-side dependency tracking system.
+Some more random hacking.
+1999-11-21 Tom Tromey <tromey@cygnus.com>
+
+ * 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 <tromey@cygnus.com>
+
+ * dist.am: Set `CDPATH=:' to avoid problems. Merged from
+ Alexandre's change on branch.
+
+1999-10-02 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
+
+ * 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 <oliva@lsd.ic.unicamp.br>
+
+ * m4/missing.m4: Support relative srcdir and ac_aux_dir.
+ Reported by Tim Wilkinson <tim@transvirtual.com>
+ * aclocal.m4, configure: Rebuilt.
+
+1999-08-17 Alexandre Oliva <oliva@dcc.unicamp.br>
+
+ * 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 <oliva@dcc.unicamp.br>
+
+ * 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 <job@piquin.uchicago.edu>
+ * aclocal.m4, configure: Rebuilt.
+
+1999-08-15 Alexandre Oliva <oliva@dcc.unicamp.br>
+
+ * 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 <tromey@cygnus.com>
+
+ * depcomp: Handle the `hp' mode.
+
+1999-07-06 Tom Tromey <tromey@cygnus.com>
+
+ * depcomp: Work around HP-UX 10.20 sed bug.
+
+1999-07-05 Tom Tromey <tromey@cygnus.com>
+
+ * 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 <oliva@dcc.unicamp.br>
+
+ * 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 <alex@anvil.co.uk>
+ * 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 <miles@ccs.mt.nec.co.jp>
+
+ * 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 <oliva@dcc.unicamp.br>
+
+ * 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 <oliva@dcc.unicamp.br>
+
+ * 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 <oliva@dcc.unicamp.br>
+
+ * m4/depend.m4 (AM_DEPENDENCIES): Test for depcc -E support.
+ * depcomp (cpp): Extract dependencies from `# nnn "..."' lines.
+
+1999-04-25 Alexandre Oliva <oliva@dcc.unicamp.br>
+
+ * 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 <tromey@cygnus.com>
+
+ * m4/depout.m4 (AM_OUTPUT_DEPENDENCY_COMMANDS): Correctly
+ interpolate DEPDIR in DEP_FILES expansion.
+
+1999-04-20 Lee Iverson <leei@Canada.AI.SRI.COM>
+
+ * 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 <tromey@cygnus.com>
Fix for PR automake/14:
* automake.in (handle_tests): support XFAIL_TEST
* automake.texi: document it
+1999-04-12 Alexandre Oliva <oliva@dcc.unicamp.br>
+
+ * End of merge from trunk.
+
+1999-04-12 Alexandre Oliva <oliva@dcc.unicamp.br>
+
+ * 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 <oliva@dcc.unicamp.br>
+
+ * 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 <harinath@cs.umn.edu>
+
+ * depout.m4: Fix sed expression for extracting `dirpart'.
+
+1999-03-29 Tom Tromey <tromey@cygnus.com>
+
+ * 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 <tromey@cygnus.com>
+
+ * 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 <tromey@cygnus.com>
* automake.in (saw_sources_p): Correctly count header extensions
* 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
## 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)
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.
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)
@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; \
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; \
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) \
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.
+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
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
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
* 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 $<! We must search explicitly.
+
* Add a way to say that foo/bar.h should be installed as
$(includedir)/foo/bar.h without introducing a new dir var
# Name of strictness level, as set on command line.
$default_strictness_name = 'gnu';
-# This is TRUE if GNU make specific automatic dependency generation
-# code should be included in generated Makefile.in.
+# This is TRUE if automatic dependency generation code should be
+# included in generated Makefile.in.
$cmdline_use_dependencies = 1;
-# This is the name of a dependency makefile bit (usually for inclusion in a
-# SMakefile or similar); empty if not set.
-$generate_deps = '';
-
# TRUE if in verbose mode.
$verbose = 0;
# Relative location of top build directory.
$top_builddir = '';
-# Absolute location of top build directory.
-$build_directory = '';
-
-# Name of srcdir as given in build directory's Makefile. For
-# dependencies only.
-$srcdir_name = '';
-
# List of Makefile.am's to process, and their corresponding outputs.
@input_files = ();
%output_files = ();
# TRUE if --cygnus seen.
$cygnus_mode = 0;
-# Keys of this hash are names of dependency files to ignore.
-%omit_dependencies = ();
-
# Hash table of AM_CONDITIONAL variables seen in configure.
%configure_cond = ();
die "automake: no \`Makefile.am' found or specified\n"
if ! @input_files;
-# If --generate-deps was given, we don't do anything else
-#
-if ($generate_deps)
-{
- die "automake: Must specify --include-deps (or -i) when generating\n"
- if $use_dependencies;
- die "automake: Must provide --build-dir when generating\n"
- if ! $build_directory;
- die "automake: Must provide --srcdir-name when generating\n"
- if ! $srcdir_name;
-
- open (GDEP, ">$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)
{
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');
{
&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')
{
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');
{
$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'};
# 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;
}
}
# 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)
}
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.
}
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');
}
. "\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
&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 (<DEP_FILE>)
- {
- 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
# 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\@/\$\</g;'
+ . 's/\@(LT|OBJ)?OBJ\@/\$\@/g;');
+
foreach $ext (&lang_extensions ($lang))
{
- $output_rules .= &file_contents_with_transform ('s/\@SOURCE\@/%'
- . $ext . '/g;'
- . $xform,
- 'depend2');
+ $output_rules .= (&file_contents_with_transform ('s/\@EXT\@/'
+ . $ext . '/g;'
+ . $xform1,
+ 'depend2')
+ . "\n");
}
# Now include code for each specially handled object with this
$rule =~ s,([/\$]),\\$1,g;
- $xform = ('s/\@COMPILE\@/' . $rule . '/g;'
- . 's/\@LTCOMPILE\@/\$(LIBTOOL) --mode=compile ' . $rule
- . '/g;'
- . 's/\@OBJ\@/' . $obj . '.o/g;'
- . 's/\@LTOBJ\@/' . $obj . '.lo/g;'
- . 's/\@SOURCE\@/' . $source . '/g;');
- $output_rules .= &file_contents_with_transform ($xform, 'depend2');
+ # Generate a transform which will turn suffix targets in
+ # depend2.am into real targets for the particular objects we
+ # are building.
+ $output_rules .=
+ &file_contents_with_transform ($xform
+ # Generate rule for `.o'.
+ . 's/^\@EXT\@\.o:/'
+ . $obj . '.o: ' . $source
+ . '/g;'
+ # Maybe generate rule for `.lo'.
+ # Might be eliminated by
+ # $XFORM.
+ . 's/^\@EXT\@\.lo:/'
+ . $obj . '.lo: ' . $source
+ . '/g;'
+ # Maybe generate rule for `.obj'.
+ # Might be eliminated by
+ # $XFORM.
+ . 's/^\@EXT\@\.obj:/'
+ . $obj . '.obj: ' . $source
+ . '/g;'
+ # Handle source and obj
+ # transforms.
+ . 's/\@OBJ\@/' . $obj . '.o/g;'
+ . 's/\@OBJOBJ\@/' . $obj . '.obj/g;'
+ . 's/\@LTOBJ\@/' . $obj . '.lo/g;'
+ . 's/\@BASE\@/' . $obj . '/g;'
+ . 's/\@SOURCE\@/' . $source . '/g;',
+ 'depend2');
}
}
# Handle auto-dependency code.
sub handle_dependencies
{
- # Make sure this variable is always marked as used.
- &examine_variable ('OMIT_DEPENDENCIES');
-
if ($use_dependencies)
{
- # Include GNU-make-specific auto-dep code. Don't include it
- # if DEP_FILES would be empty.
+ # Include auto-dep code. Don't include it if DEP_FILES would
+ # be empty.
if (&saw_sources_p (0) && keys %dep_files)
{
- &define_pretty_variable ('DEP_FILES', '', sort keys %dep_files);
- $output_rules .= &file_contents ('depend');
- push (@clean, 'depend');
- &push_phony_cleaners ('depend');
-
- local ($key, $lang, $ext, $xform);
- foreach $key (sort keys %language_map)
+ # Set location of depcomp.
+ if ($config_aux_dir ne '.' && $config_aux_dir ne '')
{
- if ($key =~ /^(.*)-autodep$/
- && $language_map{$key} ne 'no')
- {
- &add_depend2 ($1);
- }
+ &define_variable ('depcomp', ('$(SHELL) ' . $config_aux_dir
+ . '/depcomp'));
}
- }
- }
- elsif ($build_directory ne '')
- {
- # Include any auto-generated deps that are present. Note that
- # $build_directory ends in a "/".
- if (-d ($build_directory . $relative_dir . "/.deps"))
- {
- local ($depfile);
-
- foreach $depfile (&my_glob ($build_directory
- . $relative_dir . "/.deps/*.P"))
+ else
{
- &scan_dependency_file ($depfile);
+ &define_variable ('depcomp',
+ '$(SHELL) $(top_srcdir)/depcomp');
}
+ local ($iter);
+ local (@deplist) = sort keys %dep_files;
+
+ &define_pretty_variable ('DEP_FILES', '', ("\@AMDEP\@", @deplist));
+
+ # Generate each `include' individually. Irix 6 make will
+ # not properly include several files resulting from a
+ # variable expansion; generating many separate includes
+ # seems safest.
$output_rules .= "\n";
+ foreach $iter (@deplist)
+ {
+ $output_rules .= "\@AMDEP\@" . 'include ' . $iter . "\n";
+ }
+
+ $output_rules .= &file_contents ('depend');
+ push (@clean, 'depend');
+ &push_phony_cleaners ('depend');
}
}
+ else
+ {
+ &define_variable ('depcomp', '');
+ }
+
+ local ($key, $lang, $ext, $xform);
+ foreach $key (sort keys %language_map)
+ {
+ next unless $key =~ /^(.*)-autodep$/;
+ next if $language_map{$key} eq 'no';
+ &add_depend2 ($1);
+ }
}
# Handle subdirectories.
. "\n"
. "\tcd \$(top_srcdir) && \$(AUTOMAKE) "
. ($cygnus_mode ? '--cygnus' : ('--' . $strictness_name))
- . ($cmdline_use_dependencies ? '' : ' --include-deps')
+ . ($cmdline_use_dependencies ? '' : ' --ignore-deps')
. ' ' . $input . $colon_infile . "\n\n");
# This rule remakes the Makefile.
# the file-finding machinery works.
local ($relative_dir) = '.';
&require_config_file ($FOREIGN, 'install-sh', 'mkinstalldirs', 'missing');
+ if ($cmdline_use_dependencies)
+ {
+ &require_config_file ($FOREIGN, 'depcomp');
+ }
&am_error ("\`install.sh' is an anachronism; use \`install-sh' instead")
if -f $config_aux_path[0] . '/install.sh';
}
"libversion.in", "mdate-sh", "mkinstalldirs", "install-sh",
'texinfo.tex', "ansi2knr.c", "ansi2knr.1", 'elisp-comp',
'ylwrap', 'acinclude.m4', @libtoolize_files,
- 'missing', 'compile'
+ 'missing', 'depcomp', 'compile'
);
# Commonly used files we auto-include, but only sometimes.
$USAGE = "\
-a, --add-missing add missing standard files to package
--amdir=DIR directory storing config files
- --build-dir=DIR directory where build being done (for dependencies)
-c, --copy with -a, copy missing files (default is symlink)
--cygnus assume program is part of Cygnus-style tree
--foreign set strictness to foreign
--gnits set strictness to gnits
--gnu set strictness to gnu
--help print this help, then exit
- -i, --include-deps include generated dependencies in Makefile.in
+ -i, --ignore-deps disable dependency tracking code
+ --include-deps enable dependency tracking code
--no-force only update Makefile.in's that are out of date
-o DIR, --output-dir=DIR
put generated Makefile.in's into DIR
- --srcdir-name=DIR name used for srcdir (for dependencies)
-v, --verbose verbosely list files processed
--version print version number, then exit\n";
|| chmod -R a+r $(distdir)
';
$dist{'dist-bzip2'} = ("\t"
- . '$(AMTAR) ch$(AMTARFLAGS)f - $(distdir) | bzip --best -c > $(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'
$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";
}
@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
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); \
--- /dev/null
+#! /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 <oliva@dcc.unicamp.br>.
+
+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
## 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
## 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:
## 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@`
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 \
## 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)
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.
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); \
## 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
## 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:
## 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@`
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; \
## 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; \
--- /dev/null
+#! /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 <oliva@dcc.unicamp.br>.
+
+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
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
-# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
-# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996.
+# Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 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
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)
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'
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"
;;
-*)
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
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)
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)
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 \
--- /dev/null
+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])
+])
--- /dev/null
+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"])])
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],,
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)])])
+])
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])
## --------------------------------------------------------- ##
## 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
+])
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
-# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
-# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996.
+# Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 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
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)
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'
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"
;;
-*)
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
-@set UPDATED 12 November 1999
+@set UPDATED 19 November 1999
@set EDITION 1.4a
@set VERSION 1.4a
+1999-11-21 Tom Tromey <tromey@cygnus.com>
+
+ * specflags3.test: Updated test for new dependency
+ implementation.
+
+1999-10-02 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
+
+ * defs: Set CDPATH to avoid verbose cd.
+
+1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
+
+ * defs: Avoid printing the full pathname of testSubDir.
+
+ * exsource.test: Update.
+
+1999-06-01 Alexandre Oliva <oliva@dcc.unicamp.br>
+
+ * 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 <oliva@dcc.unicamp.br>
+
+ * compile_f_c_cxx.test: Look for $(depcomp) for C and C++.
+ * suffix.test: We no longer emit % rules.
+
+1999-04-10 Alexandre Oliva <oliva@dcc.unicamp.br>
+
+ * 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 <tromey@cygnus.com>
* dash.test: New file.
depacl.test \
depacl2.test \
depend.test \
-depend2.test \
depend3.test \
discover.test \
distdir.test \
depacl.test \
depacl2.test \
depend.test \
-depend2.test \
depend3.test \
discover.test \
distdir.test \
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 \
;;
*)
- 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.
: > 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.
+++ /dev/null
-#! /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
$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
mv install-sh foo
mv missing foo
mv mkinstalldirs foo
+mv depcomp foo
$AUTOMAKE || exit 1
$AUTOMAKE || exit 1
-grep 'CC.*-Wp' Makefile.in
+grep -e '-o foo-foo' Makefile.in
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
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; \
## 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; \
-@set UPDATED 12 November 1999
+@set UPDATED 19 November 1999
@set EDITION 1.4a
@set VERSION 1.4a