aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2006-03-03 12:02:31 +0000
committerEli Zaretskii2006-03-03 12:02:31 +0000
commit81af90607429e150c5e65c0bfc94cbf5c359678a (patch)
tree36035966a96d2e3e3090c6c431b21d23b0c5745c
parent6e1fbe44cdeb041526e5d09512f6e563aa16f5f4 (diff)
downloademacs-81af90607429e150c5e65c0bfc94cbf5c359678a.tar.gz
emacs-81af90607429e150c5e65c0bfc94cbf5c359678a.zip
Add DESTDIR variable to install and uninstall targets to support staged
installations.
-rw-r--r--Makefile.in104
-rw-r--r--lib-src/Makefile.in44
2 files changed, 74 insertions, 74 deletions
diff --git a/Makefile.in b/Makefile.in
index 8468d13b803..f4478308a42 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -250,7 +250,7 @@ SUBDIR_MAKEFILES = lib-src/Makefile man/Makefile lispref/Makefile lispintro/Make
250# avoid nuking an existing dir file, so we don't do that here; 250# avoid nuking an existing dir file, so we don't do that here;
251# instead, we have written out explicit code in the `install' targets. 251# instead, we have written out explicit code in the `install' targets.
252COPYDIR = ${srcdir}/etc ${srcdir}/lisp 252COPYDIR = ${srcdir}/etc ${srcdir}/lisp
253COPYDESTS = ${etcdir} ${lispdir} 253COPYDESTS = $(DESTDIR)${etcdir} $(DESTDIR)${lispdir}
254 254
255all: ${SUBDIR} leim 255all: ${SUBDIR} leim
256 256
@@ -375,20 +375,20 @@ install-arch-dep: mkdir
375 exec_prefix=${exec_prefix} bindir=${bindir} \ 375 exec_prefix=${exec_prefix} bindir=${bindir} \
376 libexecdir=${libexecdir} archlibdir=${archlibdir} \ 376 libexecdir=${libexecdir} archlibdir=${archlibdir} \
377 INSTALL_STRIP=${INSTALL_STRIP}) 377 INSTALL_STRIP=${INSTALL_STRIP})
378 ${INSTALL_PROGRAM} $(INSTALL_STRIP) src/emacs${EXEEXT} ${bindir}/$(EMACSFULL) 378 ${INSTALL_PROGRAM} $(INSTALL_STRIP) src/emacs${EXEEXT} $(DESTDIR)${bindir}/$(EMACSFULL)
379 -chmod 1755 ${bindir}/$(EMACSFULL) 379 -chmod 1755 $(DESTDIR)${bindir}/$(EMACSFULL)
380 rm -f ${bindir}/$(EMACS) 380 rm -f $(DESTDIR)${bindir}/$(EMACS)
381 -ln ${bindir}/$(EMACSFULL) ${bindir}/$(EMACS) 381 -ln $(DESTDIR)${bindir}/$(EMACSFULL) $(DESTDIR)${bindir}/$(EMACS)
382 -unset CDPATH; \ 382 -unset CDPATH; \
383 for f in `cd lib-src && echo fns-*.el`; do \ 383 for f in `cd lib-src && echo fns-*.el`; do \
384 if test -r lib-src/$$f ; then \ 384 if test -r lib-src/$$f ; then \
385 ${INSTALL_DATA} lib-src/$$f ${archlibdir}/$$f; \ 385 ${INSTALL_DATA} lib-src/$$f $(DESTDIR)${archlibdir}/$$f; \
386 else true; fi ; \ 386 else true; fi ; \
387 done 387 done
388 if test "${carbon_appdir}" != ""; then \ 388 if test "${carbon_appdir}" != ""; then \
389 umask 022; mkdir -p ${carbon_appdir}/Emacs.app; \ 389 umask 022; mkdir -p $(DESTDIR)${carbon_appdir}/Emacs.app; \
390 (cd mac/Emacs.app; (tar -chf - . | \ 390 (cd mac/Emacs.app; (tar -chf - . | \
391 (cd ${carbon_appdir}/Emacs.app; umask 022; tar -xvf - \ 391 (cd $(DESTDIR)${carbon_appdir}/Emacs.app; umask 022; tar -xvf - \
392 && cat > /dev/null))) || exit 1; \ 392 && cat > /dev/null))) || exit 1; \
393 fi 393 fi
394 394
@@ -439,86 +439,86 @@ install-arch-indep: mkdir info
439 rm -f $${subdir}/dired.todo ; \ 439 rm -f $${subdir}/dired.todo ; \
440 done) ; \ 440 done) ; \
441 done 441 done
442 -rm -f ${lispdir}/subdirs.el 442 -rm -f $(DESTDIR)${lispdir}/subdirs.el
443 $(srcdir)/update-subdirs ${lispdir} 443 $(srcdir)/update-subdirs $(DESTDIR)${lispdir}
444 if [ -f ${datadir}/emacs/${version}/site-lisp/subdirs.el ]; \ 444 if [ -f $(DESTDIR)${datadir}/emacs/${version}/site-lisp/subdirs.el ]; \
445 then true; \ 445 then true; \
446 else \ 446 else \
447 (echo "(if (fboundp 'normal-top-level-add-subdirs-to-load-path)"; \ 447 (echo "(if (fboundp 'normal-top-level-add-subdirs-to-load-path)"; \
448 echo " (normal-top-level-add-subdirs-to-load-path))") \ 448 echo " (normal-top-level-add-subdirs-to-load-path))") \
449 > ${datadir}/emacs/${version}/site-lisp/subdirs.el; \ 449 > $(DESTDIR)${datadir}/emacs/${version}/site-lisp/subdirs.el; \
450 fi 450 fi
451 chmod a+r ${datadir}/emacs/${version}/site-lisp/subdirs.el 451 chmod a+r $(DESTDIR)${datadir}/emacs/${version}/site-lisp/subdirs.el
452 -if [ -f ${datadir}/emacs/site-lisp/subdirs.el ]; \ 452 -if [ -f $(DESTDIR)${datadir}/emacs/site-lisp/subdirs.el ]; \
453 then true; \ 453 then true; \
454 else \ 454 else \
455 (echo "(if (fboundp 'normal-top-level-add-subdirs-to-load-path)"; \ 455 (echo "(if (fboundp 'normal-top-level-add-subdirs-to-load-path)"; \
456 echo " (normal-top-level-add-subdirs-to-load-path))") \ 456 echo " (normal-top-level-add-subdirs-to-load-path))") \
457 > ${datadir}/emacs/site-lisp/subdirs.el; \ 457 > $(DESTDIR)${datadir}/emacs/site-lisp/subdirs.el; \
458 fi 458 fi
459 -chmod a+r ${datadir}/emacs/site-lisp/subdirs.el 459 -chmod a+r $(DESTDIR)${datadir}/emacs/site-lisp/subdirs.el
460 -unset CDPATH; \ 460 -unset CDPATH; \
461 if [ `(cd ./etc; /bin/pwd)` != `(cd ${docdir}; /bin/pwd)` ]; \ 461 if [ `(cd ./etc; /bin/pwd)` != `(cd $(DESTDIR)${docdir}; /bin/pwd)` ]; \
462 then \ 462 then \
463 echo "Copying etc/DOC-* to ${docdir} ..." ; \ 463 echo "Copying etc/DOC-* to $(DESTDIR)${docdir} ..." ; \
464 (cd ./etc; tar -chf - DOC*) \ 464 (cd ./etc; tar -chf - DOC*) \
465 |(cd ${docdir}; umask 022; tar -xvf - && cat > /dev/null) || exit 1; \ 465 |(cd $(DESTDIR)${docdir}; umask 022; tar -xvf - && cat > /dev/null) || exit 1; \
466 (cd $(docdir); chown $${LOGNAME:-$$USERNAME} DOC*; chmod a+r DOC*; \ 466 (cd $(DESTDIR)$(docdir); chown $${LOGNAME:-$$USERNAME} DOC*; chmod a+r DOC*; \
467 if test "`echo DOC-*`" != "DOC-*"; then rm DOC; fi); \ 467 if test "`echo DOC-*`" != "DOC-*"; then rm DOC; fi); \
468 else true; fi 468 else true; fi
469 -unset CDPATH; \ 469 -unset CDPATH; \
470 if [ -r ./lisp ] \ 470 if [ -r ./lisp ] \
471 && [ -r ./lisp/simple.el ] \ 471 && [ -r ./lisp/simple.el ] \
472 && [ x`(cd ./lisp; /bin/pwd)` != x`(cd ${lispdir}; /bin/pwd)` ] \ 472 && [ x`(cd ./lisp; /bin/pwd)` != x`(cd $(DESTDIR)${lispdir}; /bin/pwd)` ] \
473 && [ x`(cd ${srcdir}/lisp; /bin/pwd)` != x`(cd ./lisp; /bin/pwd)` ]; \ 473 && [ x`(cd ${srcdir}/lisp; /bin/pwd)` != x`(cd ./lisp; /bin/pwd)` ]; \
474 then \ 474 then \
475 echo "Copying lisp/*.el and lisp/*.elc to ${lispdir} ..." ; \ 475 echo "Copying lisp/*.el and lisp/*.elc to $(DESTDIR)${lispdir} ..." ; \
476 (cd lisp; tar -chf - *.el *.elc) \ 476 (cd lisp; tar -chf - *.el *.elc) \
477 |(cd ${lispdir}; umask 022; tar -xvf - && cat > /dev/null) || exit 1; \ 477 |(cd $(DESTDIR)${lispdir}; umask 022; tar -xvf - && cat > /dev/null) || exit 1; \
478 (cd ${lispdir}; find . -exec chown $${LOGNAME:-$$USERNAME} {} ';') ; \ 478 (cd $(DESTDIR)${lispdir}; find . -exec chown $${LOGNAME:-$$USERNAME} {} ';') ; \
479 else true; fi 479 else true; fi
480 -unset CDPATH; \ 480 -unset CDPATH; \
481 if [ -n "${GZIP_PROG}" ]; \ 481 if [ -n "${GZIP_PROG}" ]; \
482 then \ 482 then \
483 echo "Compressing *.el ..." ; \ 483 echo "Compressing *.el ..." ; \
484 (cd ${lispdir}; for f in `find . -name "*.elc" -print`; do \ 484 (cd $(DESTDIR)${lispdir}; for f in `find . -name "*.elc" -print`; do \
485 ${GZIP_PROG} -9n `echo $$f|sed 's/.elc$$/.el/'` ; \ 485 ${GZIP_PROG} -9n `echo $$f|sed 's/.elc$$/.el/'` ; \
486 done) \ 486 done) \
487 else true; fi 487 else true; fi
488 -unset CDPATH; \ 488 -unset CDPATH; \
489 thisdir=`/bin/pwd`; \ 489 thisdir=`/bin/pwd`; \
490 if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd ${infodir} && /bin/pwd)` ]; \ 490 if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd $(DESTDIR)${infodir} && /bin/pwd)` ]; \
491 then \ 491 then \
492 (cd ${infodir}; \ 492 (cd $(DESTDIR)${infodir}; \
493 if [ -f dir ]; then true; \ 493 if [ -f dir ]; then true; \
494 else \ 494 else \
495 (cd $${thisdir}; \ 495 (cd $${thisdir}; \
496 ${INSTALL_DATA} ${srcdir}/info/dir ${infodir}/dir; \ 496 ${INSTALL_DATA} ${srcdir}/info/dir $(DESTDIR)${infodir}/dir; \
497 chmod a+r ${infodir}/dir); \ 497 chmod a+r $(DESTDIR)${infodir}/dir); \
498 fi; \ 498 fi; \
499 cd ${srcdir}/info ; \ 499 cd ${srcdir}/info ; \
500 for f in ada-mode* autotype* calc* ccmode* cl* dired-x* ebrowse* ediff* efaq* eintr* elisp* emacs* emacs-mime* emacs-xtra* eshell* eudc* flymake* forms* gnus* idlwave* info* message* mh-e* newsticker* org* pcl-cvs* pgg* reftex* sc* ses* sieve* speedbar* tramp* vip* widget* woman* smtpmail* url* rcirc* erc*; do \ 500 for f in ada-mode* autotype* calc* ccmode* cl* dired-x* ebrowse* ediff* efaq* eintr* elisp* emacs* emacs-mime* emacs-xtra* eshell* eudc* flymake* forms* gnus* idlwave* info* message* mh-e* newsticker* org* pcl-cvs* pgg* reftex* sc* ses* sieve* speedbar* tramp* vip* widget* woman* smtpmail* url* rcirc* erc*; do \
501 (cd $${thisdir}; \ 501 (cd $${thisdir}; \
502 ${INSTALL_DATA} ${srcdir}/info/$$f ${infodir}/$$f; \ 502 ${INSTALL_DATA} ${srcdir}/info/$$f $(DESTDIR)${infodir}/$$f; \
503 chmod a+r ${infodir}/$$f); \ 503 chmod a+r $(DESTDIR)${infodir}/$$f); \
504 done); \ 504 done); \
505 else true; fi 505 else true; fi
506 -unset CDPATH; \ 506 -unset CDPATH; \
507 thisdir=`/bin/pwd`; \ 507 thisdir=`/bin/pwd`; \
508 if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd ${infodir} && /bin/pwd)` ]; \ 508 if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd $(DESTDIR)${infodir} && /bin/pwd)` ]; \
509 then \ 509 then \
510 for f in ada-mode autotype calc ccmode cl dired-x ebrowse ediff efaq elisp eintr emacs emacs-mime emacs-xtra eshell eudc flymake forms gnus idlwave info message mh-e newsticker org pcl-cvs pgg reftex sc ses sieve speedbar tramp vip viper widget woman smtpmail url rcirc erc; do \ 510 for f in ada-mode autotype calc ccmode cl dired-x ebrowse ediff efaq elisp eintr emacs emacs-mime emacs-xtra eshell eudc flymake forms gnus idlwave info message mh-e newsticker org pcl-cvs pgg reftex sc ses sieve speedbar tramp vip viper widget woman smtpmail url rcirc erc; do \
511 (cd $${thisdir}; \ 511 (cd $${thisdir}; \
512 ${INSTALL_INFO} --info-dir=${infodir} ${infodir}/$$f); \ 512 ${INSTALL_INFO} --info-dir=$(DESTDIR)${infodir} $(DESTDIR)${infodir}/$$f); \
513 done; \ 513 done; \
514 else true; fi 514 else true; fi
515 -chmod -R a+r ${datadir}/emacs ${COPYDESTS} ${infodir} 515 -chmod -R a+r $(DESTDIR)${datadir}/emacs ${COPYDESTS} $(DESTDIR)${infodir}
516 thisdir=`/bin/pwd`; \ 516 thisdir=`/bin/pwd`; \
517 cd ${srcdir}/etc; \ 517 cd ${srcdir}/etc; \
518 for page in emacs emacsclient etags ctags ; do \ 518 for page in emacs emacsclient etags ctags ; do \
519 (cd $${thisdir}; \ 519 (cd $${thisdir}; \
520 ${INSTALL_DATA} ${srcdir}/etc/$${page}.1 ${man1dir}/$${page}${manext}; \ 520 ${INSTALL_DATA} ${srcdir}/etc/$${page}.1 $(DESTDIR)${man1dir}/$${page}${manext}; \
521 chmod a+r ${man1dir}/$${page}${manext}); \ 521 chmod a+r $(DESTDIR)${man1dir}/$${page}${manext}); \
522 done 522 done
523 523
524### Install LEIM files. Although they are machine-independent, we 524### Install LEIM files. Although they are machine-independent, we
@@ -537,15 +537,15 @@ install-strip:
537### /usr/local/lib/emacs/19.0/mips-dec-ultrix4.2), we use mkinstalldirs 537### /usr/local/lib/emacs/19.0/mips-dec-ultrix4.2), we use mkinstalldirs
538### instead of mkdir. Not all systems' mkdir programs have the `-p' flag. 538### instead of mkdir. Not all systems' mkdir programs have the `-p' flag.
539mkdir: FRC 539mkdir: FRC
540 if [ -d ${datadir} ]; then true; else \ 540 if [ -d $(DESTDIR)${datadir} ]; then true; else \
541 $(srcdir)/mkinstalldirs ${datadir}; \ 541 $(srcdir)/mkinstalldirs $(DESTDIR)${datadir}; \
542 chmod a+r ${datadir};\ 542 chmod a+r $(DESTDIR)${datadir};\
543 fi 543 fi
544 $(srcdir)/mkinstalldirs ${COPYDESTS} ${infodir} ${man1dir} \ 544 $(srcdir)/mkinstalldirs ${COPYDESTS} $(DESTDIR)${infodir} $(DESTDIR)${man1dir} \
545 ${bindir} ${docdir} ${libexecdir} \ 545 $(DESTDIR)${bindir} $(DESTDIR)${docdir} $(DESTDIR)${libexecdir} \
546 ${datadir}/emacs/site-lisp \ 546 $(DESTDIR)${datadir}/emacs/site-lisp \
547 ${datadir}/emacs/${version}/site-lisp \ 547 $(DESTDIR)${datadir}/emacs/${version}/site-lisp \
548 `echo ${locallisppath} | sed 's/:/ /g'` 548 $(DESTDIR)`echo ${locallisppath} | sed 's,:, $(DESTDIR),g'`
549 549
550### Delete all the installed files that the `install' target would 550### Delete all the installed files that the `install' target would
551### create (but not the noninstalled files such as `make all' would 551### create (but not the noninstalled files such as `make all' would
@@ -558,24 +558,24 @@ uninstall:
558 prefix=${prefix} exec_prefix=${exec_prefix} \ 558 prefix=${prefix} exec_prefix=${exec_prefix} \
559 bindir=${bindir} libexecdir=${libexecdir} archlibdir=${archlibdir}) 559 bindir=${bindir} libexecdir=${libexecdir} archlibdir=${archlibdir})
560 -unset CDPATH; \ 560 -unset CDPATH; \
561 for dir in ${lispdir} ${etcdir} ; do \ 561 for dir in $(DESTDIR)${lispdir} $(DESTDIR)${etcdir} ; do \
562 if [ -d $${dir} ]; then \ 562 if [ -d $${dir} ]; then \
563 case `(cd $${dir} ; /bin/pwd)` in \ 563 case `(cd $${dir} ; /bin/pwd)` in \
564 `(cd ${srcdir} ; /bin/pwd)`* ) ;; \ 564 `(cd ${srcdir} ; /bin/pwd)`* ) ;; \
565 * ) rm -rf $${dir} ;; \ 565 * ) rm -rf $${dir} ;; \
566 esac ; \ 566 esac ; \
567 case $${dir} in \ 567 case $${dir} in \
568 ${datadir}/emacs/${version}/* ) \ 568 $(DESTDIR)${datadir}/emacs/${version}/* ) \
569 rm -rf ${datadir}/emacs/${version} \ 569 rm -rf $(DESTDIR)${datadir}/emacs/${version} \
570 ;; \ 570 ;; \
571 esac ; \ 571 esac ; \
572 fi ; \ 572 fi ; \
573 done 573 done
574 (cd ${archlibdir} && rm -f fns-*) 574 (cd $(DESTDIR)${archlibdir} && rm -f fns-*)
575 -rm -rf ${libexecdir}/emacs/${version} 575 -rm -rf $(DESTDIR)${libexecdir}/emacs/${version}
576 (cd ${infodir} && rm -f cl* ada-mode* autotype* calc* ccmode* ebrowse* efaq* eintr elisp* eshell* eudc* idlwave* message* pcl-cvs* reftex* speedbar* tramp* widget* woman* dired-x* ediff* emacs* emacs-xtra* flymake* forms* gnus* info* mh-e* newsticker* org* sc* ses* vip* smtpmail* url* rcirc* erc*) 576 (cd $(DESTDIR)${infodir} && rm -f cl* ada-mode* autotype* calc* ccmode* ebrowse* efaq* eintr elisp* eshell* eudc* idlwave* message* pcl-cvs* reftex* speedbar* tramp* widget* woman* dired-x* ediff* emacs* emacs-xtra* flymake* forms* gnus* info* mh-e* newsticker* org* sc* ses* vip* smtpmail* url* rcirc* erc*)
577 (cd ${man1dir} && rm -f emacs${manext} emacsclient${manext} etags${manext} ctags${manext}) 577 (cd $(DESTDIR)${man1dir} && rm -f emacs${manext} emacsclient${manext} etags${manext} ctags${manext})
578 (cd ${bindir} && rm -f $(EMACSFULL) $(EMACS)) 578 (cd $(DESTDIR)${bindir} && rm -f $(EMACSFULL) $(EMACS))
579 579
580 580
581FRC: 581FRC:
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in
index 33af87019e0..85a7c13c95a 100644
--- a/lib-src/Makefile.in
+++ b/lib-src/Makefile.in
@@ -285,11 +285,11 @@ blessmail:
285maybe-blessmail: BLESSMAIL 285maybe-blessmail: BLESSMAIL
286#ifdef MOVEMAIL_NEEDS_BLESSING 286#ifdef MOVEMAIL_NEEDS_BLESSING
287/* Don\'t charge ahead and do it! Let the installer decide. 287/* Don\'t charge ahead and do it! Let the installer decide.
288 ./blessmail ${archlibdir}/movemail${EXEEXT} */ 288 ./blessmail $(DESTDIR)${archlibdir}/movemail${EXEEXT} */
289 @if [ `wc -l <blessmail` != 2 ] ; then \ 289 @if [ `wc -l <blessmail` != 2 ] ; then \
290 dir=`sed -n -e 's/echo mail directory = \(.*\)/\1/p' blessmail`; \ 290 dir=`sed -n -e 's/echo mail directory = \(.*\)/\1/p' blessmail`; \
291 echo Assuming $$dir is really the mail spool directory, you should; \ 291 echo Assuming $$dir is really the mail spool directory, you should; \
292 echo run lib-src/blessmail ${archlibdir}/movemail${EXEEXT}; \ 292 echo run lib-src/blessmail $(DESTDIR)${archlibdir}/movemail${EXEEXT}; \
293 echo as root, to give movemail${EXEEXT} appropriate permissions.; \ 293 echo as root, to give movemail${EXEEXT} appropriate permissions.; \
294 echo Do that after running make install.; \ 294 echo Do that after running make install.; \
295 fi 295 fi
@@ -297,50 +297,50 @@ maybe-blessmail: BLESSMAIL
297 297
298/* Install the internal utilities. Until they are installed, we can 298/* Install the internal utilities. Until they are installed, we can
299 just run them directly from lib-src. */ 299 just run them directly from lib-src. */
300${archlibdir}: all 300$(DESTDIR)${archlibdir}: all
301 @echo 301 @echo
302 @echo "Installing utilities run internally by Emacs." 302 @echo "Installing utilities run internally by Emacs."
303 $(top_srcdir)/mkinstalldirs ${archlibdir} 303 $(top_srcdir)/mkinstalldirs $(DESTDIR)${archlibdir}
304 if [ `(cd ${archlibdir} && /bin/pwd)` != `/bin/pwd` ]; then \ 304 if [ `(cd $(DESTDIR)${archlibdir} && /bin/pwd)` != `/bin/pwd` ]; then \
305 for file in ${UTILITIES}; do \ 305 for file in ${UTILITIES}; do \
306 $(INSTALL_PROGRAM) $(INSTALL_STRIP) $$file ${archlibdir}/$$file ; \ 306 $(INSTALL_PROGRAM) $(INSTALL_STRIP) $$file $(DESTDIR)${archlibdir}/$$file ; \
307 done ; \ 307 done ; \
308 fi 308 fi
309 $(top_srcdir)/mkinstalldirs ${gamedir} 309 $(top_srcdir)/mkinstalldirs $(DESTDIR)${gamedir}
310 touch ${gamedir}/snake-scores 310 touch $(DESTDIR)${gamedir}/snake-scores
311 touch ${gamedir}/tetris-scores 311 touch $(DESTDIR)${gamedir}/tetris-scores
312/* If the following commands fail, that is not a big deal. 312/* If the following commands fail, that is not a big deal.
313 update-game-score will detect at runtime that it is not setuid, 313 update-game-score will detect at runtime that it is not setuid,
314 and handle things accordingly. */ 314 and handle things accordingly. */
315 -if chown ${gameuser} ${archlibdir}/update-game-score && chmod u+s ${archlibdir}/update-game-score; then \ 315 -if chown ${gameuser} $(DESTDIR)${archlibdir}/update-game-score && chmod u+s $(DESTDIR)${archlibdir}/update-game-score; then \
316 chown ${gameuser} ${gamedir}; \ 316 chown ${gameuser} $(DESTDIR)${gamedir}; \
317 chmod u=rwx,g=rwx,o=rx ${gamedir}; \ 317 chmod u=rwx,g=rwx,o=rx $(DESTDIR)${gamedir}; \
318 fi 318 fi
319 if [ `(cd ${archlibdir} && /bin/pwd)` \ 319 if [ `(cd $(DESTDIR)${archlibdir} && /bin/pwd)` \
320 != `(cd ${srcdir} && /bin/pwd)` ]; then \ 320 != `(cd ${srcdir} && /bin/pwd)` ]; then \
321 for file in ${SCRIPTS}; do \ 321 for file in ${SCRIPTS}; do \
322 $(INSTALL_PROGRAM) ${srcdir}/$$file ${archlibdir}/$$file; \ 322 $(INSTALL_PROGRAM) ${srcdir}/$$file $(DESTDIR)${archlibdir}/$$file; \
323 done ; \ 323 done ; \
324 fi 324 fi
325 325
326install: ${archlibdir} 326install: $(DESTDIR)${archlibdir}
327 @echo 327 @echo
328 @echo "Installing utilities for users to run." 328 @echo "Installing utilities for users to run."
329 for file in ${INSTALLABLES} ; do \ 329 for file in ${INSTALLABLES} ; do \
330 $(INSTALL_PROGRAM) $(INSTALL_STRIP) $${file} ${bindir}/`echo $${file} | sed '$(TRANSFORM)'` ; \ 330 $(INSTALL_PROGRAM) $(INSTALL_STRIP) $${file} $(DESTDIR)${bindir}/`echo $${file} | sed '$(TRANSFORM)'` ; \
331 chmod a+rx ${bindir}/`echo $${file} | sed '$(TRANSFORM)'`; \ 331 chmod a+rx $(DESTDIR)${bindir}/`echo $${file} | sed '$(TRANSFORM)'`; \
332 done 332 done
333 for file in ${INSTALLABLE_SCRIPTS} ; do \ 333 for file in ${INSTALLABLE_SCRIPTS} ; do \
334 $(INSTALL_PROGRAM) ${srcdir}/$${file} ${bindir}/`echo $${file} | sed '$(TRANSFORM)'` ; \ 334 $(INSTALL_PROGRAM) ${srcdir}/$${file} $(DESTDIR)${bindir}/`echo $${file} | sed '$(TRANSFORM)'` ; \
335 chmod a+rx ${bindir}/`echo $${file} | sed '$(TRANSFORM)'`; \ 335 chmod a+rx $(DESTDIR)${bindir}/`echo $${file} | sed '$(TRANSFORM)'`; \
336 done 336 done
337 337
338uninstall: 338uninstall:
339 (cd ${bindir}; \ 339 (cd $(DESTDIR)${bindir}; \
340 for file in ${INSTALLABLES} ${INSTALLABLE_SCRIPTS}; do \ 340 for file in ${INSTALLABLES} ${INSTALLABLE_SCRIPTS}; do \
341 rm -f ${bindir}/`echo $${file} | sed '$(TRANSFORM)'` ; \ 341 rm -f $(DESTDIR)${bindir}/`echo $${file} | sed '$(TRANSFORM)'` ; \
342 done) 342 done)
343 (cd ${archlibdir}; \ 343 (cd $(DESTDIR)${archlibdir}; \
344 rm -f ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS}) 344 rm -f ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS})
345 345
346mostlyclean: 346mostlyclean: