From f39156643cd954d8bd35693574c57efde4fb274b Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Sat, 27 Sep 2003 00:16:16 +0000 Subject: [PATCH] Add --enable-maintainer-mode option to configure, and prevent rebuilding of include/krb5/autoconf.h.in and */configure if it's not enabled. Anything else we should only rebuild in maintainer mode? * aclocal.m4 (KRB5_AC_MAINTAINER_MODE): New macro. (CONFIG_RULES): Invoke it. * config/post.in (configure): Make configure depend on configure.in and aclocal.m4 only if maintainer mode is enabled. * include/Makefile.in ($(srcdir)/krb5/autoconf.h.in): Depend on autoconf.stmp only if maintainer mode is enabled. ticket: 1588 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15825 dc483132-0cff-0310-8789-dd5450dbe970 --- src/ChangeLog | 5 +++++ src/aclocal.m4 | 23 +++++++++++++++++++++++ src/config/ChangeLog | 5 +++++ src/config/post.in | 2 +- src/include/ChangeLog | 5 +++++ src/include/Makefile.in | 2 +- 6 files changed, 40 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 43a57c215..db152f3c3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-09-26 Ken Raeburn + + * aclocal.m4 (KRB5_AC_MAINTAINER_MODE): New macro. + (CONFIG_RULES): Invoke it. + 2003-08-29 Ken Raeburn * aclocal.m4 (KRB5_AC_NEED_DAEMON): New macro. diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 2e28b69ef..5757a7dec 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -62,6 +62,7 @@ AC_DEFINE([KRB5_DEPRECATED], 1, [Define only if building in-tree]) AC_C_CONST dnl WITH_NETLIB dnl WITH_HESIOD dnl +KRB5_AC_MAINTAINER_MODE dnl AC_ARG_PROGRAM dnl dnl dnl This selects the correct autoconf file; either the one in our source tree, @@ -100,6 +101,28 @@ libobj_frag=$srcdir/$ac_config_fragdir/libobj.in AC_SUBST_FILE(libobj_frag) ])dnl +dnl Maintainer mode, akin to what automake provides, 'cept we don't +dnl want to use automake right now. +AC_DEFUN([KRB5_AC_MAINTAINER_MODE], +[AC_ARG_ENABLE([maintainer-mode], +[ --enable-maintainer-mode + enable rebuilding of source files etc], +USE_MAINTAINER_MODE=$enableval, +USE_MAINTAINER_MODE=no) +if test "$USE_MAINTAINER_MODE" = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' + AC_MSG_NOTICE(enabling maintainer mode) +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi +MAINT=$MAINTAINER_MODE_TRUE +AC_SUBST(MAINTAINER_MODE_TRUE) +AC_SUBST(MAINTAINER_MODE_FALSE) +AC_SUBST(MAINT) +]) + dnl This is somewhat gross and should go away when the build system dnl is revamped. -- tlyu dnl DECLARE_SYS_ERRLIST - check for sys_errlist in libc diff --git a/src/config/ChangeLog b/src/config/ChangeLog index a65196668..5662cb909 100644 --- a/src/config/ChangeLog +++ b/src/config/ChangeLog @@ -1,3 +1,8 @@ +2003-09-26 Ken Raeburn + + * post.in (configure): Make configure depend on configure.in and + aclocal.m4 only if maintainer mode is enabled. + 2003-09-13 Ken Raeburn * shlib.conf (*-*-linux*): Use $(CC) for linking shared libraries, diff --git a/src/config/post.in b/src/config/post.in index d42c2d213..1401a80ef 100644 --- a/src/config/post.in +++ b/src/config/post.in @@ -145,7 +145,7 @@ Makefile: $(srcdir)/Makefile.in $(thisconfigdir)/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 \ +$(srcdir)/$(thisconfigdir)/configure: @MAINT@ $(srcdir)/$(thisconfigdir)/configure.in \ $(SRCTOP)/aclocal.m4 -$(RM) -r $(srcdir)/$(thisconfigdir)/autom4te.cache cd $(srcdir)/$(thisconfigdir) && \ diff --git a/src/include/ChangeLog b/src/include/ChangeLog index 4614d3a14..0b0ed7d99 100644 --- a/src/include/ChangeLog +++ b/src/include/ChangeLog @@ -1,3 +1,8 @@ +2003-09-26 Ken Raeburn + + * Makefile.in ($(srcdir)/krb5/autoconf.h.in): Depend on + autoconf.stmp only if maintainer mode is enabled. + 2003-09-12 Ken Raeburn * configure.in: Check for setsid() and . diff --git a/src/include/Makefile.in b/src/include/Makefile.in index ed18ca3c9..a7fb55772 100644 --- a/src/include/Makefile.in +++ b/src/include/Makefile.in @@ -26,7 +26,7 @@ maybe-make-db.h-redirect: krb5/autoconf.h: $(srcdir)/krb5/autoconf.h.in (cd krb5; $(MAKE) autoconf.h) -$(srcdir)/krb5/autoconf.h.in: $(srcdir)/krb5/autoconf.stmp +$(srcdir)/krb5/autoconf.h.in: @MAINT@ $(srcdir)/krb5/autoconf.stmp $(srcdir)/krb5/autoconf.stmp: $(srcdir)/configure.in cd $(srcdir) && ($(AUTOHEADER) --include=$(CONFIG_RELTOPDIR) $(AUTOHEADERFLAGS) || $(AUTOHEADER) --localdir=$(CONFIG_RELTOPDIR) $(AUTOHEADERFLAGS)) touch $(srcdir)/krb5/autoconf.stmp -- 2.26.2