aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2013-09-03 23:45:44 -0700
committerPaul Eggert2013-09-03 23:45:44 -0700
commit224e313d3bed309a304683c83afe58752cb97e1c (patch)
tree952d4a791e20e1b917b9ca8c3610bfaaecfd64f2
parent6d6ed1af817d98f7e78a8be10f5fda14a41e18f6 (diff)
downloademacs-224e313d3bed309a304683c83afe58752cb97e1c.tar.gz
emacs-224e313d3bed309a304683c83afe58752cb97e1c.zip
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.
-rw-r--r--ChangeLog7
-rw-r--r--Makefile.in27
-rw-r--r--lwlib/ChangeLog6
-rw-r--r--lwlib/Makefile.in5
-rw-r--r--oldXMenu/ChangeLog6
-rw-r--r--oldXMenu/Makefile.in6
-rw-r--r--src/ChangeLog8
-rw-r--r--src/Makefile.in14
8 files changed, 54 insertions, 25 deletions
diff --git a/ChangeLog b/ChangeLog
index ba6c22c13b6..b25d30f42ca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
12013-09-04 Paul Eggert <eggert@cs.ucla.edu>
2
3 Makefile improvements.
4 * Makefile.in (lib): Depend on am--refresh, to avoid a race.
5 (src): Remove duplicate dependency on FRC.
6 Invoke just one submake, not two. Avoid the need for 'pwd'.
7
12013-09-02 Jan Djärv <jan.h.d@swipnet.se> 82013-09-02 Jan Djärv <jan.h.d@swipnet.se>
2 9
3 * configure.ac: Add ns_check_file. 10 * configure.ac: Add ns_check_file.
diff --git a/Makefile.in b/Makefile.in
index 8e3a846c8df..204099cc202 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -352,9 +352,13 @@ epaths-force-w32: FRC
352 -e "/^.*#/s|@SRC@|$${w32srcdir}|g") && \ 352 -e "/^.*#/s|@SRC@|$${w32srcdir}|g") && \
353 ${srcdir}/build-aux/move-if-change epaths.h.$$$$ src/epaths.h 353 ${srcdir}/build-aux/move-if-change epaths.h.$$$$ src/epaths.h
354 354
355# If lib/Makefile would build files in '.', then build them before
356# building 'lib', to avoid races with parallel makes.
357lib: am--refresh
358
355lib-src src: $(NTDIR) lib 359lib-src src: $(NTDIR) lib
356 360
357src: lib-src FRC 361src: lib-src
358 362
359# We need to build `emacs' in `src' to compile the *.elc files in `lisp' 363# We need to build `emacs' in `src' to compile the *.elc files in `lisp'
360# and `leim'. 364# and `leim'.
@@ -376,18 +380,15 @@ lib lib-src lisp leim nt: Makefile FRC
376# all preloaded elisp files, and only then dump the actual src/emacs, which 380# all preloaded elisp files, and only then dump the actual src/emacs, which
377# is not wrong, but is overkill in 99.99% of the cases. 381# is not wrong, but is overkill in 99.99% of the cases.
378src: Makefile FRC 382src: Makefile FRC
379 boot=bootstrap-emacs$(EXEEXT); \ 383 dirstate='.bzr/checkout/dirstate'; \
380 if [ ! -x "src/$$boot" ]; then \ 384 vcswitness='$$(srcdir)/../'$$dirstate; \
381 cd $@; $(MAKE) all $(MFLAGS) \ 385 [ -r "$(srcdir)/$$dirstate" ] || vcswitness=''; \
382 CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \ 386 cd $@ || exit; \
383 LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="$$boot"; \ 387 boot=bootstrap-emacs$(EXEEXT); \
384 fi; 388 [ ! -x "$$boot" ] || boot=''; \
385 if [ -r .bzr/checkout/dirstate ]; then \ 389 $(MAKE) all $(MFLAGS) \
386 vcswitness="`pwd`/.bzr/checkout/dirstate"; \ 390 CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \
387 fi; \ 391 LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="$$boot" \
388 cd $@; $(MAKE) all $(MFLAGS) \
389 CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \
390 LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="" \
391 VCSWITNESS="$$vcswitness" 392 VCSWITNESS="$$vcswitness"
392 393
393blessmail: Makefile src FRC 394blessmail: Makefile src FRC
diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog
index a9e424ac4b3..5a1018f85e5 100644
--- a/lwlib/ChangeLog
+++ b/lwlib/ChangeLog
@@ -1,3 +1,9 @@
12013-09-04 Paul Eggert <eggert@cs.ucla.edu>
2
3 Makefile improvements.
4 * Makefile.in (all): Put this first. Don't use double-colon
5 rules, as they are not portable according to POSIX. Mark as phony.
6
12013-06-30 Paul Eggert <eggert@cs.ucla.edu> 72013-06-30 Paul Eggert <eggert@cs.ucla.edu>
2 8
3 Fix minor problems found by static checking. 9 Fix minor problems found by static checking.
diff --git a/lwlib/Makefile.in b/lwlib/Makefile.in
index f228221c45d..40f4a405e97 100644
--- a/lwlib/Makefile.in
+++ b/lwlib/Makefile.in
@@ -59,11 +59,12 @@ ALL_CFLAGS= $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \
59 -Demacs -I../src \ 59 -Demacs -I../src \
60 -I$(srcdir) -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib 60 -I$(srcdir) -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib
61 61
62all: liblw.a
63.PHONY: all
64
62.c.o: 65.c.o:
63 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< 66 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
64 67
65all:: liblw.a
66
67liblw.a: $(OBJS) 68liblw.a: $(OBJS)
68 rm -f $@ 69 rm -f $@
69 $(AR) $(ARFLAGS) $@ $(OBJS) 70 $(AR) $(ARFLAGS) $@ $(OBJS)
diff --git a/oldXMenu/ChangeLog b/oldXMenu/ChangeLog
index 8f2951700e8..21acbe83053 100644
--- a/oldXMenu/ChangeLog
+++ b/oldXMenu/ChangeLog
@@ -1,3 +1,9 @@
12013-09-04 Paul Eggert <eggert@cs.ucla.edu>
2
3 Makefile improvements.
4 * Makefile.in (all, tags): Don't use double-colon rules, as they
5 are not portable according to POSIX. Mark as phony.
6
12012-12-04 Paul Eggert <eggert@cs.ucla.edu> 72012-12-04 Paul Eggert <eggert@cs.ucla.edu>
2 8
3 Include <config.h> uniformly in oldXMenu sources. 9 Include <config.h> uniformly in oldXMenu sources.
diff --git a/oldXMenu/Makefile.in b/oldXMenu/Makefile.in
index b08e6649cbd..394bfb3ab50 100644
--- a/oldXMenu/Makefile.in
+++ b/oldXMenu/Makefile.in
@@ -85,7 +85,8 @@ OBJS = Activate.o \
85 SetSel.o \ 85 SetSel.o \
86 XDelAssoc.o XLookAssoc.o XCrAssoc.o XDestAssoc.o XMakeAssoc.o 86 XDelAssoc.o XLookAssoc.o XCrAssoc.o XDestAssoc.o XMakeAssoc.o
87 87
88all:: libXMenu11.a 88all: libXMenu11.a
89.PHONY: all
89 90
90ALL_CFLAGS=$(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \ 91ALL_CFLAGS=$(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \
91 $(C_SWITCH_X_SITE) \ 92 $(C_SWITCH_X_SITE) \
@@ -139,5 +140,6 @@ distclean: clean
139 rm -f Makefile 140 rm -f Makefile
140maintainer-clean: distclean 141maintainer-clean: distclean
141 142
142tags:: 143tags:
143 $(TAGS) -t *.[ch] 144 $(TAGS) -t *.[ch]
145.PHONY: tags
diff --git a/src/ChangeLog b/src/ChangeLog
index c355232482f..39d2f2f412a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12013-09-04 Paul Eggert <eggert@cs.ucla.edu>
2
3 Makefile improvements.
4 * Makefile.in (config.status): Don't use double-colon rules, as
5 they are not portable according to POSIX. Fix shell typo with `;
6 I guess this rule has never been tested?
7 (VCSWITNESS): New macro, to override any environment var.
8
12013-09-04 Dmitry Antipov <dmantipov@yandex.ru> 92013-09-04 Dmitry Antipov <dmantipov@yandex.ru>
2 10
3 * xterm.h (struct x_display_info): Do not track X connection 11 * xterm.h (struct x_display_info): Do not track X connection
diff --git a/src/Makefile.in b/src/Makefile.in
index 0e7ff9cbd33..fe8d2d13ce0 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -538,14 +538,9 @@ stamp-oldxmenu: $(OLDXMENU_DEPS)
538 538
539$(OLDXMENU): $(OLDXMENU_TARGET) 539$(OLDXMENU): $(OLDXMENU_TARGET)
540 540
541../config.status:: epaths.in 541../config.status: config.in epaths.in
542 @echo "The file epaths.h needs to be set up from epaths.in." 542 @echo "The file ${?:.in=.h} needs to be set up from $?."
543 @echo "Please run the `configure' script again." 543 @echo "Please run the 'configure' script again."
544 exit 1
545
546../config.status:: config.in
547 @echo "The file config.h needs to be set up from config.in."
548 @echo "Please run the `configure' script again."
549 exit 1 544 exit 1
550 545
551doc.o: buildobj.h 546doc.o: buildobj.h
@@ -658,6 +653,9 @@ $(lisp): $(BOOTSTRAPEMACS)
658 653
659## VCSWITNESS points to the file that holds info about the current checkout. 654## VCSWITNESS points to the file that holds info about the current checkout.
660## We use it as a heuristic to decide when to rebuild loaddefs.el. 655## We use it as a heuristic to decide when to rebuild loaddefs.el.
656## If empty it is ignored; the parent makefile can set it to some other value.
657VCSWITNESS =
658
661$(lispsource)/loaddefs.el: $(BOOTSTRAPEMACS) $(VCSWITNESS) 659$(lispsource)/loaddefs.el: $(BOOTSTRAPEMACS) $(VCSWITNESS)
662 cd ../lisp; $(MAKE) $(MFLAGS) autoloads EMACS=$(bootstrap_exe) 660 cd ../lisp; $(MAKE) $(MFLAGS) autoloads EMACS=$(bootstrap_exe)
663 661