Commit b533f05e authored by Glenn Morris's avatar Glenn Morris

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.
parent 7606c360
2012-05-18 Glenn Morris <rgm@gnu.org>
* 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.
* Makefile.in (install-arch-indep): Combine adjacent loops.
2012-05-17 Glenn Morris <rgm@gnu.org>
......
......@@ -471,7 +471,8 @@ write_subdir=if [ -f $${subdir}/subdirs.el ]; \
### to ensure that install-arch-indep finishes before this starts.
### (TODO Why would it be nice? Why not just make this depend on
### install-arch-indep then?)
install-arch-dep: mkdir
install-arch-dep:
umask 022; ${MKDIR_P} $(DESTDIR)${bindir}
(cd lib-src; \
$(MAKE) install $(MFLAGS) prefix=${prefix} \
exec_prefix=${exec_prefix} bindir=${bindir} \
......@@ -578,6 +579,7 @@ install-arch-indep: mkdir info install-etc
docfile="DOC"; \
fi; \
echo "Copying etc/$${docfile} to $(DESTDIR)${docdir} ..." ; \
umask 022; ${MKDIR_P} $(DESTDIR)${docdir} ; \
${INSTALL_DATA} etc/$${docfile} $(DESTDIR)${docdir}/$${docfile}; \
(cd $(DESTDIR)$(docdir); \
$(set_installuser); \
......@@ -592,6 +594,7 @@ install-arch-indep: mkdir info install-etc
${GZIP_PROG} -9n `echo $$f|sed 's/.elc$$/.el/'` ; \
done) \
else true; fi
umask 022; ${MKDIR_P} $(DESTDIR)${infodir}
-unset CDPATH; \
thisdir=`/bin/pwd`; \
if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd $(DESTDIR)${infodir} && /bin/pwd)` ]; \
......@@ -621,6 +624,7 @@ install-arch-indep: mkdir info install-etc
done); \
else true; fi
-chmod -R a+r $(DESTDIR)${datadir}/emacs/${version} ${COPYDESTS}
umask 022; ${MKDIR_P} $(DESTDIR)${man1dir}
thisdir=`/bin/pwd`; \
cd ${mansrcdir}; \
for page in *.1; do \
......@@ -655,20 +659,23 @@ install-etc:
### have separate target here instead of including it in
### `install-arch-indep'. People who extracted LEIM files after they
### installed Emacs itself can install only LEIM files by this target.
install-leim: leim/Makefile mkdir
install-leim: leim/Makefile
cd leim && $(MAKE) $(MFLAGS) install
### Build Emacs and install it, stripping binaries while installing them.
install-strip:
$(MAKE) $(MFLAGS) INSTALL_STRIP=-s install
### Build some of the directories we're going to install Emacs in.
## Note sure this serves any useful purpose.
## If locallisppath has the default value, then the write_subdir commands
## in install-arch-indep will create all these components.
## This will only do something if locallisppath has a non-standard value.
## Is it really Emacs job to create those directories?
## Should we also be ensuring they contain subdirs.el files?
## It would be easy to do.
mkdir: FRC
umask 022 ; \
$(MKDIR_P) $(DESTDIR)${datadir} ${COPYDESTS} \
$(DESTDIR)${infodir} $(DESTDIR)${man1dir} \
$(DESTDIR)${bindir} $(DESTDIR)${docdir} $(DESTDIR)${libexecdir} \
$(DESTDIR)`echo ${locallisppath} | sed 's,:, $(DESTDIR),g'`
$(MKDIR_P) $(DESTDIR)`echo ${locallisppath} | sed 's,:, $(DESTDIR),g'`
### Delete all the installed files that the `install' target would
### create (but not the noninstalled files such as `make all' would create).
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment