NOTE: This patch has been committed.
ChangeLog addition:
2005-11-13 Ben Wing <ben(a)xemacs.org>
* dynodump/Makefile.in.in:
* dynodump/Makefile.in.in (.PHONY):
Add targets distclean-noconfig, realclean-noconfig, extraclean-noconfig.
Do some refactoring for cleanliness.
2005-11-13 Ben Wing <ben(a)xemacs.org>
* Makefile.in.in:
* Makefile.in.in (beta):
* Makefile.in.in (FRC.mostlyclean FRC.clean FRC.distclean FRC.realclean FRC.extraclean
FRC.tags):
* Makefile.in.in (.PHONY):
* Makefile.in.in (top-mostlyclean):
* Makefile.in.in (mostlyclean):
* Makefile.in.in (top-clean):
* Makefile.in.in (clean):
* Makefile.in.in (distclean):
* Makefile.in.in (realclean):
Add targets distclean-noconfig, realclean-noconfig, extraclean-noconfig.
*-noconfig targets are like the base targets they're based off of, but
don't delete Makefiles and certain other files needed to rebuild the
Makefiles as necessary. Refactor things to be more consistent.
Top-level `elcclean' is an alias for `realclean-noconfig' and is used
by target `beta'. `realclean-noconfig' (and, by extension, `realclean'
and `extraclean') remove the .elc files.
src/ChangeLog addition:
2005-11-13 Ben Wing <ben(a)xemacs.org>
* Makefile.in.in (distclean-noconfig):
Add targets distclean-noconfig, realclean-noconfig, extraclean-noconfig.
Do some refactoring for cleanliness.
lwlib/ChangeLog addition:
2005-11-13 Ben Wing <ben(a)xemacs.org>
* Makefile.in.in:
Add targets distclean-noconfig, realclean-noconfig, extraclean-noconfig.
Do some refactoring for cleanliness.
lib-src/ChangeLog addition:
2005-11-13 Ben Wing <ben(a)xemacs.org>
* Makefile.in.in:
Add targets distclean-noconfig, realclean-noconfig, extraclean-noconfig.
Do some refactoring for cleanliness.
netinstall/ChangeLog addition:
2005-11-13 Ben Wing <ben(a)xemacs.org>
* Makefile.in.in:
Add targets distclean-noconfig, realclean-noconfig, extraclean-noconfig.
Do some refactoring for cleanliness.
man/ChangeLog addition:
2005-11-13 Ben Wing <ben(a)xemacs.org>
* Makefile:
Add targets distclean-noconfig, realclean-noconfig, extraclean-noconfig.
Do some refactoring for cleanliness.
modules/ChangeLog addition:
2005-11-13 Ben Wing <ben(a)xemacs.org>
* common/Makefile.common:
* common/Makefile.common (.PHONY):
* common/Makefile.common (install):
Add targets distclean-noconfig, realclean-noconfig, extraclean-noconfig.
Do some refactoring for cleanliness. Put in some magic cookies in
comments so this file gets read as a make file by XEmacs.
build source patch:
Diff command: bash -ci "cvs-diff --show-c-function -no-changelog "
Files affected: modules/common/Makefile.common man/Makefile dynodump/Makefile.in.in
netinstall/Makefile.in.in lib-src/Makefile.in.in lwlib/Makefile.in.in src/Makefile.in.in
Makefile.in.in
Index: Makefile.in.in
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/Makefile.in.in,v
retrieving revision 1.26
diff -u -p -r1.26 Makefile.in.in
--- Makefile.in.in 2005/10/04 17:51:13 1.26
+++ Makefile.in.in 2005/11/13 10:33:33
@@ -1,4 +1,4 @@
-## Copyright (C) 2003 Ben Wing.
+## Copyright (C) 2003, 2005 Ben Wing.
## DIST: This is the distribution Makefile for XEmacs. configure can
## DIST: make most of the changes to this file you might want, so try
@@ -217,9 +217,9 @@ INSTALL_DATA = @INSTALL_DATA@
## ============================= Targets ==============================
-## Subdirectories to make recursively. `lisp' is not included
-## because the compiled lisp files are part of the distribution
-## and you cannot remake them without installing XEmacs first.
+## Subdirectories to make recursively. `lisp' is not included currently;
+## rebuilding the compiled lisp files is done in the `src' make and requires
+## building XEmacs first.
MAKE_SUBDIR = @MAKE_SUBDIR@
## Subdirectories that can be made recursively.
@@ -252,7 +252,7 @@ all: Makefile ${GENERATED_HEADERS} ${MAK
.PHONY: ${SUBDIR} all beta
## Convenience target for XEmacs beta testers
-beta: clean all
+beta: elcclean all
## Convenience target for XEmacs maintainers
## This would run `make-xemacsdist' if I were really confident that everything
@@ -515,21 +515,27 @@ mkdir: FRC.mkdir
## Some makes seem to remember that they've built something called FRC,
## so you can only use a given FRC once per makefile.
FRC FRC.src.paths.h FRC.mkdir FRC.dump-elcs FRC.info:
-FRC.mostlyclean FRC.clean FRC.distclean FRC.realclean FRC.tags:
+FRC.mostlyclean FRC.clean FRC.distclean FRC.realclean FRC.extraclean FRC.tags:
+FRC.distclean-noconfig FRC.realclean-noconfig FRC.extraclean-noconfig:
## ==================== Cleaning up and miscellanea ====================
-.PHONY: mostlyclean clean distclean realclean extraclean
+.PHONY: mostlyclean clean distclean realclean extraclean elcclean
+.PHONY: distclean-noconfig realclean-noconfig extraclean-noconfig
+.PHONY: top-mostlyclean top-clean top-distclean top-realclean top-extraclean
+.PHONY: top-distclean-noconfig top-realclean-noconfig top-extraclean-noconfig
## `mostlyclean'
## Like `clean', but may refrain from deleting a few files that people
## normally don't want to recompile. For example, the `mostlyclean'
## target for GCC does not delete `libgcc.a', because recompiling it
## is rarely necessary and takes a lot of time.
-mostlyclean: FRC.mostlyclean
- for d in $(SUBDIR); do (cd ./$$d && $(MAKE) $(RECURSIVE_MAKE_ARGS) $@); done
+top-mostlyclean: FRC.mostlyclean
$(RM) core
+mostlyclean: top-mostlyclean
+ for d in $(SUBDIR); do (cd ./$$d && $(MAKE) $(RECURSIVE_MAKE_ARGS) $@); done
+
## `clean'
## Delete all files from the current directory that are normally
## created by building the program. Don't delete the files that
@@ -542,28 +548,50 @@ mostlyclean: FRC.mostlyclean
## Remove the generated load files here; they cause lots of problems
## when they don't work right. (beta can't depend on distclean, which
## removes necessary files generated by configure.)
-clean: FRC.clean
- for d in $(SUBDIR); do (cd ./$$d && $(MAKE) $(RECURSIVE_MAKE_ARGS) $@); done
+top-clean: FRC.clean
$(RM) core lisp/auto-autoloads.el* lisp/custom-load.el*
$(RM) lisp/mule/auto-autoloads.el* lisp/mule/custom-load.el*
$(RM) modules/auto-autoloads.el* modules/custom-load.el*
+clean: top-mostlyclean top-clean
+ for d in $(SUBDIR); do (cd ./$$d && $(MAKE) $(RECURSIVE_MAKE_ARGS) $@); done
+
+## `distclean-noconfig'
+## Like `distclean' but don't delete files created by `configure'.
+top-distclean-noconfig: FRC.distclean-noconfig
+ $(RM) TAGS .sbinit lock/* lisp/finder-inf.el*
+ $(RM) -r site-packages xemacs-packages mule-packages site-lisp
+
+distclean-noconfig: top-mostlyclean top-clean top-distclean-noconfig
+ for d in $(SUBDIR); do (cd ./$$d && $(MAKE) $(RECURSIVE_MAKE_ARGS) $@); done
+
## `distclean'
## Delete all files from the current directory that are created by
## configuring or building the program. If you have unpacked the
## source and built the program without creating any other files,
## `make distclean' should leave only the files that were in the
## distribution.
-top_distclean=\
- $(RM) config.status config.log confdefs.h config-tmp-* build-install Installation ; \
- $(RM) TAGS .sbinit lock/* GNUmakefile Makefile Makefile.in ; \
- $(RM) lisp/finder-inf.el* Installation.el Installation.elc ; \
- $(RM) -r site-packages xemacs-packages mule-packages site-lisp
+top-distclean: FRC.distclean
+ $(RM) config.status config.log confdefs.h config-tmp-* build-install Installation
+ $(RM) GNUmakefile Makefile Makefile.in
+ $(RM) Installation.el Installation.elc
-distclean: FRC.distclean
+distclean: top-mostlyclean top-clean top-distclean-noconfig top-distclean
for d in $(SUBDIR); do (cd ./$$d && $(MAKE) $(RECURSIVE_MAKE_ARGS) $@); done
- -${top_distclean}
+## `realclean-noconfig'
+## Delete everything that can be reconstructed by `make'. Don't delete
+## anything requiring reconfiguration.
+top-realclean-noconfig: FRC.realclean-noconfig
+ $(RM) *.elc lisp/*.elc lisp/mule/*.elc lisp/term/*.elc modules/*.elc
+
+realclean-noconfig: top-mostlyclean top-clean top-distclean-noconfig
top-realclean-noconfig
+ for d in $(SUBDIR); do (cd ./$$d && $(MAKE) $(RECURSIVE_MAKE_ARGS) $@); done
+
+top-realclean: FRC.realclean
+
+elcclean: realclean-noconfig
+
## `realclean'
## Delete everything from the current directory that can be
## reconstructed with this Makefile. This typically includes
@@ -575,19 +603,25 @@ distclean: FRC.distclean
## Makefile. More generally, `make realclean' should not delete
## anything that needs to exist in order to run `configure' and then
## begin to build the program.
-realclean: FRC.realclean
+realclean: top-mostlyclean top-clean top-distclean-noconfig top-distclean
top-realclean-noconfig top-realclean
for d in $(SUBDIR); do (cd ./$$d && $(MAKE) $(RECURSIVE_MAKE_ARGS) $@); done
- -${top_distclean}
- $(RM) TAGS
+## `extraclean-noconfig'
+## Like `extraclean' but don't delete anything requiring reconfiguration.
+top-extraclean-noconfig: FRC.extraclean-noconfig
+ $(RM) *~ \#*
+
+extraclean-noconfig: top-mostlyclean top-clean top-distclean-noconfig
top-realclean-noconfig top-extraclean-noconfig
+ for d in $(SUBDIR); do (cd ./$$d && $(MAKE) $(RECURSIVE_MAKE_ARGS) $@); done
+
## This doesn't actually appear in the coding standards, but Karl
## says GCC supports it, and that's where the configuration part of
## the coding standards seem to come from. It's like distclean, but
## it deletes backup and autosave files too.
-extraclean:
+top-extraclean: FRC.extraclean
+
+extraclean: top-mostlyclean top-clean top-distclean-noconfig top-distclean
top-realclean-noconfig top-realclean top-extraclean-noconfig top-extraclean
for d in $(SUBDIR); do (cd ./$$d && $(MAKE) $(RECURSIVE_MAKE_ARGS) $@); done
- $(RM) *~ \#*
- -${top_distclean}
## Unlocking and relocking. The idea of these productions is to reduce
## hassles when installing an incremental tar of XEmacs. Do `make unlock'
Index: src/Makefile.in.in
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/Makefile.in.in,v
retrieving revision 1.119
diff -u -p -r1.119 Makefile.in.in
--- src/Makefile.in.in 2005/10/21 15:48:42 1.119
+++ src/Makefile.in.in 2005/11/13 10:33:35
@@ -3,7 +3,7 @@
## Copyright (C) 1994, 1995 Board of Trustees, University of Illinois
## Copyright (C) 1996, 1997 Sun Microsystems, Inc.
## Copyright (C) 1998, 1999 J. Kean Johnston.
-## Copyright (C) 2001, 2002, 2003 Ben Wing.
+## Copyright (C) 2001, 2002, 2003, 2005 Ben Wing.
## This file is part of XEmacs.
@@ -1005,6 +1005,7 @@ covmacs: $(temacs_deps)
###################### Clean
.PHONY: mostlyclean clean distclean realclean versionclean extraclean
+.PHONY: distclean-noconfig realclean-noconfig extraclean-noconfig
mostlyclean:
$(RM) *.o *.i *.rtl *.ln core \
temacs puremacs quantmacs covmacs rtcmacs temacs.exe \
@@ -1020,11 +1021,17 @@ clean: mostlyclean versionclean
$(SRCMODULES)/auto-autoloads.el* $(SRCMODULES)/custom-load.el*
## This is used in making a distribution.
## Do not use it on development directories!
-distclean: clean
+distclean-noconfig: clean
$(RM) config.h paths.h Emacs.ad.h $(LISP)/finder-inf.el* \
- GNUmakefile Makefile Makefile.in TAGS $(DUMP_TARGET) $(RAW_EXE) \
- xemacs.def xemacs.def.in
+ TAGS xemacs.def xemacs.def.in
+## This is used in making a distribution.
+## Do not use it on development directories!
+distclean: distclean-noconfig
+ $(RM) GNUmakefile Makefile Makefile.in
+realclean-noconfig: distclean-noconfig
realclean: distclean
+extraclean-noconfig: realclean-noconfig
+ $(RM) *~ \#* m/*~ m/\#* s/*~ s/\#*
extraclean: realclean
$(RM) *~ \#* m/*~ m/\#* s/*~ s/\#*
Index: lwlib/Makefile.in.in
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lwlib/Makefile.in.in,v
retrieving revision 1.18
diff -u -p -r1.18 Makefile.in.in
--- lwlib/Makefile.in.in 2004/09/20 19:19:16 1.18
+++ lwlib/Makefile.in.in 2005/11/13 10:33:37
@@ -3,6 +3,7 @@
## Copyright (C) 1995 Tinker Systems and INS Engineering Corp.
## Copyright (C) 1994, 1995 Board of Trustees, University of Illinois
## Copyright (C) 1996, 1997 Sun Microsystems, Inc.
+## Copyright (C) 2005 Ben Wing.
## This file is part of the Lucid Widget Library.
@@ -82,13 +83,21 @@ liblw.a: $(objs)
@-test -n "$(RANLIB)" && $(RANLIB) $@
.PHONY: mostlyclean clean distclean realclean extraclean
+.PHONY: distclean-noconfig realclean-noconfig extraclean-noconfig
mostlyclean:
$(RM) liblw.a liblw_pure_*.a *.o *.i core
clean: mostlyclean
-distclean: clean
- $(RM) GNUmakefile Makefile Makefile.in config.h TAGS
+distclean-noconfig: clean
+ $(RM) config.h TAGS
+## This is used in making a distribution.
+## Do not use it on development directories!
+distclean: distclean-noconfig
+ $(RM) GNUmakefile Makefile Makefile.in
+realclean-noconfig: distclean-noconfig
realclean: distclean
-extraclean: distclean
+extraclean-noconfig: realclean-noconfig
+ $(RM) *~ \#*
+extraclean: realclean
$(RM) *~ \#*
CONFIG_H = ../src/config.h config.h
Index: lib-src/Makefile.in.in
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lib-src/Makefile.in.in,v
retrieving revision 1.47
diff -u -p -r1.47 Makefile.in.in
--- lib-src/Makefile.in.in 2005/04/08 23:10:36 1.47
+++ lib-src/Makefile.in.in 2005/11/13 10:33:38
@@ -1,6 +1,7 @@
## Makefile for lib-src subdirectory in XEmacs.
## Copyright (C) 1985, 1987, 1988, 1993, 1994 Free Software Foundation, Inc.
## Copyright (C) 1996, 1997 Sun Microsystems, Inc.
+## Copyright (C) 2005 Ben Wing.
## This file is part of XEmacs.
@@ -270,15 +271,22 @@ uninstall:
cd ${archlibdir} && $(RM) ${PRIVATE_INSTALLABLES}
.PHONY: mostlyclean clean distclean realclean extraclean
+.PHONY: distclean-noconfig realclean-noconfig extraclean-noconfig
mostlyclean:
$(RM) *.o *.i core
clean: mostlyclean
$(RM) ${EXES} *.exe
-distclean: clean
- $(RM) DOC *.tab.c *.tab.h TAGS ellcc.h
- $(RM) GNUmakefile Makefile Makefile.in blessmail config.values
+distclean-noconfig: clean
+ $(RM) DOC *.tab.c *.tab.h TAGS ellcc.h blessmail config.values
+## This is used in making a distribution.
+## Do not use it on development directories!
+distclean: distclean-noconfig
+ $(RM) GNUmakefile Makefile Makefile.in
+realclean-noconfig: distclean-noconfig
realclean: distclean
-extraclean: distclean
+extraclean-noconfig: realclean-noconfig
+ $(RM) *~ \#*
+extraclean: realclean
$(RM) *~ \#*
## Test the contents of the directory.
Index: netinstall/Makefile.in.in
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/netinstall/Makefile.in.in,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile.in.in
--- netinstall/Makefile.in.in 2001/12/20 05:49:40 1.5
+++ netinstall/Makefile.in.in 2005/11/13 10:33:40
@@ -1,4 +1,5 @@
## Copyright (c) 2000, Red Hat, Inc.
+## Copyright (C) 2005 Ben Wing.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -199,18 +200,22 @@ inilex.c : inilex.l iniparse.h
mv lex.yy.c inilex.c
.PHONY: mostlyclean clean distclean realclean extraclean
-
+.PHONY: distclean-noconfig realclean-noconfig extraclean-noconfig
mostlyclean:
- $(RM) *.o *.i *.ini core $(PROGS)
-
+ $(RM) *.o *.i *.ini core
clean: mostlyclean
-
-distclean: clean
- $(RM) GNUmakefile Makefile Makefile.in TAGS
-
+ $(RM) $(PROGS)
+distclean-noconfig: clean
+ $(RM) TAGS
+## This is used in making a distribution.
+## Do not use it on development directories!
+distclean: distclean-noconfig
+ $(RM) GNUmakefile Makefile Makefile.in
+realclean-noconfig: distclean-noconfig
realclean: distclean
-
-extraclean: distclean
+extraclean-noconfig: realclean-noconfig
+ $(RM) *~ \#*
+extraclean: realclean
$(RM) *~ \#*
choose.o: choose.cc win32.h dialog.h resource.h state.h ini.h concat.h \
Index: dynodump/Makefile.in.in
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/dynodump/Makefile.in.in,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile.in.in
--- dynodump/Makefile.in.in 2001/04/12 18:20:43 1.12
+++ dynodump/Makefile.in.in 2005/11/13 10:33:41
@@ -1,6 +1,7 @@
## Makefile for dynodump subdirectory in XEmacs
## Copyright (C) 1995 Board of Trustees, University of Illinois
## Copyright (C) 1996, 1997 Sun Microsystems, Inc.
+## Copyright (C) 2005 Ben Wing.
## This file is part of XEmacs.
@@ -75,12 +76,20 @@ uninit.o: ${srcdir}/$(ARCH)/uninit.c
$(CC) -c $(ALL_CFLAGS) ${srcdir}/$(ARCH)/uninit.c
.PHONY: mostlyclean clean distclean realclean extraclean
+.PHONY: distclean-noconfig realclean-noconfig extraclean-noconfig
mostlyclean:
$(RM) *.o *.i core
clean: mostlyclean
$(RM) *.so *.so.1
-distclean: clean
- $(RM) GNUmakefile Makefile Makefile.in TAGS
+distclean-noconfig: clean
+ $(RM) TAGS
+## This is used in making a distribution.
+## Do not use it on development directories!
+distclean: distclean-noconfig
+ $(RM) GNUmakefile Makefile Makefile.in
+realclean-noconfig: distclean-noconfig
realclean: distclean
+extraclean-noconfig: realclean-noconfig
+ $(RM) *~ \#*
extraclean: realclean
$(RM) *~ \#*
Index: man/Makefile
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/man/Makefile,v
retrieving revision 1.34
diff -u -p -r1.34 Makefile
--- man/Makefile 2005/01/31 20:08:47 1.34
+++ man/Makefile 2005/11/13 10:33:43
@@ -1,6 +1,7 @@
# Makefile for man subdirectory in XEmacs
# Copyright (C) 1995 Board of Trustees, University of Illinois
# Copyright (C) 1994, 1995 Sun Microsystems.
+# Copyright (C) 2005 Ben Wing.
# This file is part of XEmacs.
@@ -335,14 +336,19 @@ new-users-guide.pdf: $(new-users-guide-s
pdf: $(pdf_files)
.PHONY: mostlyclean clean distclean realclean extraclean
+.PHONY: distclean-noconfig realclean-noconfig extraclean-noconfig
mostlyclean:
$(RM) *.toc *.aux *.log *.op *.cp *.cps *.fn *.fns
$(RM) *.ky *.kys *.pg *.pgs *.tp *.tps *.vr *.vrs
clean: mostlyclean
$(RM) core *.dvi *.pdf
-distclean: clean
+distclean-noconfig: clean
+distclean: distclean-noconfig
+realclean-noconfig: distclean-noconfig
realclean: distclean
-extraclean: distclean
+extraclean-noconfig: realclean-noconfig
+ $(RM) *~ \#* */*~ */\#*
+extraclean: realclean
$(RM) *~ \#* */*~ */\#*
############################################################################
Index: modules/common/Makefile.common
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/modules/common/Makefile.common,v
retrieving revision 1.10
diff -u -p -r1.10 Makefile.common
--- modules/common/Makefile.common 2004/11/08 15:14:52 1.10
+++ modules/common/Makefile.common 2005/11/13 10:33:44
@@ -1,5 +1,6 @@
## Common Makefile section for modules in XEmacs.
## Copyright (C) 2002 Jerry James.
+## Copyright (C) 2005 Ben Wing.
## This file is part of XEmacs.
@@ -62,7 +63,7 @@ LIBSTDCPP=@LIBSTDCPP@
IMPORT_LIB=../../src/xemacs-import.a
#endif
-.PHONY: clean distclean install
+.PHONY: install
all: $(OBJECT_TO_BUILD)
.c.o:
@@ -77,13 +78,30 @@ $(MODNAME)_i.c: $(SRCS)
--mod-name=$(MODNAME) --mod-version=$(MODVER) \
--mod-title=$(MODTITLE) $(SRC_SRCS)
-clean:
- $(RM) $(MODNAME).ell $(OBJS) $(MODNAME)_i.* *~
+.PHONY: mostlyclean clean distclean realclean extraclean
+.PHONY: distclean-noconfig realclean-noconfig extraclean-noconfig
+mostlyclean:
+ $(RM) $(OBJS) $(MODNAME)_i.* core
+clean: mostlyclean
+ $(RM) $(MODNAME).ell
+distclean-noconfig: clean
+ $(RM) config.* TAGS
+## This is used in making a distribution.
+## Do not use it on development directories!
+distclean: distclean-noconfig
+ $(RM) GNUmakefile Makefile Makefile.in configure
+realclean-noconfig: distclean-noconfig
+realclean: distclean
+extraclean-noconfig: realclean-noconfig
+ $(RM) *~ \#*
+extraclean: realclean
+ $(RM) *~ \#*
-distclean: clean
- $(RM) Makefile config.* configure
-
-extraclean: distclean
-
install: $(OBJECT_TO_BUILD)
$(INSTALL_PROGRAM) $< $(INSTALLPATH)
+
+##
+## Local Variables:
+## mode: makefile
+## End:
+##