]> sourceware.org Git - automake.git/commitdiff
F77 changes + some random fixes
authorTom Tromey <tromey@redhat.com>
Tue, 13 Oct 1998 18:51:23 +0000 (18:51 +0000)
committerTom Tromey <tromey@redhat.com>
Tue, 13 Oct 1998 18:51:23 +0000 (18:51 +0000)
* libobj7.test: Updated to reflect minor change in automake (test
wasn't resilient enough).
* instman.test: Updated to reflect fact that mkinstalldirs will be
in distribution.
* cxxonly.test: Removed.
* Makefile.am (TESTS): Added compile_f_c_cxx.test.
* compile_f_c_cxx.test: New file.
* Makefile.am (TESTS): Added flink.test link_c_cxx.test
link_f_c.test link_f_c_cxx.test link_f_cxx.test link_f_only.test.
Removed flink.test.
* flibs.test: New File.
* link_c_cxx.test: New file.
* link_f_c.test: New file.
* link_f_c_cxx.test: New file.
* link_f_cxx.test: New file.
* link_f_only.test: New file.
* Makefile.am (TESTS): Add cxxonly.test, fonly.test, flink.test,
fnoc.test and fo.test.
* cxxonly.test: New file.
* fonly.test: New file.
* flink.test: New file.
* fnoc.test: New file.
* fo.test: New file.

16 files changed:
tests/ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/compile_f_c_cxx.test [new file with mode: 0755]
tests/extra4.test
tests/flibs.test [new file with mode: 0755]
tests/fnoc.test [new file with mode: 0755]
tests/fo.test [new file with mode: 0755]
tests/fonly.test [new file with mode: 0755]
tests/instman.test
tests/libobj7.test
tests/link_c_cxx.test [new file with mode: 0755]
tests/link_f_c.test [new file with mode: 0755]
tests/link_f_c_cxx.test [new file with mode: 0755]
tests/link_f_cxx.test [new file with mode: 0755]
tests/link_f_only.test [new file with mode: 0755]

index 9427beecffb56122a7af46974556867e4ad60134..83f9a998b36810bb090e32e6e2767de71ba4626c 100644 (file)
@@ -1,3 +1,39 @@
+1998-10-13  Tom Tromey  <tromey@cygnus.com>
+
+       * libobj7.test: Updated to reflect minor change in automake (test
+       wasn't resilient enough).
+       * instman.test: Updated to reflect fact that mkinstalldirs will be
+       in distribution.
+
+       * cxxonly.test: Removed.
+
+Mon Aug 31 09:46:59 1998  Matthew D. Langston  <langston@SLAC.Stanford.EDU>
+
+       * Makefile.am (TESTS): Added compile_f_c_cxx.test.
+       * compile_f_c_cxx.test: New file.
+
+Sat Aug 29 18:17:58 1998  Matthew D. Langston  <langston@SLAC.Stanford.EDU>
+
+       * Makefile.am (TESTS): Added flink.test link_c_cxx.test
+       link_f_c.test link_f_c_cxx.test link_f_cxx.test link_f_only.test.
+       Removed flink.test.
+       * flibs.test: New File.
+       * link_c_cxx.test: New file.
+       * link_f_c.test: New file.
+       * link_f_c_cxx.test: New file.
+       * link_f_cxx.test: New file.
+       * link_f_only.test: New file.
+
+Tue Aug 11 10:46:36 1998  Matthew D. Langston  <langston@SLAC.Stanford.EDU>
+
+       * Makefile.am (TESTS): Add cxxonly.test, fonly.test, flink.test,
+       fnoc.test and fo.test.
+       * cxxonly.test: New file.
+       * fonly.test: New file.
+       * flink.test: New file.
+       * fnoc.test: New file.
+       * fo.test: New file.
+
 1998-10-08  Tom Tromey  <tromey@cygnus.com>
 
        * confdist.test: New file.
index 402c781fd9e28644de8fdb856be4dbcfabc0ed17..cdea16190d4f2e91c1243c78f6d67afb7a0c25a6 100644 (file)
@@ -34,7 +34,9 @@ lex2.test libobj8.test version3.test instdata.test exdir2.test \
 colon5.test library.test syntax.test cond4.test cond5.test recurs.test \
 ansi3.test cond6.test colon6.test texinfo7.test parse.test else.test \
 clean.test recurs2.test config.test colon7.test badline.test \
-extra3.test extra4.test confdist.test
+extra3.test extra4.test confdist.test fnoc.test fo.test fonly.test \
+link_c_cxx.test link_f_c.test link_f_c_cxx.test link_f_cxx.test        \
+link_f_only.test flibs.test compile_f_c_cxx.test
 
 EXTRA_DIST = defs $(TESTS)
 
index 4ead6497c42076aff0e93030b4b54ce8e2e1cc5c..3005ae19fad33c024a0623f80f4740858b6dc4c4 100644 (file)
@@ -97,7 +97,9 @@ lex2.test libobj8.test version3.test instdata.test exdir2.test \
 colon5.test library.test syntax.test cond4.test cond5.test recurs.test \
 ansi3.test cond6.test colon6.test texinfo7.test parse.test else.test \
 clean.test recurs2.test config.test colon7.test badline.test \
-extra3.test extra4.test confdist.test
+extra3.test extra4.test confdist.test fnoc.test fo.test fonly.test \
+link_c_cxx.test link_f_c.test link_f_c_cxx.test link_f_cxx.test        \
+link_f_only.test flibs.test compile_f_c_cxx.test
 
 EXTRA_DIST = defs $(TESTS)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -182,7 +184,7 @@ install-data-am:
 install-data: install-data-am
 
 install-am: all-am
-       $(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 install: install-am
 uninstall-am:
 uninstall: uninstall-am
diff --git a/tests/compile_f_c_cxx.test b/tests/compile_f_c_cxx.test
new file mode 100755 (executable)
index 0000000..6f0c6c8
--- /dev/null
@@ -0,0 +1,35 @@
+#! /bin/sh
+
+# Test to make sure rules to invoke all compilers are selected with
+# mixed source objects.
+# Matthew D. Langston <langston@SLAC.Stanford.EDU>
+
+. $srcdir/defs || exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_FC
+MDL_F77_LIBRARY_LDFLAGS
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo
+foo_SOURCES  = foo.f bar.c baz.cc
+foo_LDADD    = @FLIBS@
+END
+
+: > foo.f
+: > bar.c
+: > baz.cc
+
+$AUTOMAKE || exit 1
+
+
+# Look for the macros at the beginning of rules.  Be careful, as there
+# are literal tabs at the beginning of the search strings.
+grep ' \$(COMPILE)'   Makefile.in  || exit 1
+grep ' \$(CXXCOMPILE)' Makefile.in  || exit 1
+grep ' \$(FCOMPILE)'  Makefile.in  || exit 1
+
+exit 0
index 15e8c365dfdc1fd1d5183103f247d4b3f429c81d..40f57f942d1ac8c03280e20916d6dec5748cd989 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# Check to make sure EXTRA_DATA cannot be required.
+# Check to make sure EXTRA_DATA cannot be specified.
 
 . $srcdir/defs || exit 1
 
diff --git a/tests/flibs.test b/tests/flibs.test
new file mode 100755 (executable)
index 0000000..326fa6b
--- /dev/null
@@ -0,0 +1,38 @@
+#! /bin/sh
+
+# Make sure `MDL_F77_LIBRARY_LDFLAGS' (form `m4/mdl_f77.m4') works
+# properly.
+# Matthew D. Langston <langston@SLAC.Stanford.EDU>
+
+. $srcdir/defs || exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_FC
+MDL_F77_LIBRARY_LDFLAGS
+END
+
+# Tue Aug 11 09:50:48 1998  Matthew D. Langston  <langston@SLAC.Stanford.EDU>
+#
+# This test currently fails with automake v. 1.3 since automake assumes
+# that elements of `bin_PROGRAMS' (e.g. zardoz) without a corresponding
+# `_SOURCES' (e.g. zardoz_SOURCES) should be compiled from `zardoz.c'
+# whether or not `zardoz.c' actually exists.  For example, even if the
+# file `zardoz.c' doesn't exist but the file `zardoz.f' does exist, this
+# tests would still fail.
+#
+# Therefore, for now I have put in the line `zardoz_SOURCES = zardoz.f'
+# (see below) so that automake's top-level `make check' won't fail, but
+# this line should be removed once automake handles this situation
+# correctly.
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = zardoz
+zardoz_SOURCES = zardoz.f
+zardoz_LDADD = @FLIBS@
+END
+
+: > zardoz.f
+
+$AUTOMAKE || exit 1
+
+grep '@FLIBS@' Makefile.in
diff --git a/tests/fnoc.test b/tests/fnoc.test
new file mode 100755 (executable)
index 0000000..d2dc30e
--- /dev/null
@@ -0,0 +1,24 @@
+#! /bin/sh
+
+# Test to make sure that pure Fortran 77 sources don't include
+# C-specific code.
+# Matthew D. Langston <langston@SLAC.Stanford.EDU>
+
+. $srcdir/defs || exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_FC
+END
+
+cat > Makefile.am << 'END'
+sbin_PROGRAMS = anonymous
+anonymous_SOURCES = doe.f jane.f
+END
+
+: > doe.f
+: > jane.f
+
+$AUTOMAKE || exit 1
+
+grep '[^F]CC' Makefile.in | grep -v MKDEP && exit 1
+exit 0
diff --git a/tests/fo.test b/tests/fo.test
new file mode 100755 (executable)
index 0000000..1010832
--- /dev/null
@@ -0,0 +1,21 @@
+#! /bin/sh
+
+# Make sure Fortran 77 files are rewritten to ".o" and not just "o".
+# Matthew D. Langston <langston@SLAC.Stanford.EDU>
+
+. $srcdir/defs || exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_FC
+END
+
+cat > Makefile.am << 'END'
+sbin_PROGRAMS = anonymous
+anonymous_SOURCES = doe.f
+END
+
+: > doe.f
+
+$AUTOMAKE || exit 1
+
+fgrep doe.o Makefile.in
diff --git a/tests/fonly.test b/tests/fonly.test
new file mode 100755 (executable)
index 0000000..dd1ebbe
--- /dev/null
@@ -0,0 +1,35 @@
+#! /bin/sh
+
+# Make sure programs with only Fortran 77 source are handled properly.
+# Matthew D. Langston <langston@SLAC.Stanford.EDU>
+
+. $srcdir/defs || exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_FC
+END
+
+# Tue Aug 11 09:50:48 1998  Matthew D. Langston  <langston@SLAC.Stanford.EDU>
+#
+# This test currently fails with automake v. 1.3 since automake assumes
+# that elements of `bin_PROGRAMS' (e.g. zardoz) without a corresponding
+# `_SOURCES' (e.g. zardoz_SOURCES) should be compiled from `zardoz.c'
+# whether or not `zardoz.c' actually exists.  For example, even if the
+# file `zardoz.c' doesn't exist but the file `zardoz.f' does exist, this
+# tests would still fail.
+#
+# Therefore, for now I have put in the line `zardoz_SOURCES = zardoz.f'
+# (see below) so that automake's top-level `make check' won't fail, but
+# this line should be removed once automake handles this situation
+# correctly.
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = zardoz
+zardoz_SOURCES = zardoz.f
+END
+
+: > zardoz.f
+
+$AUTOMAKE || exit 1
+
+grep 'zardoz.f' Makefile.in
index 4aa1b4707eeb6f0be515aa5d4b8383812742f72a..60d231bdb9bcb696064d8e2c9364c5bb65a9b4c2 100755 (executable)
@@ -13,5 +13,5 @@ EOF
 
 $AUTOMAKE || exit 1
 
-grep '[^(/]mkinstalldirs' Makefile.in && exit 1
-exit 0
+grep '[^(/]mkinstalldirs' Makefile.in > out || exit 1
+test `wc -l < out` -eq 1
index ed5280f1a4e33642472ccf504c28623e550f3066..ed0d101e7275095d80ce677b5e0667b3983bc4c7 100755 (executable)
@@ -27,4 +27,11 @@ END
 
 $AUTOMAKE || exit 1
 
-grep 'DIST_COMMON.*dirname' Makefile.in
+sed -n -e ': again
+  /^DIST_COMMON.*[^\]$/ p
+  /^DIST_COMMON/ {
+     s/^DIST_COMMON//p
+     n
+     s/^/DIST_COMMON/
+     b again
+  }' < Makefile.in | fgrep dirname.c
diff --git a/tests/link_c_cxx.test b/tests/link_c_cxx.test
new file mode 100755 (executable)
index 0000000..8ff69a4
--- /dev/null
@@ -0,0 +1,34 @@
+#! /bin/sh
+
+# Test to make sure the C++ linker is used when appropriate.
+# Matthew D. Langston <langston@SLAC.Stanford.EDU>
+
+. $srcdir/defs || exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_CXX
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = lavalamp
+lavalamp_SOURCES = lava.c lamp.cxx
+END
+
+: > lava.c
+: > lamp.cxx
+
+$AUTOMAKE || exit 1
+
+
+# We should only see the C++ linker in the rules of `Makefile.in'.
+
+# Look for this macro not at the beginning of any line; that will have
+# to be good enough for now.
+grep '.\$(CXXLINK)' Makefile.in  || exit 1
+
+# We should not see these patterns:
+grep '.\$(FLINK)' Makefile.in && exit 1
+grep '.\$(LINK)'  Makefile.in && exit 1
+
+exit 0
diff --git a/tests/link_f_c.test b/tests/link_f_c.test
new file mode 100755 (executable)
index 0000000..19281b5
--- /dev/null
@@ -0,0 +1,35 @@
+#! /bin/sh
+
+# Test to make sure the Fortran 77 linker is used when appropriate.
+# Matthew D. Langston <langston@SLAC.Stanford.EDU>
+
+. $srcdir/defs || exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_FC
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = lavalamp
+lavalamp_SOURCES = lava.c lamp.f
+END
+
+: > lava.c
+: > lamp.f
+
+$AUTOMAKE || exit 1
+
+
+# We should only see the Fortran 77 linker in the rules of
+# `Makefile.in'.
+
+# Look for this macro not at the beginning of any line; that will have
+# to be good enough for now.
+grep '.\$(FLINK)' Makefile.in  || exit 1
+
+# We should not see these patterns:
+grep '.\$(LINK)'   Makefile.in && exit 1
+grep '.\$(CXXLINK)' Makefile.in && exit 1
+
+exit 0
diff --git a/tests/link_f_c_cxx.test b/tests/link_f_c_cxx.test
new file mode 100755 (executable)
index 0000000..886c8cc
--- /dev/null
@@ -0,0 +1,36 @@
+#! /bin/sh
+
+# Test to make sure the C++ linker is used when appropriate.
+# Matthew D. Langston <langston@SLAC.Stanford.EDU>
+
+. $srcdir/defs || exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_FC
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = lavalamp
+lavalamp_SOURCES = lava.c lamp.cxx lamp2.f
+END
+
+: > lava.c
+: > lamp.cxx
+: > lamp2.f
+
+$AUTOMAKE || exit 1
+
+
+# We should only see the C++ linker in the rules of `Makefile.in'.
+
+# Look for this macro not at the beginning of any line; that will have
+# to be good enough for now.
+grep '.\$(CXXLINK)' Makefile.in  || exit 1
+
+# We should not see these patterns:
+grep '.\$(FLINK)' Makefile.in && exit 1
+grep '.\$(LINK)'  Makefile.in && exit 1
+
+exit 0
diff --git a/tests/link_f_cxx.test b/tests/link_f_cxx.test
new file mode 100755 (executable)
index 0000000..96e2c35
--- /dev/null
@@ -0,0 +1,34 @@
+#! /bin/sh
+
+# Test to make sure the C++ linker is used when appropriate.
+# Matthew D. Langston <langston@SLAC.Stanford.EDU>
+
+. $srcdir/defs || exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CXX
+AC_PROG_FC
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = lavalamp
+lavalamp_SOURCES = lava.cxx lamp.f
+END
+
+: > lava.cxx
+: > lamp.f
+
+$AUTOMAKE || exit 1
+
+
+# We should only see the C++ linker in the rules of `Makefile.in'.
+
+# Look for this macro not at the beginning of any line; that will have
+# to be good enough for now.
+grep '.\$(CXXLINK)' Makefile.in  || exit 1
+
+# We should not see these patterns:
+grep '.\$(FLINK)' Makefile.in && exit 1
+grep '.\$(LINK)'  Makefile.in && exit 1
+
+exit 0
diff --git a/tests/link_f_only.test b/tests/link_f_only.test
new file mode 100755 (executable)
index 0000000..82d74ee
--- /dev/null
@@ -0,0 +1,32 @@
+#! /bin/sh
+
+# Test to make sure the Fortran 77 linker is used when appropriate.
+# Matthew D. Langston <langston@SLAC.Stanford.EDU>
+
+. $srcdir/defs || exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_FC
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = lavalamp
+lavalamp_SOURCES = lamp.f
+END
+
+: > lamp.f
+
+$AUTOMAKE || exit 1
+
+
+# We should only see the Fortran linker in the rules of `Makefile.in'.
+
+# Look for this macro not at the beginning of any line; that will have
+# to be good enough for now.
+grep '.\$(FLINK)' Makefile.in  || exit 1
+
+# We should not see these patterns:
+grep '.\$(CXXLINK)' Makefile.in && exit 1
+grep '.\$(LINK)'    Makefile.in && exit 1
+
+exit 0
This page took 0.040986 seconds and 5 git commands to generate.