automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

superfluous link rule for unknown languages


From: Alexandre Duret-Lutz
Subject: superfluous link rule for unknown languages
Date: 04 Jul 2001 18:33:04 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

When given this Makefile.am:

| bin_PROGRAMS = meal
| meal_SOURCES = beans.veg beef.meat
| 
| meal: beans.veg beef.meat
|        cat beans.veg beef.meat > meal

Automake 1.4i will output a Makefile.in which looks as follow:

...
| meal$(EXEEXT): $(meal_OBJECTS) $(meal_DEPENDENCIES)
|         @rm -f meal$(EXEEXT)
|         $(LINK) $(meal_LDFLAGS) $(meal_OBJECTS) $(meal_LDADD) $(LIBS)
...
| meal: beans.veg beef.meat
|         cat beans.veg beef.meat > meal
...

while Automake 1.4 behavior is to emit only the second rule.
(This sounds more natural to me: if automake doesn't know how to
link something it should let the user do this himself.) 

Besides, Automake 1.4i's Makefile.in uses $(LINK) which is undefined.

I'm sorry I don't have the time to dig this.  At least, here is
a test case.

Index: ChangeLog
from  Alexandre Duret-Lutz  <address@hidden>

        * tests/nolink.test: New file.
        * tests/Makefile.am (TEST, XFAIL_TESTS): Add nolink.test.

Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.319
diff -u -r1.319 Makefile.am
--- tests/Makefile.am 2001/07/03 04:19:36 1.319
+++ tests/Makefile.am 2001/07/04 16:11:54
@@ -1,6 +1,6 @@
 ## Process this file with automake to create Makefile.in
 
-XFAIL_TESTS = subdir5.test
+XFAIL_TESTS = nolink.test subdir5.test
 
 TESTS =        \
 acinclude.test \
@@ -195,6 +195,7 @@
 nodist.test \
 noinst.test \
 noinstdir.test \
+nolink.test \
 nostdinc.test \
 number.test \
 obsolete.test \
Index: tests/nolink.test
===================================================================
RCS file: nolink.test
diff -N nolink.test
--- /dev/null   Tue May  5 13:32:27 1998
+++ tests/nolink.test Wed Jul 4 09:11:54 2001
@@ -0,0 +1,26 @@
+#! /bin/sh
+
+# Make sure Automake does not emit a link rule for unknown languages.
+
+. $srcdir/defs || exit 1
+
+cat >> configure.in << 'END'
+AC_INIT
+AM_INIT_AUTOMAKE([meal],[123])
+AC_OUTPUT([Makefile])
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = meal
+meal_SOURCES = beans.veg beef.meat
+
+meal: beans.veg beef.meat
+       cat beans.veg beef.meat > meal
+END
+
+$ACLOCAL || exit 1
+$AUTOMAKE || exit 1
+
+grep '^meal.*:' Makefile.in | grep -v beef.meat && exit 1
+
+exit 0

-- 
Alexandre Duret-Lutz





reply via email to

[Prev in Thread] Current Thread [Next in Thread]