This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RFC: Maintainer mode support



GCC's configure supports "maintainer mode", whereby certain parts of
the build can be disabled for the casual developer (assuming those
parts can be supplied by CVS or aren't needed).  Currently, this is
only used for po/cat-id-tbl.c.  Other places where we could use it but
aren't:

* bison/flex rules
* building documentation (*.1, *.info?)
* Enable warnings/checking
* rerunning autoconf automatically

I can implement those if everyone agrees it's a good idea to do so.
We could also use this feature in releases to make it easier for the
casual user, such as not rebuilding documentation by default even if
CVS enables it by default.  In theory, we could alter the
contrib/release and/or Makefile rules to check for such an edit before
building a release, too.

If anyone wishes to implement any of those, or any other idea, the way
to do so is easy.  In the Makefile.in, use the string @MAINT@ as a
conditional comment on lines.  When maintainer mode is enabled,
@MAINT@ is removed.  When maintainer mode isn't enabled, @MAINT@ is
replaced with #, the Makefile comment character.  Thus, lines (or
parts of lines) may be selectively commented out.  Examples:

LOOSE_WARN =
@MAINT@LOOSE_WARN = -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes

@MAINT@$(srcdir)/configure: $(srcdir)/configure.in
@MAINT@	(cd $(srcdir) && autoconf)
(be careful about tabs in such cases)

doc: gccbug @MAINT@ $(BUILD_INFO)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]