aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2012-05-17 23:46:05 -0700
committerGlenn Morris2012-05-17 23:46:05 -0700
commitb533f05ef579b40dc2f056216f99a168b1314341 (patch)
treed55431736ddfdb33db40aabdc93f4fb3ccc71aa8
parent7606c36016cffd5d7a09fb440c4c9fd91c099596 (diff)
downloademacs-b533f05ef579b40dc2f056216f99a168b1314341.tar.gz
emacs-b533f05ef579b40dc2f056216f99a168b1314341.zip
Makefile simplifications related to creating installation directories
A separate mkdir rule is not needed, since MKDIR_P is thread-safe. * Makefile.in (install-arch-dep): Ensure bindir exists. Drop mkdir dependency. (install-arch-indep): Ensure docdir, infodir, mandir exist. (install-leim): Drop mkdir dependency. (mkdir): Remove most directories, now made in relevant rules.
-rw-r--r--ChangeLog6
-rw-r--r--Makefile.in21
2 files changed, 20 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 3d68a4bbc5f..3efaaf6cc25 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
12012-05-18 Glenn Morris <rgm@gnu.org> 12012-05-18 Glenn Morris <rgm@gnu.org>
2 2
3 * Makefile.in (install-arch-dep): Ensure bindir exists.
4 Drop mkdir dependency.
5 (install-arch-indep): Ensure docdir, infodir, mandir exist.
6 (install-leim): Drop mkdir dependency.
7 (mkdir): Remove most directories, now made in relevant rules.
8
3 * Makefile.in (install-arch-indep): Combine adjacent loops. 9 * Makefile.in (install-arch-indep): Combine adjacent loops.
4 10
52012-05-17 Glenn Morris <rgm@gnu.org> 112012-05-17 Glenn Morris <rgm@gnu.org>
diff --git a/Makefile.in b/Makefile.in
index 4398fe55cba..49fddba08c8 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -471,7 +471,8 @@ write_subdir=if [ -f $${subdir}/subdirs.el ]; \
471### to ensure that install-arch-indep finishes before this starts. 471### to ensure that install-arch-indep finishes before this starts.
472### (TODO Why would it be nice? Why not just make this depend on 472### (TODO Why would it be nice? Why not just make this depend on
473### install-arch-indep then?) 473### install-arch-indep then?)
474install-arch-dep: mkdir 474install-arch-dep:
475 umask 022; ${MKDIR_P} $(DESTDIR)${bindir}
475 (cd lib-src; \ 476 (cd lib-src; \
476 $(MAKE) install $(MFLAGS) prefix=${prefix} \ 477 $(MAKE) install $(MFLAGS) prefix=${prefix} \
477 exec_prefix=${exec_prefix} bindir=${bindir} \ 478 exec_prefix=${exec_prefix} bindir=${bindir} \
@@ -578,6 +579,7 @@ install-arch-indep: mkdir info install-etc
578 docfile="DOC"; \ 579 docfile="DOC"; \
579 fi; \ 580 fi; \
580 echo "Copying etc/$${docfile} to $(DESTDIR)${docdir} ..." ; \ 581 echo "Copying etc/$${docfile} to $(DESTDIR)${docdir} ..." ; \
582 umask 022; ${MKDIR_P} $(DESTDIR)${docdir} ; \
581 ${INSTALL_DATA} etc/$${docfile} $(DESTDIR)${docdir}/$${docfile}; \ 583 ${INSTALL_DATA} etc/$${docfile} $(DESTDIR)${docdir}/$${docfile}; \
582 (cd $(DESTDIR)$(docdir); \ 584 (cd $(DESTDIR)$(docdir); \
583 $(set_installuser); \ 585 $(set_installuser); \
@@ -592,6 +594,7 @@ install-arch-indep: mkdir info install-etc
592 ${GZIP_PROG} -9n `echo $$f|sed 's/.elc$$/.el/'` ; \ 594 ${GZIP_PROG} -9n `echo $$f|sed 's/.elc$$/.el/'` ; \
593 done) \ 595 done) \
594 else true; fi 596 else true; fi
597 umask 022; ${MKDIR_P} $(DESTDIR)${infodir}
595 -unset CDPATH; \ 598 -unset CDPATH; \
596 thisdir=`/bin/pwd`; \ 599 thisdir=`/bin/pwd`; \
597 if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd $(DESTDIR)${infodir} && /bin/pwd)` ]; \ 600 if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd $(DESTDIR)${infodir} && /bin/pwd)` ]; \
@@ -621,6 +624,7 @@ install-arch-indep: mkdir info install-etc
621 done); \ 624 done); \
622 else true; fi 625 else true; fi
623 -chmod -R a+r $(DESTDIR)${datadir}/emacs/${version} ${COPYDESTS} 626 -chmod -R a+r $(DESTDIR)${datadir}/emacs/${version} ${COPYDESTS}
627 umask 022; ${MKDIR_P} $(DESTDIR)${man1dir}
624 thisdir=`/bin/pwd`; \ 628 thisdir=`/bin/pwd`; \
625 cd ${mansrcdir}; \ 629 cd ${mansrcdir}; \
626 for page in *.1; do \ 630 for page in *.1; do \
@@ -655,20 +659,23 @@ install-etc:
655### have separate target here instead of including it in 659### have separate target here instead of including it in
656### `install-arch-indep'. People who extracted LEIM files after they 660### `install-arch-indep'. People who extracted LEIM files after they
657### installed Emacs itself can install only LEIM files by this target. 661### installed Emacs itself can install only LEIM files by this target.
658install-leim: leim/Makefile mkdir 662install-leim: leim/Makefile
659 cd leim && $(MAKE) $(MFLAGS) install 663 cd leim && $(MAKE) $(MFLAGS) install
660 664
661### Build Emacs and install it, stripping binaries while installing them. 665### Build Emacs and install it, stripping binaries while installing them.
662install-strip: 666install-strip:
663 $(MAKE) $(MFLAGS) INSTALL_STRIP=-s install 667 $(MAKE) $(MFLAGS) INSTALL_STRIP=-s install
664 668
665### Build some of the directories we're going to install Emacs in. 669## Note sure this serves any useful purpose.
670## If locallisppath has the default value, then the write_subdir commands
671## in install-arch-indep will create all these components.
672## This will only do something if locallisppath has a non-standard value.
673## Is it really Emacs job to create those directories?
674## Should we also be ensuring they contain subdirs.el files?
675## It would be easy to do.
666mkdir: FRC 676mkdir: FRC
667 umask 022 ; \ 677 umask 022 ; \
668 $(MKDIR_P) $(DESTDIR)${datadir} ${COPYDESTS} \ 678 $(MKDIR_P) $(DESTDIR)`echo ${locallisppath} | sed 's,:, $(DESTDIR),g'`
669 $(DESTDIR)${infodir} $(DESTDIR)${man1dir} \
670 $(DESTDIR)${bindir} $(DESTDIR)${docdir} $(DESTDIR)${libexecdir} \
671 $(DESTDIR)`echo ${locallisppath} | sed 's,:, $(DESTDIR),g'`
672 679
673### Delete all the installed files that the `install' target would 680### Delete all the installed files that the `install' target would
674### create (but not the noninstalled files such as `make all' would create). 681### create (but not the noninstalled files such as `make all' would create).