[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Running a plain ./config.status at top level
From: |
Akim Demaille |
Subject: |
Re: Running a plain ./config.status at top level |
Date: |
Wed, 09 Apr 2003 09:15:30 +0200 |
User-agent: |
Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.2 (gnu/linux) |
| Given your rationale, shouldn't this be just
|
| $(SHELL) ./config.status
|
| am__depfiles_maybe may have the value 'depfiles', in which case it
| would only run the 'depfiles' command, not what you want.
Ah, OK, thanks for the explanation!
Well, I updated my patch to make it dynamic: now, on my source tree,
if I
touch Makefile.am
=> automake Makefile
=> ./config.status Makefile
and if I
touch configure.ac
=> automake
=> ./config.status
make check is running.
--- lib/am/configure.am.orig 2003-04-08 18:01:33.000000000 +0200
+++ lib/am/configure.am 2003-04-09 09:11:55.000000000 +0200
@@ -1,5 +1,5 @@
## automake - create Makefile.in from Makefile.am
-## Copyright 2001
+## Copyright (C) 2001, 2003
## Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
@@ -23,14 +23,34 @@
## This rule remakes the Makefile.in.
%MAKEFILE-IN%: %MAINTAINER-MODE% %MAKEFILE-AM% %MAKEFILE-IN-DEPS%
$(top_srcdir)/%CONFIGURE-AC% $(ACLOCAL_M4)
- cd $(top_srcdir) && \
- $(AUTOMAKE) --%STRICTNESS% %USE-DEPS% %MAKEFILE-AM-SOURCES%
+## If Makefile.in is to be updated because of configure.ac, all the
+## Makefile.in are to be updated; it is then more efficient to run
+## automake on all the Makefiles at once.
+ newest=`ls -1dt %MAKEFILE-IN% $(top_srcdir)/%CONFIGURE-AC% 2>/dev/null
| sed 1q`; \
+ if test $$newest != %MAKEFILE-IN%; then \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --%STRICTNESS% %USE-DEPS%; \
+ else \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --%STRICTNESS% %USE-DEPS% %MAKEFILE-AM-SOURCES%; \
+ fi
## This rule remakes the Makefile.
%MAKEFILE%: %MAINTAINER-MODE% %MAKEFILE-IN% %MAKEFILE-DEPS%
$(top_builddir)/config.status
+## If Makefile is to be updated because of config.status, then run
+## config.status without argument in order to (i) rerun all the
+## AC_CONFIG_COMMANDS including those that are not visible to
+## Automake, and (ii) to save time by running config.status all with
+## all the files, instead of once per file.
+ newest=`ls -1dt %MAKEFILE% $(top_builddir)/config.status 2>/dev/null |
sed 1q`; \
+ if test $$newest != %MAKEFILE%; then \
+ $(SHELL) ./config.status; \
+ else \
## FIXME: $(am__depfiles_maybe) lets us re-run the rule to create the
## .P files. Ideally we wouldn't have to do this by hand.
- cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE%
$(am__depfiles_maybe)
+ cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE%
$(am__depfiles_maybe) ; \
+ fi
+
## --------------------------- ##
## config.status & configure. ##
Re: Running a plain ./config.status at top level, Alexandre Duret-Lutz, 2003/04/09