Mercurial > emacs
comparison lisp/Makefile.in @ 95351:d797842f5ca1
(update-elclist): Work around non-portability of "\" in various
implementations of echo.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Wed, 28 May 2008 03:18:34 +0000 |
parents | 4dfc7920f403 |
children | 9e040b6f6a8f |
comparison
equal
deleted
inserted
replaced
95350:3e684bf03875 | 95351:d797842f5ca1 |
---|---|
160 ## single \ at the end of the replacement text). For the last line, | 160 ## single \ at the end of the replacement text). For the last line, |
161 ## just use a single "\", for sed. Finally, run sed using the command | 161 ## just use a single "\", for sed. Finally, run sed using the command |
162 ## so constructed and update Makefile.in. chmod +w is for CVSREAD=1. | 162 ## so constructed and update Makefile.in. chmod +w is for CVSREAD=1. |
163 ## Errors in final sed are non-fatal, since they have no effect on | 163 ## Errors in final sed are non-fatal, since they have no effect on |
164 ## building Emacs. | 164 ## building Emacs. |
165 ## "echo" is non-portable with regards to backslashes, eg between zsh | |
166 ## and bash. Hence the used of sed on line 2 below (the ones on line | |
167 ## 1 seem to be OK). | |
168 ## http://lists.gnu.org/archive/html/emacs-devel/2008-05/msg01535.html | |
165 update-elclist: | 169 update-elclist: |
166 echo "/^ELCFILES/,/^$$/c\\" > temp.sed | 170 echo "/^ELCFILES/,/^$$/c\\" > temp.sed |
167 echo "ELCFILES = \\\\\\" >> temp.sed | 171 echo "ELCFILES =" | sed -e 's/$$/ \\\\\\/' >> temp.sed |
168 exclude=`echo $(COMPILE_FIRST) | sed -e 's, ,\\\\|,g' -e 's,\/,\\\\/,g'`; \ | 172 exclude=`echo $(COMPILE_FIRST) | sed -e 's, ,\\\\|,g' -e 's,\/,\\\\/,g'`; \ |
169 ls $(lisp)/*.elc $(lisp)/*/*.elc | sed -e "/$$exclude/d" -e "s|^$(lisp)| \$$(lisp)|" -e 's/$$/ \\\\\\/' -e '$$ s/ \\\\//' >> temp.sed | 173 ls $(lisp)/*.elc $(lisp)/*/*.elc | sed -e "/$$exclude/d" -e "s|^$(lisp)| \$$(lisp)|" -e 's/$$/ \\\\\\/' -e '$$ s/ \\\\//' >> temp.sed |
170 echo "" >> temp.sed | 174 echo "" >> temp.sed |
171 -sed -f temp.sed $(lisp)/Makefile.in > temp-elcfiles || rm temp-elcfiles | 175 -sed -f temp.sed $(lisp)/Makefile.in > temp-elcfiles || rm temp-elcfiles |
172 rm temp.sed | 176 rm temp.sed |