[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
subobj8.test: using subdir-objects in a subdirectory
From: |
Alexandre Duret-Lutz |
Subject: |
subobj8.test: using subdir-objects in a subdirectory |
Date: |
16 Jul 2001 11:26:57 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
The test case below shows that if the `subdir-objects' options
is used from within a subdirectory (to build files from deeper
directories), then Automake does not require `compile'.
I've played with the following instruction from lanc_c_rewrite:
&require_file ($FOREIGN, 'compile')
if $relative_dir eq '.';
but if I simply rewrite it to
&require_file ($FOREIGN, 'compile');
it will install `compile' as `foo/compile' while I expected it
would be installed as `tools/compile'.
Note that another related issue, not tested here, is that
AM_PROG_CC_C_O is not AUX_DIR-aware: it relies on `compile'
beeing installed as `$top_srcdir/compile' :(
Index: ChangeLog
from Alexandre Duret-Lutz <address@hidden>
* tests/subobj8.test: New file.
* tests/Makefile.am (XFAIL_TESTS, TESTS): Add subobj8.test.
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.322
diff -u -r1.322 Makefile.am
--- tests/Makefile.am 2001/07/15 21:55:07 1.322
+++ tests/Makefile.am 2001/07/16 09:12:34
@@ -1,6 +1,6 @@
## Process this file with automake to create Makefile.in
-XFAIL_TESTS = subdir5.test
+XFAIL_TESTS = subdir5.test subobj8.test
TESTS = \
acinclude.test \
@@ -264,6 +264,7 @@
subobj5.test \
subobj6.test \
subobj7.test \
+subobj8.test \
subst.test \
suffix.test \
suffix2.test \
Index: tests/subobj8.test
===================================================================
RCS file: subobj8.test
diff -N subobj8.test
--- /dev/null Tue May 5 13:32:27 1998
+++ tests/subobj8.test Mon Jul 16 02:12:34 2001
@@ -0,0 +1,30 @@
+#! /bin/sh
+
+# Make sure `compile' is included when subdir-objects is used in a subdir.
+
+. $srcdir/defs || exit 1
+
+cat > configure.in << 'END'
+AC_INIT(Makefile.am)
+AC_CONFIG_AUX_DIR(tools)
+AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_OUTPUT(Makefile foo/Makefile)
+END
+
+mkdir tools foo foo/bar
+
+cat > Makefile.am << 'END'
+SUBDIRS = foo
+END
+
+cat > foo/Makefile.am << 'EOF'
+AUTOMAKE_OPTIONS = subdir-objects
+bin_PROGRAMS = mumble
+mumble_SOURCES = bar/a.c
+EOF
+
+$ACLOCAL || exit 1
+$AUTOMAKE --add-missing || exit 1
+test -f tools/compile || exit 1
--
Alexandre Duret-Lutz
- subobj8.test: using subdir-objects in a subdirectory,
Alexandre Duret-Lutz <=