Use AC_CONFIG_FILES for each Makefile generated instead of passing
authorEzra Peisach <epeisach@mit.edu>
Thu, 19 Sep 2002 18:37:47 +0000 (18:37 +0000)
committerEzra Peisach <epeisach@mit.edu>
Thu, 19 Sep 2002 18:37:47 +0000 (18:37 +0000)
list of files to AC_OUTPUT.

Also, only generate an individual Makefile when invoking config.status

ticket: 1188

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14883 dc483132-0cff-0310-8789-dd5450dbe970

src/ChangeLog
src/aclocal.m4
src/config/ChangeLog
src/config/post.in

index a6639e2e3d289e90a55d6d9e28be883477f607c6..fbbffa6b940efc2c3d3bd9d8a8c8c4cab027781e 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-19  Ezra Peisach  <epeisach@bu.edu>
+
+       * aclocal.m4 (K5_AC_OUTPUT, K5_GEN_MAKEFILE, K5_GEN_FILE): Rewrite
+       to use AC_CONFIG_FILES. Remove unused V5_OUTPUT_MAKEFILE.
+
 2002-09-19  Ken Raeburn  <raeburn@mit.edu>
 
        * aclocal.m4 (KRB5_AC_CHOOSE_SS): Check that the indicated system
index aa2da119bcfcfa634c151260bf93b6ee10ae1056..07b28dd052f82bc57c1f53b641ad1453a389311e 100644 (file)
@@ -534,32 +534,32 @@ dnl
 dnl K5_GEN_MAKEFILE([dir, [frags]])
 dnl
 define(K5_GEN_MAKEFILE,[dnl
-ifelse($1, , x=., x="$1")
-appendlist=''
-ifelse($2, , ,[dnl
-for i in $2
-do
-       appendlist=$appendlist:$ac_config_fragdir/$i.in
-done])
-krb5_output_list="$krb5_output_list $x/Makefile:$krb5_pre_in:$x/Makefile.in$appendlist:$krb5_post_in"])dnl
+ifelse($1, ,[_K5_GEN_MAKEFILE(.,$2)],[_K5_GEN_MAKEFILE($1,$2)])
+])
+dnl
+dnl _K5_GEN_MAKEFILE(dir, [frags])
+dnl  dir must be present in this case
+dnl  Note: Be careful in quoting. 
+dnl        The ac_foreach generates the list of fragments to include
+dnl        or "" if $2 is empty
+define(_K5_GEN_MAKEFILE,[dnl
+AC_CONFIG_FILES([$1/Makefile:$krb5_pre_in:$1/Makefile.in]AC_FOREACH([FRAG], [$2], :$ac_config_fragdir/[FRAG].in)[:$krb5_post_in])
+])
 dnl
 dnl K5_GEN_FILE( <ac_output arguments> )
 dnl
-define(K5_GEN_FILE,[krb5_output_list="$krb5_output_list $1"])dnl
+define(K5_GEN_FILE,[AC_CONFIG_FILES($1)])dnl
 dnl
 dnl K5_AC_OUTPUT
+dnl    Note: Adds the variables to config.status for individual 
+dnl          Makefile generation from config.statsu
+define(K5_AC_OUTPUT,[dnl
+AC_CONFIG_COMMANDS([krb5_config_prefix], [], dnl
+ [krb5_pre_in=$krb5_pre_in
+ ac_config_fragdir=$ac_config_fragdir
+ krb5_post_in=$krb5_post_in])
+AC_OUTPUT])dnl
 dnl
-define(K5_AC_OUTPUT,[AC_OUTPUT($krb5_output_list)])dnl
-dnl
-dnl V5_OUTPUT_MAKEFILE
-dnl
-define(V5_AC_OUTPUT_MAKEFILE,
-[ifelse($1, , ac_v5_makefile_dirs=., ac_v5_makefile_dirs="$1")
-ifelse($2, , filelist="", filelist="$2")
-for x in $ac_v5_makefile_dirs; do
-  filelist="$filelist $x/Makefile:$krb5_prepend_frags:$x/Makefile.in:$krb5_append_frags"
-done
-AC_OUTPUT($filelist)])dnl
 dnl
 dnl KRB5_SOCKADDR_SA_LEN: define HAVE_SA_LEN if sockaddr contains the sa_len
 dnl component
@@ -709,7 +709,7 @@ AC_TRY_RUN([
 #include <regex.h>
 regex_t x; regmatch_t m;
 int main() { return regcomp(&x,"pat.*",0) || regexec(&x,"pattern",1,&m,0); }
-], ac_cv_func_regcomp=yes, ac_cv_func_regcomp=no, AC_ERROR([Cannot test regcomp when cross compiling]))])
+], ac_cv_func_regcomp=yes, ac_cv_func_regcomp=no, AC_MSG_ERROR([Cannot test regcomp when cross compiling]))])
 AC_MSG_RESULT($ac_cv_func_regcomp)
 test $ac_cv_func_regcomp = yes && AC_DEFINE(HAVE_REGCOMP,1,[Define if regcomp exists and functions])
 dnl
index a6b4e5f37bb1f5fa288f6c6c9a1a4cea868df1e9..afca5f39f372cb7959863aa275f1210f0ed14339 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-19  Ezra Peisach  <epeisach@bu.edu>
+
+       * post.in (Makefile): Run config.status to generate only the
+       specific makefile that changed.
+
 2002-09-19  Ken Raeburn  <raeburn@mit.edu>
 
        * post.in ($(srcdir)/$(thisconfigdir)/configure): Delete
index ddd2e6661c38cc06e02dbd45dfd811a8bdcb0088..c364da62d11a014799fef8d331f0363dd4d9e56d 100644 (file)
@@ -89,7 +89,7 @@ Makefiles-prerecurse:: Makefile
 
 Makefile: $(srcdir)/Makefile.in $(thisconfigdir)/config.status \
                $(SRCTOP)/config/pre.in $(SRCTOP)/config/post.in
-       cd $(thisconfigdir) && $(SHELL) config.status
+       cd $(thisconfigdir) && $(SHELL) config.status $(mydir)/Makefile
 $(thisconfigdir)/config.status: $(srcdir)/$(thisconfigdir)/configure
        cd $(thisconfigdir) && $(SHELL) config.status --recheck
 $(srcdir)/$(thisconfigdir)/configure: $(srcdir)/$(thisconfigdir)/configure.in \