subdir-objects: complain if it isn't enabled
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 13 Jan 2013 16:50:30 +0000 (17:50 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 13 Jan 2013 19:48:10 +0000 (20:48 +0100)
Since the next major automake version will make the behaviour so far
only activated with the 'subdir-object' option mandatory, it's better
if we start warning users not using that option.

As suggested by Peter Johansson, we strive to avoid the warning when
it would be irrelevant, i.e., if all source files sit in "current"
directory.

See automake bug#13378.

* automake.in (handle_single_transform): Print the warning when
necessary.
* t/subobj.sh: Enhance.
* t/ax/depcomp.sh: Adjust.
* t/cscope.tap: Likewise.
* t/depcomp8a.sh: Likewise.
* t/depcomp8b.sh: Likewise.
* t/ext2.sh: Likewise.
* t/extra-portability.sh: Likewise.
* t/fort2.sh: Likewise.
* t/fort4.sh: Likewise.
* t/fort5.sh: Likewise.
* t/lex-line.sh: Likewise.
* t/libtool3.sh: Likewise.
* t/ltinstloc.sh: Likewise.
* t/ltlibsrc.sh: Likewise.
* t/ltorder.sh: Likewise.
* t/parallel-tests-suffix-prog.sh: Likewise.
* t/sourcefile-in-subdir.sh: Likewise.
* t/specflg9.sh: Likewise.
* t/subobj4.sh: Likewise.
* t/subobj7.sh: Likewise.
* t/subpkg-yacc.sh: Likewise.
* t/subpkg.sh: Likewise.
* t/suffix-custom-subobj-and-specflg.sh: Likewise.
* t/vala-libs.sh: Likewise.
* t/vala-non-recursive-setup.sh: Likewise.
* t/yacc-grepping2.sh: Likewise.
* t/yacc-line.sh: Likewise.

28 files changed:
automake.in
t/ax/depcomp.sh
t/cscope.tap
t/depcomp8a.sh
t/depcomp8b.sh
t/ext2.sh
t/extra-portability.sh
t/fort2.sh
t/fort4.sh
t/fort5.sh
t/lex-line.sh
t/libtool3.sh
t/ltinstloc.sh
t/ltlibsrc.sh
t/ltorder.sh
t/parallel-tests-suffix-prog.sh
t/sourcefile-in-subdir.sh
t/specflg9.sh
t/subobj.sh
t/subobj4.sh
t/subobj7.sh
t/subpkg-yacc.sh
t/subpkg.sh
t/suffix-custom-subobj-and-specflg.sh
t/vala-libs.sh
t/vala-non-recursive-setup.sh
t/yacc-grepping2.sh
t/yacc-line.sh

index 990b60d..0e3b882 100644 (file)
@@ -1793,9 +1793,36 @@ sub handle_single_transform ($$$$$%)
 
            # If rewrite said it was ok, put the object into a
            # subdir.
-           if ($r == LANG_SUBDIR && $directory ne '')
+           if ($directory ne '')
            {
-               $object = $directory . '/' . $object;
+              if ($r == LANG_SUBDIR)
+                {
+                  $object = $directory . '/' . $object;
+                }
+              else
+                {
+                  # Since the next major version of automake (1.14) will
+                  # make the behaviour so far only activated with the
+                  # 'subdir-object' option mandatory, it's better if we
+                  # start warning users not using that option.
+                  # As suggested by Peter Johansson, we strive to avoid
+                  # the warning when it would be irrelevant, i.e., if
+                  # all source files sit in "current" directory.
+                  msg_var 'unsupported', $var,
+                          "source file '$full' is in a subdirectory,"
+                          . "\nbut option 'subdir-objects' is disabled";
+                  msg 'unsupported', INTERNAL, <<'EOF', uniq_scope => US_GLOBAL;
+possible forward-incompatibility.
+At least a source file is in a subdirectory, but the 'subdir-objects'
+automake option hasn't been enabled.  For now, the corresponding output
+object file(s) will be placed in the top-level directory.  However,
+this behaviour will change in future Automake versions: they will
+unconditionally cause object files to be placed in the same subdirectory
+of the corresponding sources.
+You are advised to start using 'subdir-objects' option throughout your
+project, to avoid future incompatibilities.
+EOF
+                }
            }
 
            # If the object file has been renamed (because per-target
index 0e5b6a5..1534d5f 100644 (file)
@@ -130,7 +130,7 @@ check_distclean ()
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
 AC_CONFIG_AUX_DIR([build-aux])
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([subdir-objects])
 AC_PROG_CC
 AM_PROG_AR
 $(if test $depcomp_with_libtool = yes; then
@@ -199,18 +199,17 @@ ${normalized_target}_${LINKADD} = src/libbaz.$a
 grep-test:
 ## For debugging.
        cat \$(DEPDIR)/foo.$po || :
-       cat \$(DEPDIR)/subfoo.$po || :
+       cat sub/\$(DEPDIR)/subfoo.$po || :
        cat src/\$(DEPDIR)/baz.$po || :
        cat src/sub2/\$(DEPDIR)/sub2foo.$po || :
-## Checks done here.
+## Checks are done here.
        grep '^foo.$objext.*:' \$(DEPDIR)/foo.$po
-       grep '^subfoo\.$objext.*:' \$(DEPDIR)/subfoo.$po
+       grep '^sub/subfoo\.$objext.*:' sub/\$(DEPDIR)/subfoo.$po
        grep '^baz\.$objext.*:' src/\$(DEPDIR)/baz.$po
        grep '^sub2/sub2foo\.$objext.*:' src/sub2/\$(DEPDIR)/sub2foo.$po
 END
 
 cat > src/Makefile.am <<END
-AUTOMAKE_OPTIONS = subdir-objects
 noinst_${LIBPRIMARY} = libbaz.$a
 # We include sub2foo only to be sure that the munging in depcomp
 # doesn't remove too much from the object file name.
index 29feec2..9dbe01b 100755 (executable)
@@ -22,8 +22,10 @@ plan_ 18
 
 ocwd=$(pwd) || fatal_ "getting top-level directory"
 
-cat >> configure.ac << 'END'
-AC_CONFIG_FILES([sub/Makefile])
+cat > configure.ac << 'END'
+AC_INIT([cscope-test], [1.0])
+AM_INIT_AUTOMAKE([subdir-objects])
+AC_CONFIG_FILES([Makefile sub/Makefile])
 AC_SUBST([CC],  [who-cares])
 AC_SUBST([CXX], [who-cares])
 AC_SUBST([FC],  [who-cares])
index 76aa376..d6c73ed 100755 (executable)
@@ -48,7 +48,9 @@ int bar (void)
 END
 
 $ACLOCAL
-$AUTOMAKE -a
+# FIXME: stop disabling the warnings in the 'unsupported' category
+# FIXME: once the 'subdir-objects' option has been mandatory.
+$AUTOMAKE -a -Wno-unsupported
 grep include Makefile.in # For debugging.
 grep 'include.*\./\$(DEPDIR)/foo\.P' Makefile.in
 grep 'include.*\./\$(DEPDIR)/bar\.P' Makefile.in
index 52382f1..879ee1c 100755 (executable)
@@ -31,6 +31,9 @@ AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
+## FIXME: stop disabling the warnings in the 'unsupported' category
+## FIXME: once the 'subdir-objects' option has been mandatory.
+AUTOMAKE_OPTIONS = -Wno-unsupported
 lib_LTLIBRARIES = libzardoz.la
 libzardoz_la_SOURCES = foo.c sub/bar.c
 END
@@ -42,7 +45,9 @@ echo 'int bar (void) { return 0; }' > sub/bar.c
 libtoolize
 
 $ACLOCAL
-$AUTOMAKE -a
+# FIXME: stop disabling the warnings in the 'unsupported' category
+# FIXME: once the 'subdir-objects' option has been mandatory.
+$AUTOMAKE -a -Wno-unsupported
 grep include Makefile.in # For debugging.
 grep 'include.*\./\$(DEPDIR)/foo\.P' Makefile.in
 grep 'include.*\./\$(DEPDIR)/bar\.P' Makefile.in
@@ -56,7 +61,7 @@ DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' $MAKE distcheck
 
 # Try again with subdir-objects option.
 
-echo AUTOMAKE_OPTIONS = subdir-objects >> Makefile.am
+echo AUTOMAKE_OPTIONS += subdir-objects >> Makefile.am
 
 $AUTOMAKE
 grep include Makefile.in # For debugging.
index 1089080..4858aec 100755 (executable)
--- a/t/ext2.sh
+++ b/t/ext2.sh
@@ -25,6 +25,7 @@ AC_PROG_CXX
 EOF
 
 cat >Makefile.am <<EOF
+AUTOMAKE_OPTIONS = subdir-objects
 bin_PROGRAMS = p q r
 p_SOURCES = a.cc b.cpp c.cxx
 q_SOURCES = sub/d.cc sub/e.cpp sub/f.cxx
index 1ea23ad..63849c7 100755 (executable)
@@ -40,7 +40,7 @@ $ACLOCAL
 
 cat >Makefile.am <<END
 EXTRA_LIBRARIES = libfoo.a
-libfoo_a_SOURCES = sub/foo.c
+libfoo_a_SOURCES = foo.c
 END
 
 # Sanity check: extra-portability warnings causes the expected error.
index c99e8b7..d614452 100755 (executable)
@@ -19,6 +19,7 @@
 
 # Cf. 'fort1.sh' and 'link_f90_only.sh'.
 
+required=gfortran # Required only in order to run ./configure.
 . test-init.sh
 
 mkdir sub
@@ -30,33 +31,64 @@ AC_FC_SRCEXT([f95])
 AC_FC_SRCEXT([f03])
 AC_FC_SRCEXT([f08])
 AC_FC_SRCEXT([blabla])
+AC_OUTPUT
 END
 
 cat >Makefile.am <<'END'
+AUTOMAKE_OPTIONS = subdir-objects
+FC = fake-fc
 bin_PROGRAMS = hello goodbye
-hello_SOURCES = hello.f90 foo.f95 sub/bar.f95 hi.f03 sub/howdy.f03 greets.f08 sub/bonjour.f08
+hello_SOURCES = hello.f90 foo.f95 sub/bar.f95 hi.f03 sub/howdy.f03 \
+                greets.f08 sub/bonjour.f08
 goodbye_SOURCES = bye.f95 sub/baz.f90
-goodbye_FCFLAGS =
+goodbye_FCFLAGS = --gby
 END
 
 $ACLOCAL
 $AUTOMAKE
-# The following tests aren't fool-proof, but they don't
-# need a Fortran compiler.
 grep '.\$(LINK)'       Makefile.in && exit 1
 grep '.\$(FCLINK)'     Makefile.in
 grep '.\$(FCCOMPILE)'  Makefile.in > stdout
 cat stdout
 grep -v '\$(FCFLAGS_f' stdout && exit 1
 grep '.\$(FC.*\$(FCFLAGS_blabla' Makefile.in && exit 1
-# Notice the TAB:
-grep '^[       ].*\$(FC.*\$(FCFLAGS_f90).*\.f90' Makefile.in
-grep '^[       ].*\$(FC.*\$(FCFLAGS_f95).*\.f95' Makefile.in
-grep '^[       ].*\$(FC.*\$(FCFLAGS_f03).*\.f03' Makefile.in
-grep '^[       ].*\$(FC.*\$(FCFLAGS_f08).*\.f08' Makefile.in
-grep '^[       ].*\$(FC.*\$(FCFLAGS_f90).*\.f95' Makefile.in && exit 1
-grep '^[       ].*\$(FC.*\$(FCFLAGS_f95).*\.f90' Makefile.in && exit 1
-grep '^[       ].*\$(FC.*\$(FCFLAGS_f90).*\.f03' Makefile.in && exit 1
-grep '^[       ].*\$(FC.*\$(FCFLAGS_f08).*\.f90' Makefile.in && exit 1
+
+sed '/^AC_FC_SRCEXT.*blabla/d' configure.ac >t
+mv -f t configure.ac
+
+rm -rf autom4te*.cache
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+./configure
+
+touch hello.f90 foo.f95 sub/bar.f95 hi.f03 sub/howdy.f03 greets.f08 \
+      sub/bonjour.f08 bye.f95 sub/baz.f90
+
+$MAKE -n \
+  FCFLAGS_f90=--@90 FCFLAGS_f95=--@95 FCFLAGS_f03=--@03 FCFLAGS_f08=--@08 \
+  > stdout || { cat stdout; exit 1; }
+cat stdout
+# To make it easier to have  stricter grepping below.
+sed -e 's/[    ][      ]*/  /g' -e 's/^/ /' -e 's/$/ /' stdout > out
+cat out
+
+grep ' fake-fc .* --@90 .* hello\.f90 ' out
+grep ' fake-fc .* --@95 .* foo\.f95 ' out
+grep ' fake-fc .* --@95 .* sub/bar\.f95 ' out
+grep ' fake-fc .* --@03 .* hi\.f03 ' out
+grep ' fake-fc .* --@03 .* sub/howdy\.f03 ' out
+grep ' fake-fc .* --@08 .* greets\.f08 ' out
+grep ' fake-fc .* --@08 .* sub/bonjour\.f08 ' out
+grep ' fake-fc .* --gby .* --@95 .*[` ]bye\.f95 ' out
+grep ' fake-fc .* --gby .* --@90 .*[` ]sub/baz\.f90 ' out
+
+test $(grep -c '.*--gby.*\.f' out) -eq 2
+
+$EGREP 'fake-fc.*--@(95|03|08).*\.f90' out && exit 1
+$EGREP 'fake-fc.*--@(90|03|08).*\.f95' out && exit 1
+$EGREP 'fake-fc.*--@(90|95|08).*\.f03' out && exit 1
+$EGREP 'fake-fc.*--@(95|95|03).*\.f08' out && exit 1
 
 :
index 822edb8..2ef27ab 100755 (executable)
@@ -65,7 +65,7 @@ LDADD = $(FCLIBS)
 END
 
 $ACLOCAL
-$AUTOMAKE -a
+$AUTOMAKE -a -Wno-unsupported
 # The Fortran 77 linker should be preferred:
 grep '.\$(FCLINK)' Makefile.in && exit 1
 
index 0272706..7b9991b 100755 (executable)
@@ -75,7 +75,9 @@ END
 
 libtoolize --force
 $ACLOCAL
-$AUTOMAKE -a
+# FIXME: stop disabling the warnings in the 'unsupported' category
+# FIXME: once the 'subdir-objects' option has been mandatory.
+$AUTOMAKE -a -Wno-unsupported
 $AUTOCONF
 
 # This test requires Libtool >= 2.0.  Earlier Libtool does not
index 9b27c0b..258f6af 100755 (executable)
@@ -86,7 +86,9 @@ c_outputs='zardoz.c bar-quux.c sub/foo-zardoz.c sub/dir/quux.c'
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -a
+# FIXME: stop disabling the warnings in the 'unsupported' category
+# FIXME: once the 'subdir-objects' option has been mandatory.
+$AUTOMAKE -a -Wno-unsupported
 
 for vpath in : false; do
 
index fb8c194..5653280 100755 (executable)
@@ -28,6 +28,10 @@ AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
+# FIXME: stop disabling the warnings in the 'unsupported' category
+# FIXME: once the 'subdir-objects' option has been mandatory.
+AUTOMAKE_OPTIONS = -Wno-unsupported
+
 lib_LTLIBRARIES = lib0.la liba/liba.la
 lib0_la_SOURCES = 0.c
 liba_liba_la_SOURCES = liba/a.c
index b9670cb..bae3d49 100755 (executable)
@@ -35,6 +35,7 @@ lib_LTLIBRARIES = liba1.la sub/liba2.la
 pkglib_LTLIBRARIES = liba1.la
 nobase_lib_LTLIBRARIES = sub/liba2.la
 endif
+AUTOMAKE_OPTIONS = subdir-objects
 END
 
 libtoolize
index e58bba7..8c8098b 100755 (executable)
@@ -35,6 +35,8 @@ noinst_LTLIBRARIES = foo.la zoo.d/old2.la
 
 $(srcdir)/zoo_d_old2_la.c: $(srcdir)/old_la.c
        cp $(srcdir)/old_la.c $@
+
+AUTOMAKE_OPTIONS = -Wno-unsupported
 END
 
 cat > foo.c << 'END'
index fe9d7bd..c243ac7 100755 (executable)
@@ -27,6 +27,7 @@ AC_OUTPUT
 END
 
 cat >Makefile.am <<'END'
+AUTOMAKE_OPTIONS = subdir-objects
 nobase_lib_LTLIBRARIES = liba1.la sub/liba2.la sub/liba3.la liba4.la liba5.la
 sub_liba2_la_LIBADD = liba1.la
 sub_liba3_la_LIBADD = sub/liba2.la
index 64f103c..7b924a3 100755 (executable)
@@ -27,6 +27,7 @@ AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
 ## Note that automake should not match the '/test' part of 'sub/test' as
 ## '.test' suffix, nor the '/chk' part of 'sub/chk' as '.chk' suffix.
 TESTS = $(dist_TESTS) $(check_PROGRAMS)
index a010776..1054f18 100755 (executable)
@@ -29,7 +29,7 @@ AC_PROG_CC
 END
 
 $ACLOCAL
-$AUTOMAKE
+$AUTOMAKE -Wno-unsupported
 
 grep '^z\.o: x/z\.c$' Makefile.in
 
index 3e0c694..4f3d3b0 100755 (executable)
@@ -24,6 +24,7 @@ AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
 bin_PROGRAMS = zzfoo zzbar
 zzfoo_SOURCES = sub/foo.c
 zzbar_SOURCES = bar.c
index d16512a..22ab2d3 100755 (executable)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test of subdir objects with C.
+# Test of subdir objects with C and C++.
 
 . test-init.sh
 
-echo AC_PROG_CC >> configure.ac
+cat >> configure.ac <<'END'
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_YACC
+AC_CONFIG_FILES([sub/Makefile])
+END
+
+$ACLOCAL
+: > ylwrap
 
 cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS = subdir-objects
+SUBDIRS = sub
 bin_PROGRAMS = wish
-wish_SOURCES = generic/a.c generic/b.c
+wish_SOURCES = generic/a.c
+wish_SOURCES += another/z.cxx
 END
 
-$ACLOCAL
+mkdir sub
+cat > sub/Makefile.am << 'END'
+dream_SOURCES = generic/b.c more/r.y
+bin_PROGRAMS = dream
+END
+
+AUTOMAKE_fails
+grep "^Makefile\.am:3:.*'generic/a\.c'.* in a subdirectory" stderr
+grep "^Makefile\.am:[34]:.*'another/z\.cxx'.* in a subdirectory" stderr
+grep "^sub/Makefile\.am:1:.*'generic/b\.c'.* in a subdirectory" stderr
+grep "option 'subdir-objects' is disabled" stderr
+# Verbose tips should be given, but not too many times.
+for msg in \
+  "possible forward-incompatibility" \
+  "advi[sc]e.* 'subdir-objects' option throughout" \
+  "unconditionally.* object file.* same subdirectory" \
+; do
+  test $(grep -c "$msg" stderr) -eq 1
+done
+
+# Guard against stupid typos.
+grep 'subdir-object([^s]|$)' stderr && exit 1
+
+$AUTOMAKE -Wno-unsupported
+
+echo AUTOMAKE_OPTIONS = subdir-objects >> Makefile.am
+AUTOMAKE_fails
+grep "^Makefile\.am" stderr && exit 1
+grep "^sub/Makefile\.am:.*'generic/b\.c'.* in a subdirectory" stderr
+grep "option 'subdir-objects' is disabled" stderr
+
+sed 's/^AM_INIT_AUTOMAKE/&([subdir-objects])/' configure.ac > configure.tmp
+mv -f configure.tmp configure.ac
+$ACLOCAL --force
+$AUTOMAKE
+
 rm -f compile
 $AUTOMAKE --add-missing 2>stderr || { cat stderr >&2; exit 1; }
 cat stderr >&2
@@ -35,9 +79,12 @@ grep '^configure\.ac:4:.*install.*compile' stderr
 test -f compile
 
 grep '^generic/a\.\$(OBJEXT):' Makefile.in
-grep '[^/]a\.\$(OBJEXT)' Makefile.in && exit 1
+grep '^generic/b\.\$(OBJEXT):' sub/Makefile.in
+grep '^another/z\.\$(OBJEXT):' Makefile.in
+$EGREP '(^|[^/])[abz]\.\$(OBJEXT)' Makefile.in sub/Makefile.in && exit 1
 
 # Opportunistically test for a different bug.
-grep '^generic/b\.\$(OBJEXT):.*dirstamp' Makefile.in
+grep '^another/z\.\$(OBJEXT):.*dirstamp' Makefile.in
+grep '^generic/b\.\$(OBJEXT):.*dirstamp' sub/Makefile.in
 
 :
index 816f506..dbbed30 100755 (executable)
@@ -43,7 +43,7 @@ END
 : > d2/z.c
 
 $ACLOCAL
-$AUTOMAKE
+$AUTOMAKE -Wno-unsupported
 
 grep '\$(CC) .*\.\./d2/z\.c' d1/Makefile.in
 
index 5dc9ea8..de73cc2 100755 (executable)
@@ -25,6 +25,7 @@ AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
 bin_PROGRAMS = wish
 wish_SOURCES = foo.c generic/a.c
 END
index 639e415..9fc6761 100755 (executable)
@@ -49,7 +49,7 @@ mkdir lib/src
 
 cat >lib/configure.ac <<'EOF'
 AC_INIT([lib], [2.3])
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([subdir-objects])
 AC_PROG_RANLIB
 AC_PROG_YACC
 dnl This comes after YACC and RANLIB checks, deliberately.
index 6f59ac5..f9cdc74 100755 (executable)
@@ -62,7 +62,7 @@ mkdir lib/src
 
 cat >lib/configure.ac <<'EOF'
 AC_INIT([lib], [2.3])
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([subdir-objects])
 AC_CONFIG_MACRO_DIR([../m4])
 AM_PROG_AR
 AC_PROG_RANLIB
index 32356d7..b862d88 100755 (executable)
@@ -53,18 +53,9 @@ END
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
-./configure
-$MAKE
-
-$MAKE distcheck
-$MAKE distclean
-
-# Should also work without subdir-objects.
 
-sed '/subdir-objects/d' < Makefile.am > t
-mv -f t Makefile.am
-$AUTOMAKE
 ./configure
+
 $MAKE
 $MAKE distcheck
 
index 66fd243..f1ed99a 100755 (executable)
@@ -31,6 +31,7 @@ AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
 lib_LIBRARIES = libmu.a
 lib_LTLIBRARIES = src/libzardoz.la
 libmu_a_SOURCES = mu.vala mu2.c mu.vapi mu2.h
@@ -75,7 +76,7 @@ int main ()
 }
 END
 
-mkdir src
+mkdir -p src
 cat > src/zardoz-foo.vala << 'END'
 using GLib;
 public class Foo {
index 88d9d33..88f67a8 100755 (executable)
@@ -39,6 +39,7 @@ public class Zardoz {
 END
 
 cat > 'Makefile.am' <<'END'
+AUTOMAKE_OPTIONS = subdir-objects
 bin_PROGRAMS = src/zardoz
 src_zardoz_CFLAGS = $(GOBJECT_CFLAGS)
 src_zardoz_LDADD = $(GOBJECT_LIBS)
index 58a963c..3c5da22 100755 (executable)
@@ -34,7 +34,9 @@ mkdir sub
 : > sub/maude.y
 
 $ACLOCAL
-$AUTOMAKE -a
+# FIXME: stop disabling the warnings in the 'unsupported' category
+# FIXME: once the 'subdir-objects' option has been mandatory.
+$AUTOMAKE -a -Wno-unsupported
 
 grep '^maude\.c:.*maude\.y' Makefile.in
 
@@ -47,7 +49,6 @@ bin_PROGRAMS = maude
 maude_SOURCES = sub/maude.y
 END
 
-$ACLOCAL
 $AUTOMAKE -a
 
 # No rule needed, the default .y.c: inference rule is enough
@@ -64,8 +65,9 @@ maude_SOURCES = sub/maude.y
 maude_YFLAGS = -d
 END
 
-$ACLOCAL
-$AUTOMAKE -a
+# FIXME: stop disabling the warnings in the 'unsupported' category
+# FIXME: once the 'subdir-objects' option has been mandatory.
+$AUTOMAKE -a -Wno-unsupported
 
 # Rule should use maude_YFLAGS.
 grep 'AM_YFLAGS.*maude' Makefile.in && exit 1
index 9067a2d..b034af3 100755 (executable)
@@ -76,7 +76,9 @@ c_outputs='zardoz.c bar-quux.c sub/foo-zardoz.c sub/dir/quux.c'
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -a
+# FIXME: stop disabling the warnings in the 'unsupported' category
+# FIXME: once the 'subdir-objects' option has been mandatory.
+$AUTOMAKE -a -Wno-unsupported
 
 for vpath in : false; do