changeset 95409:9e040b6f6a8f

(update-elclist): Hide the warning when it does not apply, make it milder when it does. (autogen-clean): New target. (maintainer-clean): Use autogen-clean.
author Glenn Morris <rgm@gnu.org>
date Fri, 30 May 2008 02:56:59 +0000
parents 9cc865eba421
children d933144b818e
files lisp/Makefile.in
diffstat 1 files changed, 13 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/Makefile.in	Fri May 30 02:47:39 2008 +0000
+++ b/lisp/Makefile.in	Fri May 30 02:56:59 2008 +0000
@@ -151,20 +151,12 @@
 
 .PHONY: update-elclist
 
-## Construct a sed command file that operates on lines between
-## ^ELCFILES and the next blank line.  Convert spaces between members
-## of COMPILE_FIRST to "\|", and escape directory "/".  List the .elc
-## files, exclude the members of COMPILE_FIRST, convert ^$(lisp) to a
-## literal " $(lisp)", add trailing " \\\" to the end of every line
-## (the last \ continues the line in sed, the other \\ result in a
-## single \ at the end of the replacement text).  For the last line,
-## just use a single "\", for sed.  Finally, run sed using the command
-## so constructed and update Makefile.in.  chmod +w is for CVSREAD=1.
-## Errors in final sed are non-fatal, since they have no effect on
-## building Emacs.
+## Post-bootstrap, find the list of .elc files, exclude the members
+## of COMPILE_FIRST, and use sed to update ELCFILES in Makefile.in.
+## Errors in the final sed are non-fatal, since they have no effect on
+## building Emacs.  chmod +w is for CVSREAD=1.
 ## "echo" is non-portable with regards to backslashes, eg between zsh
-## and bash.  Hence the used of sed on line 2 below (the ones on line
-## 1 seem to be OK).
+## and bash.  Hence the use of sed on line 2 below (line 1 seems to be OK).
 ## http://lists.gnu.org/archive/html/emacs-devel/2008-05/msg01535.html
 update-elclist:
 	echo "/^ELCFILES/,/^$$/c\\" > temp.sed
@@ -174,8 +166,11 @@
 	echo "" >> temp.sed
 	-sed -f temp.sed $(lisp)/Makefile.in > temp-elcfiles || rm temp-elcfiles
 	rm temp.sed
-	chmod +w $(lisp)/Makefile.in
-	mv -f temp-elcfiles $(lisp)/Makefile.in || echo "Maintainer warning: failed to update Makefile.in"
+	@test -f temp-elcfiles || echo "Maintainer warning: failed to update Makefile.in.  You can ignore this if you are not an Emacs developer."
+	if test -f temp-elcfiles; then \
+	  chmod +w $(lisp)/Makefile.in; \
+	  mv -f temp-elcfiles $(lisp)/Makefile.in; \
+	fi
 
 ## Explicitly list the .elc files, for the sake of parallel builds.
 ## http://lists.gnu.org/archive/html/bug-gnu-emacs/2008-05/msg00016.html
@@ -1403,9 +1398,11 @@
 	  $(MAKE) $(MFLAGS) autoloads;				\
 	fi
 
-maintainer-clean: distclean bootstrap-clean
+autogen-clean:
 	cd $(lisp); rm -f $(AUTOGENEL)
 
+maintainer-clean: distclean bootstrap-clean autogen-clean
+
 ## NB note that this rules assume only one level of subdirs below lisp/.
 ## If nested subdirs are added, it's probably time to switch to:
 ## find $(lisp) -name "*.elc" -exec rm -f '{}' ';'