From 1df0f3fe717db7c0e77f002552866ccc39aeb863 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Mon, 5 Nov 2001 17:26:54 +0000 Subject: [PATCH] * automake.in (handle_single_transform_list): Don't call $lang->target_hook for undefinied langages. * tests/suffix4.test: New test. * tests/Makefile.am (TESTS): Add suffix4.test. Reported by Dmitry Mikhin . --- ChangeLog | 10 +++++++++- THANKS | 1 + automake.in | 6 ++++-- tests/Makefile.am | 1 + tests/suffix4.test | 22 ++++++++++++++++++++++ 5 files changed, 37 insertions(+), 3 deletions(-) create mode 100755 tests/suffix4.test diff --git a/ChangeLog b/ChangeLog index 5bf05658..5afc7966 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2001-11-01 Alexandre Duret-Lutz + + * automake.in (handle_single_transform_list): Don't call + $lang->target_hook for undefinied langages. + * tests/suffix4.test: New test. + * tests/Makefile.am (TESTS): Add suffix4.test. + Reported by Dmitry Mikhin . + 2001-11-05 Akim Demaille * automake.in (@common_sometimes, &handle_configure): No longer @@ -20,7 +28,7 @@ 2001-10-31 Alexandre Duret-Lutz * m4/gcj.m4 (AM_PROG_GCJ): Define GCJFLAGS if unset. - Reported by Olivier Louchart-Fletcher . + Reported by Olivier Louchart-Fletcher . 2001-10-30 Akim Demaille diff --git a/THANKS b/THANKS index f2ecb56d..3198aeec 100644 --- a/THANKS +++ b/THANKS @@ -34,6 +34,7 @@ David A. Swierczek swiercze@mr.med.ge.com David Zaroski cz253@cleveland.Freenet.Edu Derek R. Price derek.price@openavenue.com Dieter Baron dillo@stieltjes.smc.univie.ac.at +Dmitry Mikhin dmitrym@acres.com.au Doug Evans devans@cygnus.com Eleftherios Gkioulekas lf@amath.washington.edu Elrond Elrond@Wunder-Nett.org diff --git a/automake.in b/automake.in index d45a8d2d..b436e639 100755 --- a/automake.in +++ b/automake.in @@ -1892,8 +1892,10 @@ sub handle_single_transform_list ($$$$@) } } - # Let the language do some special magic if required. - $lang->target_hook ($aggregate, $object, $full); + if (defined $lang) { + # Let the language do some special magic if required. + $lang->target_hook ($aggregate, $object, $full); + } if ($derived_source) { diff --git a/tests/Makefile.am b/tests/Makefile.am index d452e94c..c195075f 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -288,6 +288,7 @@ substtarg.test \ suffix.test \ suffix2.test \ suffix3.test \ +suffix4.test \ symlink.test \ symlink2.test \ symlink3.test \ diff --git a/tests/suffix4.test b/tests/suffix4.test new file mode 100755 index 00000000..3bac120b --- /dev/null +++ b/tests/suffix4.test @@ -0,0 +1,22 @@ +#! /bin/sh + +# Test to make sure Automake doesn't abort on user-defined extensions. +# Based on a report from Dmitry Mikhin . + +# Also make sure that .SUFFIXES is automatically adjusted with +# extensions from implicit rules. + +. $srcdir/defs || exit 1 + +cat > Makefile.am << 'END' +.k.o: + echo $< > $@ + +bin_PROGRAMS = foo +foo_SOURCES = foo.k +END + +$ACLOCAL || exit 1 +$AUTOMAKE --Wno-error || exit 1 +grep '.SUFFIXES:.*\.k' Makefile.in || exit 1 +exit 0 -- 2.43.5