diff options
| author | Glenn Morris | 2012-05-17 14:26:51 -0400 |
|---|---|---|
| committer | Glenn Morris | 2012-05-17 14:26:51 -0400 |
| commit | 9f1ea7dcd994c63d754ba74fc3522fa725fd0f0d (patch) | |
| tree | d461aafad59ba1e82346e5e0b543bf03a54cca33 | |
| parent | ac348012f4f956fa7e64535a3875a32cff91503c (diff) | |
| download | emacs-9f1ea7dcd994c63d754ba74fc3522fa725fd0f0d.tar.gz emacs-9f1ea7dcd994c63d754ba74fc3522fa725fd0f0d.zip | |
Reduce some code duplication in Makefile.in
* Makefile.in (write_subdir): New.
(install-arch-indep): Use $write_subdir.
| -rw-r--r-- | ChangeLog | 3 | ||||
| -rw-r--r-- | Makefile.in | 30 |
2 files changed, 17 insertions, 16 deletions
| @@ -1,5 +1,8 @@ | |||
| 1 | 2012-05-17 Glenn Morris <rgm@gnu.org> | 1 | 2012-05-17 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * Makefile.in (write_subdir): New. | ||
| 4 | (install-arch-indep): Use $write_subdir. | ||
| 5 | |||
| 3 | * configure.in (docdir, etcdir, infodir, lispdir): | 6 | * configure.in (docdir, etcdir, infodir, lispdir): |
| 4 | For a self-contained ns build, set these to the appropriate values. | 7 | For a self-contained ns build, set these to the appropriate values. |
| 5 | * Makefile.in (install-arch-dep): No need to move info/ any more. | 8 | * Makefile.in (install-arch-dep): No need to move info/ any more. |
diff --git a/Makefile.in b/Makefile.in index 2f1a2345552..630ca2ff3ac 100644 --- a/Makefile.in +++ b/Makefile.in | |||
| @@ -514,6 +514,16 @@ set_installuser=for installuser in $${LOGNAME} $${USERNAME} $${USER} \ | |||
| 514 | ## Note that the Makefiles in the etc directory are potentially useful | 514 | ## Note that the Makefiles in the etc directory are potentially useful |
| 515 | ## in an installed Emacs, so should not be excluded. | 515 | ## in an installed Emacs, so should not be excluded. |
| 516 | 516 | ||
| 517 | ## Ensure that $subdir contains a subdirs.el file. | ||
| 518 | write_subdir=if [ -f $${subdir}/subdirs.el ]; \ | ||
| 519 | then true; \ | ||
| 520 | else \ | ||
| 521 | (echo "(if (fboundp 'normal-top-level-add-subdirs-to-load-path)"; \ | ||
| 522 | echo " (normal-top-level-add-subdirs-to-load-path))") \ | ||
| 523 | > $${subdir}/subdirs.el; \ | ||
| 524 | fi; \ | ||
| 525 | chmod a+r $${subdir}/subdirs.el | ||
| 526 | |||
| 517 | install-arch-indep: mkdir info install-etc | 527 | install-arch-indep: mkdir info install-etc |
| 518 | -set ${COPYDESTS} ; \ | 528 | -set ${COPYDESTS} ; \ |
| 519 | unset CDPATH; \ | 529 | unset CDPATH; \ |
| @@ -553,22 +563,10 @@ install-arch-indep: mkdir info install-etc | |||
| 553 | done | 563 | done |
| 554 | -rm -f $(DESTDIR)${lispdir}/subdirs.el | 564 | -rm -f $(DESTDIR)${lispdir}/subdirs.el |
| 555 | $(srcdir)/update-subdirs $(DESTDIR)${lispdir} | 565 | $(srcdir)/update-subdirs $(DESTDIR)${lispdir} |
| 556 | if [ -f $(DESTDIR)${datadir}/emacs/${version}/site-lisp/subdirs.el ]; \ | 566 | subdir=$(DESTDIR)${datadir}/emacs/${version}/site-lisp ; \ |
| 557 | then true; \ | 567 | ${write_subdir} |
| 558 | else \ | 568 | subdir=$(DESTDIR)${datadir}/emacs/site-lisp ; \ |
| 559 | (echo "(if (fboundp 'normal-top-level-add-subdirs-to-load-path)"; \ | 569 | ${write_subdir} || true |
| 560 | echo " (normal-top-level-add-subdirs-to-load-path))") \ | ||
| 561 | > $(DESTDIR)${datadir}/emacs/${version}/site-lisp/subdirs.el; \ | ||
| 562 | fi | ||
| 563 | chmod a+r $(DESTDIR)${datadir}/emacs/${version}/site-lisp/subdirs.el | ||
| 564 | -if [ -f $(DESTDIR)${datadir}/emacs/site-lisp/subdirs.el ]; \ | ||
| 565 | then true; \ | ||
| 566 | else \ | ||
| 567 | (echo "(if (fboundp 'normal-top-level-add-subdirs-to-load-path)"; \ | ||
| 568 | echo " (normal-top-level-add-subdirs-to-load-path))") \ | ||
| 569 | > $(DESTDIR)${datadir}/emacs/site-lisp/subdirs.el; \ | ||
| 570 | fi | ||
| 571 | -chmod a+r $(DESTDIR)${datadir}/emacs/site-lisp/subdirs.el | ||
| 572 | -unset CDPATH; \ | 570 | -unset CDPATH; \ |
| 573 | if [ `(cd ./etc; /bin/pwd)` != `(cd $(DESTDIR)${docdir}; /bin/pwd)` ]; \ | 571 | if [ `(cd ./etc; /bin/pwd)` != `(cd $(DESTDIR)${docdir}; /bin/pwd)` ]; \ |
| 574 | then \ | 572 | then \ |