# HG changeset patch # User Thorsten Meyer # Date 1235457997 18000 # Node ID 538184c540a9aff2267d64ceae949f80aeb56899 # Parent 8b7e448d989cf018bbbf8e115f6201dd45aa8eb0 Add make target "configfiles" to automatically regenerate configuration files diff -r 8b7e448d989c -r 538184c540a9 ChangeLog --- a/ChangeLog Tue Feb 24 00:57:01 2009 -0500 +++ b/ChangeLog Tue Feb 24 01:46:37 2009 -0500 @@ -1,5 +1,16 @@ +2009-02-24 John W. Eaton + + * configure.in: Copy Makefile to build directory if not building + in srcdir. + 2009-02-24 Thorsten Meyer + * configure.in: AC_SUBST ac_config_files. + * Makeconf.in (config_opts): Define CONFIG_SUBDIRS variable. + * Makefile: Add make target for configuration files. + * octMakefile.in: Add make targets for configuration files, + config.status and configure. + * Makefile.in: Rename to Makefile. * configure.in: Remove Makefile from list of autogenerated configuration files. diff -r 8b7e448d989c -r 538184c540a9 Makeconf.in --- a/Makeconf.in Tue Feb 24 00:57:01 2009 -0500 +++ b/Makeconf.in Tue Feb 24 01:46:37 2009 -0500 @@ -260,6 +260,8 @@ # The arguments passed to configure. config_opts = @config_opts@ +CONFIG_SUBDIRS = @subdirs@ + # ==================== Where To Install Things ==================== # The default location for installation. Everything is placed in diff -r 8b7e448d989c -r 538184c540a9 Makefile --- a/Makefile Tue Feb 24 00:57:01 2009 -0500 +++ b/Makefile Tue Feb 24 01:46:37 2009 -0500 @@ -30,6 +30,9 @@ all: header-msg config-check $(MAKE) -f octMakefile all +configfiles: FORCE + $(MAKE) -f octMakefile configfiles + $(TARGETS): FORCE $(MAKE) -f octMakefile $@ @@ -103,6 +106,8 @@ @echo " scripts make all in subdirectory scripts" @echo " src make all in subdirectory src" @echo "" + @echo " configfiles update the configuration files" + @echo "" @echo " help print this message" @echo "" diff -r 8b7e448d989c -r 538184c540a9 configure.in --- a/configure.in Tue Feb 24 00:57:01 2009 -0500 +++ b/configure.in Tue Feb 24 01:46:37 2009 -0500 @@ -2102,6 +2102,12 @@ ### Do the substitutions in all the Makefiles. +AC_CONFIG_COMMANDS([Makefile], [if test "$ac_srcdir" != "."; then + cp $srcdir/Makefile . +fi]) + +AC_SUBST(ac_config_files) + AC_CONFIG_FILES([octMakefile Makeconf test/Makefile doc/Makefile doc/faq/Makefile doc/interpreter/Makefile doc/liboctave/Makefile doc/refcard/Makefile emacs/Makefile @@ -2116,6 +2122,7 @@ libcruft/ranlib/Makefile libcruft/slatec-fn/Makefile libcruft/slatec-err/Makefile libcruft/villad/Makefile libcruft/blas-xtra/Makefile libcruft/lapack-xtra/Makefile]) + AC_OUTPUT ### Print a summary so that important information isn't missed. diff -r 8b7e448d989c -r 538184c540a9 octMakefile.in --- a/octMakefile.in Tue Feb 24 00:57:01 2009 -0500 +++ b/octMakefile.in Tue Feb 24 01:46:37 2009 -0500 @@ -71,6 +71,10 @@ SHELL_SCRIPTS = octave-bug octave-config mkoctfile run-octave +CONFIG_FILES = @ac_config_files@ + +M4_FILES = $(wildcard *.m4) + all: $(SHELL_SCRIPTS) $(filter-out libcruft liboctave, $(SUBDIRS)) dist-info-files @echo "" @echo "Octave successfully built. Now choose from the following:" @@ -81,6 +85,22 @@ @echo "" .PHONY: all +configfiles: $(CONFIG_FILES) + for dir in $(CONFIG_SUBDIRS); do \ + $(MAKE) -C $$dir configfiles; \ + done +.PHONY: configfiles + +$(CONFIG_FILES): %: %.in config.status + ./config.status $@ + +config.status: configure + ./config.status --recheck + +configure: configure.in $(M4_FILES) + (cd $(top_srcdir); autoconf --force) + (cd $(top_srcdir); autoheader --force) + src: liboctave liboctave: libcruft diff -r 8b7e448d989c -r 538184c540a9 scripts/ChangeLog --- a/scripts/ChangeLog Tue Feb 24 00:57:01 2009 -0500 +++ b/scripts/ChangeLog Tue Feb 24 01:46:37 2009 -0500 @@ -1,3 +1,10 @@ +2009-02-08 Thorsten Meyer + + * configure.in: AC_SUBST ac_config_files + + * Makefile.in: Add make targets for configuration files + and config.status. + 2009-02-23 John W. Eaton * plot/fplot.m: Fix nargin check. diff -r 8b7e448d989c -r 538184c540a9 scripts/Makefile.in --- a/scripts/Makefile.in Tue Feb 24 00:57:01 2009 -0500 +++ b/scripts/Makefile.in Tue Feb 24 01:46:37 2009 -0500 @@ -52,9 +52,24 @@ FCN_FILES = # $(wildcard $(srcdir)/*.m) FCN_FILES_NO_DIR = # $(notdir $(FCN_FILES)) +CONFIG_FILES = @ac_config_files@ + all: $(SUBDIRS) DOCSTRINGS .PHONY: all +configfiles: $(CONFIG_FILES) +.PHONY: configfiles + +$(CONFIG_FILES): %: %.in config.status + ./config.status $@ + +config.status: configure + ./config.status --recheck + +configure: configure.in + if [ ! -f skip-autoconf ]; then autoconf --force; fi + if [ ! -f skip-autoheader ]; then autoheader --force; fi + $(SUBDIRS): $(MAKE) -C $@ all .PHONY: $(SUBDIRS) diff -r 8b7e448d989c -r 538184c540a9 scripts/configure.in --- a/scripts/configure.in Tue Feb 24 00:57:01 2009 -0500 +++ b/scripts/configure.in Tue Feb 24 01:46:37 2009 -0500 @@ -28,6 +28,7 @@ AC_PROG_INSTALL +AC_SUBST(ac_config_files) AC_CONFIG_FILES([Makefile audio/Makefile deprecated/Makefile elfun/Makefile \ general/Makefile geometry/Makefile help/Makefile image/Makefile \ io/Makefile linear-algebra/Makefile miscellaneous/Makefile \