aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.in
diff options
context:
space:
mode:
authorPaul Eggert <[email protected]>2013-09-03 23:45:44 -0700
committerPaul Eggert <[email protected]>2013-09-03 23:45:44 -0700
commit224e313d3bed309a304683c83afe58752cb97e1c (patch)
tree952d4a791e20e1b917b9ca8c3610bfaaecfd64f2 /Makefile.in
parent6d6ed1af817d98f7e78a8be10f5fda14a41e18f6 (diff)
Makefile improvements.
* Makefile.in (lib): Depend on am--refresh, to avoid a race. (src): Remove duplicate dependency on FRC. Invoke just one submake, not two. Avoid the need for 'pwd'. * lwlib/Makefile.in (all): Put this first. Don't use double-colon rules, as they are not portable according to POSIX. Mark as phony. * oldXMenu/Makefile.in (all, tags): Don't use double-colon rules, as they are not portable according to POSIX. Mark as phony. * src/Makefile.in (config.status): Don't use double-colon rules, as they are not portable according to POSIX. Fix shell typo with `; I guess this rule has never been tested? (VCSWITNESS): New macro, to override any environment var.
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in27
1 files changed, 14 insertions, 13 deletions
diff --git a/Makefile.in b/Makefile.in
index 8e3a846c8d..204099cc20 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -352,9 +352,13 @@ epaths-force-w32: FRC
-e "/^.*#/s|@SRC@|$${w32srcdir}|g") && \
${srcdir}/build-aux/move-if-change epaths.h.$$$$ src/epaths.h
+# If lib/Makefile would build files in '.', then build them before
+# building 'lib', to avoid races with parallel makes.
+lib: am--refresh
+
lib-src src: $(NTDIR) lib
-src: lib-src FRC
+src: lib-src
# We need to build `emacs' in `src' to compile the *.elc files in `lisp'
# and `leim'.
@@ -376,18 +380,15 @@ lib lib-src lisp leim nt: Makefile FRC
# all preloaded elisp files, and only then dump the actual src/emacs, which
# is not wrong, but is overkill in 99.99% of the cases.
src: Makefile FRC
- boot=bootstrap-emacs$(EXEEXT); \
- if [ ! -x "src/$$boot" ]; then \
- cd $@; $(MAKE) all $(MFLAGS) \
- CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \
- LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="$$boot"; \
- fi;
- if [ -r .bzr/checkout/dirstate ]; then \
- vcswitness="`pwd`/.bzr/checkout/dirstate"; \
- fi; \
- cd $@; $(MAKE) all $(MFLAGS) \
- CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \
- LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="" \
+ dirstate='.bzr/checkout/dirstate'; \
+ vcswitness='$$(srcdir)/../'$$dirstate; \
+ [ -r "$(srcdir)/$$dirstate" ] || vcswitness=''; \
+ cd $@ || exit; \
+ boot=bootstrap-emacs$(EXEEXT); \
+ [ ! -x "$$boot" ] || boot=''; \
+ $(MAKE) all $(MFLAGS) \
+ CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \
+ LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="$$boot" \
VCSWITNESS="$$vcswitness"
blessmail: Makefile src FRC