[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
1-gary-scan-ac-config-libobj-dir.patch
From: |
Gary V. Vaughan |
Subject: |
1-gary-scan-ac-config-libobj-dir.patch |
Date: |
Thu, 31 Jul 2003 18:05:01 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20030718 |
Automakers:
I thought I would have a play with the single makefile support using
automake-1.7.6, but tripped over buggy support for LIBOBJS in subdirs. This
patch takes note of a AC_CONFIG_LIBOBJ_DIR declaration, and at least looks in
the right directory for LIBOBJ files without bailing out.
There are a couple of other problems my perl-fu is inadequate to resolve:
i) No compile rule for LIBOBJ sources is generated in Makefile.in
ii) No dependencies are generated (the dep file says #dummy)
iii) The compiled objects are dropped in the $top_builddir -- no good if two
dirs each contain files with the same name.
I'll generate a minimal example tarball and post here if that is useful?
Maybe the following is enough...
Something like this in configure.ac:
AC_INIT([GNU m4], [1.4q], address@hidden)
AC_CONFIG_SRCDIR([src/m4.h])
AC_CONFIG_LIBOBJ_DIR([m4])
AM_INIT_AUTOMAKE([1.7.1 dist-bzip2])
AC_REPLACE_FUNCS([xstrzdup])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
And in Makefile.am:
lib_LIBRARIES = m4/libm4.a
m4_libm4_a_LIBADD = $(LIBOBJS)
Before this patch, when running 'automake -fa' I get:
Makefile.am:3: required file `./xstrzdup.c' not found
After applying this patch m4/xstrzdup.c is found correctly, but now when
running make I get:
make[2]: *** No rule to make target `xstrzdup.o', needed by `libm4.a'. Stop.
Cheers,
Gary.
--
())_. Gary V. Vaughan gary@(oranda.demon.co.uk|gnu.org)
( '/ Research Scientist http://www.oranda.demon.co.uk ,_())____
/ )= GNU Hacker http://www.gnu.org/software/libtool \' `&
`(_~)_ Tech' Author http://sources.redhat.com/autobook =`---d__/
from Gary V, Vaughan <address@hidden>
* automake.in (config_libobj_files_location): New variable.
(handle_lib_objects_cond): Use it when checking for presence
of AC_LIBSOURCE declared files.
(scan_autoconf_traces): Set config_libobj_files_location if an
invocation of AC_CONFIG_LIBOBJ_DIR is found.
--- automake.in.orig 2003-07-10 21:51:00.000000000 +0100
+++ automake.in 2003-07-31 15:50:20.000000000 +0100
@@ -344,6 +344,9 @@
# Where AC_CONFIG_HEADER appears.
my $config_header_location;
+# Mhere AC_LIBSOURCE can find its libobjs.
+my $config_libobj_files_location = '';
+
# Directory where output files go. Actually, output files are
# relative to this directory.
my $output_directory;
@@ -3059,7 +3062,8 @@
&variable_value_as_list_recursive (
'BUILT_SOURCES', 'all')))
{
- require_file_with_macro ($cond, $var, FOREIGN, $iter);
+ require_file_with_macro ($cond, $var, FOREIGN,
+ "$config_libobj_files_location" . $iter);
}
}
}
@@ -5264,6 +5268,7 @@
AC_CONFIG_AUX_DIR => 1,
AC_CONFIG_FILES => 1,
AC_CONFIG_HEADERS => 1,
+ AC_CONFIG_LIBOBJ_DIR => 1,
AC_INIT => 0,
AC_LIBSOURCE => 1,
AC_SUBST => 1,
@@ -5332,6 +5337,10 @@
$config_header_location = $here;
push @config_headers, split (' ', $args[1]);
}
+ elsif ($macro eq 'AC_CONFIG_LIBOBJ_DIR')
+ {
+ $config_libobj_files_location = "$args[1]/";
+ }
elsif ($macro eq 'AC_INIT')
{
if (defined $args[2])
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 1-gary-scan-ac-config-libobj-dir.patch,
Gary V. Vaughan <=