From 8489664a3e95d16ad1b69d933b8466fe9da0985d Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 25 Mar 1999 17:38:27 +0000 Subject: [PATCH] 1999-03-25 Alexandre Oliva * automake.in (TESTS): make from Solaris 7/x86 loses if srcdir is absolute and != objdir. dir="" or "$(srcdir)/" fixes it --- ChangeLog | 15 ++++++++++++ Makefile.in | 17 +++++++------- automake.in | 58 +++++++++++++++++++++++------------------------ m4/Makefile.in | 11 +++++---- tests/Makefile.in | 8 +++---- 5 files changed, 63 insertions(+), 46 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5248b2dd..520742e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +1999-03-25 Alexandre Oliva + + * automake.in (TESTS): make from Solaris 7/x86 loses if srcdir + is absolute and != objdir. dir="" or "$(srcdir)/" fixes it + +1999-03-24 Tom Tromey + + * automake.in (define_compiler_variable): New sub. + (finish_languages): Use it. + (lang_cxx_finish): Likewise. + (lang_f77_finish): Likewise. + (lang_ppf77_finish): Likewise. + (lang_ratfor_finish): Likewise. + (lang_objc_finish): Likewise. + 1999-03-23 Tom Tromey * progs.am (install-@DIR@PROGRAMS): Use `-e' instead of multiple diff --git a/Makefile.in b/Makefile.in index 481d7a9a..0e2a9f27 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated automatically by automake 1.4 from Makefile.am +# Makefile.in generated automatically by automake 1.4a from Makefile.am # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation @@ -10,7 +10,6 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. - SHELL = @SHELL@ srcdir = @srcdir@ @@ -46,9 +45,10 @@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_FLAG = transform = @program_transform_name@ NORMAL_INSTALL = : @@ -63,6 +63,7 @@ PERL = @PERL@ TAR = @TAR@ VERSION = @VERSION@ + AUTOMAKE_OPTIONS = gnits 1.4 MAINT_CHARSET = latin1 @@ -270,8 +271,8 @@ dist-info: $(INFO_DEPS) mostlyclean-aminfo: -rm -f automake.aux automake.cp automake.cps automake.dvi automake.fn \ - automake.fns automake.ky automake.kys automake.ps \ - automake.log automake.pg automake.toc automake.tp \ + automake.fns automake.pgs automake.ky automake.kys \ + automake.ps automake.log automake.pg automake.toc automake.tp \ automake.tps automake.vr automake.vrs automake.op automake.tr \ automake.cv automake.cn @@ -361,7 +362,7 @@ maintainer-clean-recursive: dot_seen=no; \ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ rev="$$subdir $$rev"; \ - test "$$subdir" = "." && dot_seen=yes; \ + if test "$$subdir" = "."; then dot_seen=yes; else :; fi; \ done; \ test "$$dot_seen" = "no" && rev=". $$rev"; \ target=`echo $@ | sed s/-recursive//`; \ @@ -464,7 +465,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ @@ -507,7 +508,7 @@ uninstall: uninstall-recursive all-am: Makefile $(INFO_DEPS) $(SCRIPTS) $(DATA) all-redirect: all-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install + $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install installdirs: installdirs-recursive installdirs-am: $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(infodir) \ diff --git a/automake.in b/automake.in index 47c70693..f5cebcbe 100755 --- a/automake.in +++ b/automake.in @@ -942,12 +942,8 @@ sub finish_languages local ($ltcompile, $ltlink) = &libtool_compiler; &define_configure_variable ('CFLAGS'); - &define_variable ('COMPILE', - '$(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)'); - &define_variable ('LTCOMPILE', - $ltcompile . - '$(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)') - if ($seen_libtool); + &define_compiler_variable ('COMPILE', $ltcompile, + '$(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)'); &define_variable ('CCLD', '$(CC)'); &define_variable ('LINK', $ltlink . '$(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@'); } @@ -3795,13 +3791,15 @@ sub handle_tests push (@check_tests, 'check-TESTS'); push (@phony, 'check-TESTS'); + # Note: Solaris 2.7 seems to expand TESTS using VPATH. That's + # why we choose `dir=' and not `dir=.' $output_rules .= 'check-TESTS: $(TESTS) @failed=0; all=0; \\ srcdir=$(srcdir); export srcdir; \\ for tst in $(TESTS); do \\ - if test -f $$tst; then dir=.; \\ - else dir="$(srcdir)"; fi; \\ - if $(TESTS_ENVIRONMENT) $$dir/$$tst; then \\ + if test -f $$tst; then dir=; \\ + else dir="$(srcdir)/"; fi; \\ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \\ all=`expr $$all + 1`; \\ echo "PASS: $$tst"; \\ elif test $$? -ne 77; then \\ @@ -4606,10 +4604,7 @@ sub lang_cxx_finish local ($ltcompile, $ltlink) = &libtool_compiler; &define_configure_variable ("CXXFLAGS"); - &define_variable ('CXXCOMPILE', '$(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)'); - &define_variable ('LTCXXCOMPILE', - $ltcompile . '$(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)') - if ($seen_libtool); + &define_compiler_variable ('CXXCOMPILE', $ltcompile, '$(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)'); &define_variable ('CXXLD', '$(CXX)'); &define_variable ('CXXLINK', $ltlink . '$(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@'); @@ -4780,10 +4775,8 @@ sub lang_f77_finish local ($ltcompile, $ltlink) = &libtool_compiler; &define_configure_variable ('FFLAGS'); - &define_variable ('F77COMPILE', '$(F77) $(AM_FFLAGS) $(FFLAGS)'); - &define_variable ('LTF77COMPILE', - $ltcompile . '$(F77) $(AM_FFLAGS) $(FFLAGS)') - if ($seen_libtool); + &define_compiler_variable ('F77COMPILE', $ltcompile, + '$(F77) $(AM_FFLAGS) $(FFLAGS)'); &define_variable ('F77LD', '$(F77)'); &define_variable ('F77LINK', $ltlink . '$(F77LD) $(AM_FFLAGS) $(FFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@'); @@ -4834,10 +4827,8 @@ sub lang_ppf77_finish local ($ltcompile, $ltlink) = &libtool_compiler; &define_configure_variable ('FFLAGS'); - &define_variable ('F77COMPILE', '$(F77) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FFLAGS) $(FFLAGS)'); - &define_variable ('LTF77COMPILE', - $ltcompile . '$(F77) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FFLAGS) $(FFLAGS)') - if ($seen_libtool); + &define_compiler_variable ('F77COMPILE', $ltcompile, + '$(F77) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FFLAGS) $(FFLAGS)'); &define_variable ('F77LD', '$(F77)'); &define_variable ('F77LINK', $ltlink . '$(F77LD) $(AM_FFLAGS) $(FFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@'); @@ -4874,10 +4865,8 @@ sub lang_ratfor_finish &define_configure_variable ('FFLAGS'); &define_configure_variable ('RFLAGS'); - &define_variable ('RCOMPILE', '$(F77) $(AM_FFLAGS) $(FFLAGS) $(AM_RFLAGS) $(RFLAGS)'); - &define_variable ('LTRCOMPILE', - $ltcompile . '$(F77) $(AM_FFLAGS) $(FFLAGS) $(AM_RFLAGS) $(RFLAGS)') - if ($seen_libtool); + &define_variable ('RCOMPILE', $ltcompile, + '$(F77) $(AM_FFLAGS) $(FFLAGS) $(AM_RFLAGS) $(RFLAGS)'); &define_variable ('F77LD', '$(F77)'); &define_variable ('F77LINK', $ltlink . '$(F77LD) $(AM_FFLAGS) $(FFLAGS) $(AM_RFLAGS) $(RFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@'); @@ -4910,10 +4899,8 @@ sub lang_objc_finish local ($ltcompile, $ltlink) = &libtool_compiler; &define_configure_variable ("OBJCFLAGS"); - &define_variable ('OBJCCOMPILE', '$(OBJC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS)'); - &define_variable ('LTOBJCCOMPILE', - $ltcompile . '$(OBJC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS)') - if ($seen_libtool); + &define_compiler_variable ('OBJCCOMPILE', $ltcompile, + '$(OBJC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS)'); &define_variable ('OBJCLD', '$(OBJC)'); &define_variable ('OBJCLINK', $ltlink . '$(OBJCLD) $(AM_OBJCFLAGS) $(OBJCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@'); @@ -5711,6 +5698,19 @@ sub define_configure_variable &define_variable ($var, $value); } +# Define a compiler variable. When tracking dependencies, we want to +# define a slightly different variable here so that the actual +# compilation command contains all the dependency magic. We also +# handle defining the `LT' version of the command when using libtool. +sub define_compiler_variable +{ + local ($var, $ltcompile, $value) = @_; + local ($name) = $var . ($use_dependencies ? '_' : ''); + &define_variable ($name, $value); + &define_variable ('LT' . $name, $ltcompile . $value) + if $seen_libtool; +} + # Define a variable that represents a program to run. If in Cygnus # mode, the program is searched for in the build (or source) tree. # Otherwise no searching is done at all. Arguments are: diff --git a/m4/Makefile.in b/m4/Makefile.in index 5b5de037..a6c2a11f 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated automatically by automake 1.4 from Makefile.am +# Makefile.in generated automatically by automake 1.4a from Makefile.am # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation @@ -10,7 +10,6 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. - SHELL = @SHELL@ srcdir = @srcdir@ @@ -46,9 +45,10 @@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_FLAG = transform = @program_transform_name@ NORMAL_INSTALL = : @@ -63,6 +63,7 @@ PERL = @PERL@ TAR = @TAR@ VERSION = @VERSION@ + AUTOMAKE_OPTIONS = gnits MAINT_CHARSET = latin1 @@ -126,7 +127,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ @@ -155,7 +156,7 @@ uninstall: uninstall-am all-am: Makefile $(DATA) all-redirect: all-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install + $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install installdirs: $(mkinstalldirs) $(DESTDIR)$(m4datadir) diff --git a/tests/Makefile.in b/tests/Makefile.in index 4b15bdc5..02f02928 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -10,7 +10,6 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. - SHELL = @SHELL@ srcdir = @srcdir@ @@ -64,6 +63,7 @@ PERL = @PERL@ TAR = @TAR@ VERSION = @VERSION@ + AUTOMAKE_OPTIONS = gnits TESTS = acinclude.test aclocal.test aclocali.test aclocalii.test acoutnoq.test acoutput.test acoutqnl.test acouttbs.test acsilent.test all.test alpha.test ammissing.test ansi.test ansi2.test ansi3.test auxdir.test backsl.test badline.test badprog.test block.test canon.test canon2.test canon3.test canon4.test checkall.test clean.test colneq.test colneq2.test colon.test colon2.test colon3.test colon4.test colon5.test colon6.test colon7.test comment.test comment2.test compile_f_c_cxx.test cond.test cond2.test cond3.test cond4.test cond5.test cond6.test cond7.test condman.test condman2.test conf2.test confdist.test confh.test confh2.test confh3.test config.test confincl.test confsub.test confvar.test confvar2.test copy.test cxxcpp.test cxxlibobj.test cxxlink.test cxxnoc.test cxxo.test cygwin32.test defun.test defun2.test dejagnu.test depacl.test depacl2.test depend.test depend2.test depend3.test discover.test distdir.test dup.test dup2.test else.test empty.test error.test exdir.test exdir2.test exsource.test ext.test extra.test extra3.test extra4.test flibs.test fnoc.test fo.test fonly.test fpinst2.test fpinstall.test gnits.test implicit.test include.test info.test insh.test insh2.test install.test installsh.test instdata.test instexec.test insthook.test instman.test interp.test interp2.test java.test javaprim.test javasubst.test ldadd.test lex.test lex2.test lex3.test libobj.test libobj2.test libobj3.test libobj4.test libobj5.test libobj6.test libobj7.test libobj8.test libobj9.test library.test link_c_cxx.test link_f_c.test link_f_c_cxx.test link_f_cxx.test link_f_only.test lisp.test mdate.test mdate2.test mdate3.test mkinst2.test mkinstall.test nodep.test noinst.test number.test objc.test obsolete.test obsolete2.test order.test outdir.test output.test output2.test output3.test output4.test output5.test package.test parse.test pluseq.test pluseq2.test pluseq3.test pluseq4.test pluseq5.test pluseq6.test pluseq7.test ppf77.test prefix.test primary.test primary2.test proginst.test ranlib.test recurs.test recurs2.test remake.test remake2.test req.test rulepat.test scripts.test seenc.test sinclude.test spell.test spell2.test spell3.test spelling.test stamph.test stdlib.test subdir.test subdir2.test subdir3.test subst.test symlink.test syntax.test tags.test tagsub.test target.test texinfo.test texinfo2.test texinfo3.test texinfo4.test texinfo5.test texinfo6.test texinfo7.test unused.test version.test version2.test version3.test vpath.test vtexi.test vtexi2.test whoami.test xsource.test yacc.test yaccpp.test @@ -115,9 +115,9 @@ check-TESTS: $(TESTS) @failed=0; all=0; \ srcdir=$(srcdir); export srcdir; \ for tst in $(TESTS); do \ - if test -f $$tst; then dir=.; \ - else dir="$(srcdir)"; fi; \ - if $(TESTS_ENVIRONMENT) $$dir/$$tst; then \ + if test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ echo "PASS: $$tst"; \ elif test $$? -ne 77; then \ -- 2.43.5