Mercurial > hg > xemacs-beta
comparison lib-src/Makefile.in.in @ 5512:4aa8ee813265
Add a DESTDIR variable to all Makefiles, defaulting to the empty string, and
use it in install targets. See xemacs-patches message
<BANLkTinRnwk9qsCfBj_xkcyf7H4sH9fn7A@mail.gmail.com>.
author | Jerry James <james@xemacs.org> |
---|---|
date | Wed, 25 May 2011 09:15:20 -0600 |
parents | 308d34e9f07d |
children | 0e2f2837c2bd |
comparison
equal
deleted
inserted
replaced
5511:7b5254f6e0d5 | 5512:4aa8ee813265 |
---|---|
19 ## along with XEmacs. If not, see <http://www.gnu.org/licenses/>. | 19 ## along with XEmacs. If not, see <http://www.gnu.org/licenses/>. |
20 | 20 |
21 ## Note: FSF Makefile.in.in does something weird so that the comments | 21 ## Note: FSF Makefile.in.in does something weird so that the comments |
22 ## above a certain point in this file are in shell format instead of | 22 ## above a certain point in this file are in shell format instead of |
23 ## in C format. How the hell is this supposed to work? */ | 23 ## in C format. How the hell is this supposed to work? */ |
24 | |
25 DESTDIR= | |
24 | 26 |
25 ## For performance and consistency, no built-in rules | 27 ## For performance and consistency, no built-in rules |
26 .SUFFIXES: | 28 .SUFFIXES: |
27 .SUFFIXES: .c .h .o | 29 .SUFFIXES: .c .h .o |
28 ## ==================== Things "configure" will edit ==================== | 30 ## ==================== Things "configure" will edit ==================== |
240 | 242 |
241 ## Install the internal utilities. Until they are installed, we can | 243 ## Install the internal utilities. Until they are installed, we can |
242 ## just run them directly from lib-src. | 244 ## just run them directly from lib-src. |
243 ${archlibdir}: all | 245 ${archlibdir}: all |
244 @echo; echo "Installing utilities run internally by XEmacs." | 246 @echo; echo "Installing utilities run internally by XEmacs." |
245 ./make-path ${archlibdir} | 247 ./make-path $(DESTDIR)${archlibdir} |
246 if test "`(cd ${archlibdir} && $(pwd))`" != "`$(pwd)`"; then \ | 248 if test "`(cd ${archlibdir} && $(pwd))`" != "`$(pwd)`"; then \ |
247 for f in ${PRIVATE_INSTALLABLE_EXES}; do \ | 249 for f in ${PRIVATE_INSTALLABLE_EXES}; do \ |
248 (cd .. && $(INSTALL_PROGRAM) lib-src/$$f ${archlibdir}/$$f) ; \ | 250 (cd .. && $(INSTALL_PROGRAM) lib-src/$$f $(DESTDIR)${archlibdir}/$$f) ; \ |
249 done ; \ | 251 done ; \ |
250 fi | 252 fi |
251 if test "`(cd ${archlibdir} && $(pwd))`" \ | 253 if test "`(cd ${archlibdir} && $(pwd))`" \ |
252 != "`(cd ${srcdir} && $(pwd))`"; then \ | 254 != "`(cd ${srcdir} && $(pwd))`"; then \ |
253 for f in ${PRIVATE_INSTALLABLE_SCRIPTS}; do \ | 255 for f in ${PRIVATE_INSTALLABLE_SCRIPTS}; do \ |
254 (cd .. && $(INSTALL_PROGRAM) ${srcdir}/$$f ${archlibdir}/$$f); \ | 256 (cd .. && $(INSTALL_PROGRAM) ${srcdir}/$$f $(DESTDIR)${archlibdir}/$$f); \ |
255 done ; \ | 257 done ; \ |
256 fi | 258 fi |
257 | 259 |
258 install: ${archlibdir} | 260 install: ${archlibdir} |
259 @echo; echo "Installing utilities for users to run." | 261 @echo; echo "Installing utilities for users to run." |
260 for file in ${PUBLIC_INSTALLABLE_EXES} ; do \ | 262 for file in ${PUBLIC_INSTALLABLE_EXES} ; do \ |
261 (cd .. && $(INSTALL_PROGRAM) lib-src/$${file} ${bindir}/$${file}) ; \ | 263 (cd .. && $(INSTALL_PROGRAM) lib-src/$${file} $(DESTDIR)${bindir}/$${file}) ; \ |
262 done | 264 done |
263 for file in ${PUBLIC_INSTALLABLE_SCRIPTS} ; do \ | 265 for file in ${PUBLIC_INSTALLABLE_SCRIPTS} ; do \ |
264 (cd .. && $(INSTALL_PROGRAM) ${srcdir}/$${file} ${bindir}/$${file}) ; \ | 266 (cd .. && $(INSTALL_PROGRAM) ${srcdir}/$${file} $(DESTDIR)${bindir}/$${file}) ; \ |
265 done | 267 done |
266 | 268 |
267 uninstall: | 269 uninstall: |
268 cd ${bindir} && $(RM) ${PUBLIC_INSTALLABLES} | 270 cd ${bindir} && $(RM) ${PUBLIC_INSTALLABLES} |
269 cd ${archlibdir} && $(RM) ${PRIVATE_INSTALLABLES} | 271 cd ${archlibdir} && $(RM) ${PRIVATE_INSTALLABLES} |