[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
55-aclocal-m4-in-configure-am.patch
From: |
Akim Demaille |
Subject: |
55-aclocal-m4-in-configure-am.patch |
Date: |
Mon, 19 Mar 2001 10:21:18 +0100 |
Index: ChangeLog
from Akim Demaille <address@hidden>
* automake.in (&handle_aclocal_m4): Rename as...
(&scan_aclocal_m4): this.
Return the list of aclocal.m4 dependencies.
(&handle_configure): Invoke it, and use it when loading...
* configure.am: Template the rules to recreate aclocal.m4.
Index: Makefile.in
--- Makefile.in Sun, 11 Mar 2001 20:39:39 +0100 akim (am/h/16_Makefile.i 1.48
644)
+++ Makefile.in Sun, 11 Mar 2001 20:53:32 +0100 akim (am/h/16_Makefile.i 1.48
644)
@@ -156,8 +156,9 @@
$(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4)
$(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4): configure.in
- cd $(srcdir) && $(ACLOCAL)
+
+$(ACLOCAL_M4): configure.in
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
automake: $(top_builddir)/config.status automake.in
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= CONFIG_LINKS=
$(SHELL) ./config.status
aclocal: $(top_builddir)/config.status aclocal.in
Index: automake.in
--- automake.in Sun, 11 Mar 2001 20:39:39 +0100 akim (am/f/39_automake.i 1.174
755)
+++ automake.in Sun, 11 Mar 2001 20:53:04 +0100 akim (am/f/39_automake.i 1.174
755)
@@ -3246,8 +3246,12 @@ sub handle_subdirs
$output_rules .= &file_contents ('subdirs');
}
-# Handle aclocal.m4.
-sub handle_aclocal_m4
+
+# @DEPENDENCIES
+# &scan_aclocal_m4
+# ----------------
+# If aclocal.m4 creation is automated, return the list of its dependencies.
+sub scan_aclocal_m4
{
my $regen_aclocal = 0;
if (-f 'aclocal.m4')
@@ -3275,55 +3279,46 @@ sub handle_aclocal_m4
$acinclude = 1;
}
+ return ()
+ unless $regen_aclocal;
+
# Note that it might be possible that aclocal.m4 doesn't exist but
# should be auto-generated. This case probably isn't very
# important.
- if ($regen_aclocal)
- {
- my @ac_deps = (($seen_maint_mode ? "address@hidden@": "") ,
- $configure_ac,
- ($acinclude ? ' acinclude.m4' : ''));
+ my @ac_deps = ($acinclude ? ' acinclude.m4' : '');
- if (&variable_defined ('ACLOCAL_M4_SOURCES'))
- {
- push (@ac_deps, "\$(ACLOCAL_M4_SOURCES)");
- }
- elsif (&variable_defined ('ACLOCAL_AMFLAGS'))
+ if (&variable_defined ('ACLOCAL_M4_SOURCES'))
+ {
+ push (@ac_deps, '$(ACLOCAL_M4_SOURCES)');
+ }
+ elsif (&variable_defined ('ACLOCAL_AMFLAGS'))
+ {
+ # Scan all -I directories for m4 files. These are our
+ # dependencies.
+ my $examine_next = 0;
+ foreach my $amdir (&variable_value_as_list ('ACLOCAL_AMFLAGS', ''))
{
- # Scan all -I directories for m4 files. These are our
- # dependencies.
- my $examine_next = 0;
- foreach my $amdir (&variable_value_as_list ('ACLOCAL_AMFLAGS', ''))
+ if ($examine_next)
{
- if ($examine_next)
+ $examine_next = 0;
+ if ($amdir !~ /^\// && -d $amdir)
{
- $examine_next = 0;
- if ($amdir !~ /^\// && -d $amdir)
+ foreach my $ac_dep (&my_glob ($amdir . '/*.m4'))
{
- foreach my $ac_dep (&my_glob ($amdir . '/*.m4'))
- {
- $ac_dep =~ s/^\.\/+//;
- push (@ac_deps, $ac_dep)
- unless $ac_dep eq "aclocal.m4"
- || $ac_dep eq "acinclude.m4";
- }
+ $ac_dep =~ s/^\.\/+//;
+ push (@ac_deps, $ac_dep)
+ unless $ac_dep eq "aclocal.m4"
+ || $ac_dep eq "acinclude.m4";
}
}
- elsif ($amdir eq '-I')
- {
- $examine_next = 1;
- }
+ }
+ elsif ($amdir eq '-I')
+ {
+ $examine_next = 1;
}
}
-
- &pretty_print_rule ("\$(ACLOCAL_M4):", "\t\t", @ac_deps);
-
- $output_rules .= ("\t"
- . 'cd $(srcdir) && $(ACLOCAL)'
- . (&variable_defined ('ACLOCAL_AMFLAGS')
- ? ' $(ACLOCAL_AMFLAGS)' : '')
- . "\n");
}
+ return @ac_deps;
}
# Rewrite a list of input files into a form suitable to put on a
@@ -3380,6 +3375,15 @@ sub handle_configure
my @rewritten = &rewrite_inputs_into_dependencies (1, @secondary_inputs);
+ my @aclocal_m4_deps;
+ if ($relative_dir eq '.')
+ {
+ @aclocal_m4_deps = &scan_aclocal_m4 ();
+ &examine_variable ('CONFIG_STATUS_DEPENDENCIES');
+ &examine_variable ('CONFIGURE_DEPENDENCIES');
+ }
+
+
$output_rules .=
&file_contents ('configure',
('MAKEFILE'
@@ -3400,11 +3404,12 @@ sub handle_configure
'USE-DEPS'
=> $cmdline_use_dependencies ? '' : ' --ignore-deps',
'MAKEFILE-AM-SOURCES'
- => "$input$colon_infile"));
+ => "$input$colon_infile",
+ 'ACLOCAL_M4_DEPS'
+ => join (' ', @aclocal_m4_deps)));
if ($relative_dir eq '.')
{
- &handle_aclocal_m4;
&examine_variable ('CONFIG_STATUS_DEPENDENCIES');
&examine_variable ('CONFIGURE_DEPENDENCIES');
Index: configure.am
--- configure.am Sun, 11 Mar 2001 20:39:39 +0100 akim (am/h/32_configure. 1.5
644)
+++ configure.am Sun, 11 Mar 2001 20:53:47 +0100 akim (am/h/32_configure. 1.5
644)
@@ -34,9 +34,9 @@
-## ----------------------- ##
-## Bulding config.status. ##
-## ----------------------- ##
+## --------------- ##
+## config.status. ##
+## --------------- ##
if %?TOPDIR_P%
## Explicitly look in srcdir for benefit of non-GNU makes.
@@ -45,4 +45,15 @@
## Explicitly look in srcdir for benefit of non-GNU makes.
$(srcdir)/configure: %MAINTAINER-MODE% $(srcdir)/%CONFIGURE-AC% $(ACLOCAL_M4)
$(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
+endif %?TOPDIR_P%
+
+
+
+## ------------ ##
+## aclocal.m4. ##
+## ------------ ##
+
+if %?TOPDIR_P%
+$(ACLOCAL_M4): %MAINTAINER-MODE% %CONFIGURE-AC% %ACLOCAL_M4_DEPS%
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
endif %?TOPDIR_P%
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 55-aclocal-m4-in-configure-am.patch,
Akim Demaille <=