From db51533e989372e38d0835c7b30e05f047204d80 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Thu, 19 Sep 2002 18:37:47 +0000 Subject: [PATCH] Use AC_CONFIG_FILES for each Makefile generated instead of passing 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 | 5 +++++ src/aclocal.m4 | 42 +++++++++++++++++++++--------------------- src/config/ChangeLog | 5 +++++ src/config/post.in | 2 +- 4 files changed, 32 insertions(+), 22 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index a6639e2e3..fbbffa6b9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2002-09-19 Ezra Peisach + + * 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 * aclocal.m4 (KRB5_AC_CHOOSE_SS): Check that the indicated system diff --git a/src/aclocal.m4 b/src/aclocal.m4 index aa2da119b..07b28dd05 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -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( ) 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_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 diff --git a/src/config/ChangeLog b/src/config/ChangeLog index a6b4e5f37..afca5f39f 100644 --- a/src/config/ChangeLog +++ b/src/config/ChangeLog @@ -1,3 +1,8 @@ +2002-09-19 Ezra Peisach + + * post.in (Makefile): Run config.status to generate only the + specific makefile that changed. + 2002-09-19 Ken Raeburn * post.in ($(srcdir)/$(thisconfigdir)/configure): Delete diff --git a/src/config/post.in b/src/config/post.in index ddd2e6661..c364da62d 100644 --- a/src/config/post.in +++ b/src/config/post.in @@ -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 \ -- 2.26.2