aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2014-12-30 23:29:33 -0800
committerPaul Eggert2014-12-30 23:50:55 -0800
commit25346768fac53687c97c213fb99ff18fa805b073 (patch)
tree5168d7ec57e9961515483f3c49ed66a25dcba7d2 /src
parent6654a4ce49b9eb76a1e5b911516a8d1b247b7c30 (diff)
downloademacs-25346768fac53687c97c213fb99ff18fa805b073.tar.gz
emacs-25346768fac53687c97c213fb99ff18fa805b073.zip
Simplify setfattr use by assuming GNU make
* Makefile.in (PAXCTL_if_present, SETFATTR_if_present): New macros. (emacs$(EXEEXT), temacs$(EXEEXT), bootstrap-emacs$(EXEEXT)): Use them. Simplify by using GNU make rather than shell conditionals, by using ln -f rather than rm -f followed by ln, and by preferring $@ to spelling out the destination.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog9
-rw-r--r--src/Makefile.in43
2 files changed, 29 insertions, 23 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 51e8d112c9d..85eb113db82 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
12014-12-31 Paul Eggert <eggert@cs.ucla.edu>
2
3 Simplify setfattr use by assuming GNU make
4 * Makefile.in (PAXCTL_if_present, SETFATTR_if_present): New macros.
5 (emacs$(EXEEXT), temacs$(EXEEXT), bootstrap-emacs$(EXEEXT)): Use them.
6 Simplify by using GNU make rather than shell conditionals,
7 by using ln -f rather than rm -f followed by ln,
8 and by preferring $@ to spelling out the destination.
9
12014-12-29 Eli Zaretskii <eliz@gnu.org> 102014-12-29 Eli Zaretskii <eliz@gnu.org>
2 11
3 * sysdep.c [WINDOWSNT]: Include sys/socket.h, without which this 12 * sysdep.c [WINDOWSNT]: Include sys/socket.h, without which this
diff --git a/src/Makefile.in b/src/Makefile.in
index 00ac04aa836..812f3e22143 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -114,6 +114,8 @@ TEMACS_LDFLAGS = $(LD_SWITCH_SYSTEM) $(LD_SWITCH_SYSTEM_TEMACS)
114## around this, newer ones setfattr. See Bug#11398 and Bug#16343. 114## around this, newer ones setfattr. See Bug#11398 and Bug#16343.
115PAXCTL = @PAXCTL@ 115PAXCTL = @PAXCTL@
116SETFATTR = @SETFATTR@ 116SETFATTR = @SETFATTR@
117PAXCTL_if_present = $(or $(PAXCTL),: paxctl)
118SETFATTR_if_present = $(or $(SETFATTR),: setfattr)
117 119
118## Some systems define this to request special libraries. 120## Some systems define this to request special libraries.
119LIBS_SYSTEM=@LIBS_SYSTEM@ 121LIBS_SYSTEM=@LIBS_SYSTEM@
@@ -449,17 +451,13 @@ $(srcdir)/macuvs.h $(lispsource)/international/charprop.el: \
449emacs$(EXEEXT): temacs$(EXEEXT) \ 451emacs$(EXEEXT): temacs$(EXEEXT) \
450 $(etc)/DOC $(lisp) $(leimdir)/leim-list.el \ 452 $(etc)/DOC $(lisp) $(leimdir)/leim-list.el \
451 $(lispsource)/international/charprop.el 453 $(lispsource)/international/charprop.el
452 if test "$(CANNOT_DUMP)" = "yes"; then \ 454ifeq ($(CANNOT_DUMP),yes)
453 rm -f emacs$(EXEEXT); \ 455 ln -f temacs$(EXEEXT) $@
454 ln temacs$(EXEEXT) emacs$(EXEEXT); \ 456else
455 else \ 457 LC_ALL=C $(RUN_TEMACS) -batch -l loadup dump
456 LC_ALL=C $(RUN_TEMACS) -batch -l loadup dump || exit 1; \ 458 $(PAXCTL_if_present) -zex $@
457 test "X$(PAXCTL)" = X || $(PAXCTL) -zex emacs$(EXEEXT); \ 459 ln -f $@ bootstrap-emacs$(EXEEXT)
458 while test -f bootstrap-emacs$(EXEEXT); do \ 460endif
459 rm -f bootstrap-emacs$(EXEEXT); \
460 done; \
461 ln emacs$(EXEEXT) bootstrap-emacs$(EXEEXT); \
462 fi
463 461
464## We run make-docfile twice because the command line may get too long 462## We run make-docfile twice because the command line may get too long
465## on some systems. The sed command operating on lisp.mk also reduces 463## on some systems. The sed command operating on lisp.mk also reduces
@@ -517,10 +515,10 @@ temacs$(EXEEXT): $(LIBXMENU) $(ALLOBJS) \
517 $(AM_V_CCLD)$(CC) $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \ 515 $(AM_V_CCLD)$(CC) $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \
518 -o temacs $(ALLOBJS) $(lib)/libgnu.a $(W32_RES_LINK) $(LIBES) 516 -o temacs $(ALLOBJS) $(lib)/libgnu.a $(W32_RES_LINK) $(LIBES)
519 $(MKDIR_P) $(etc) 517 $(MKDIR_P) $(etc)
520 test "$(CANNOT_DUMP)" = "yes" || \ 518ifneq ($(CANNOT_DUMP),yes)
521 test "X$(PAXCTL)" = X || $(PAXCTL) -r temacs$(EXEEXT) 519 $(PAXCTL_if_present) -r $@
522 test "$(CANNOT_DUMP)" = "yes" || test -z "$(SETFATTR)" || \ 520 $(SETFATTR_if_present) -n user.pax.flags -v er $@
523 $(SETFATTR) -n user.pax.flags -v er $@ 521endif
524 522
525## The following oldxmenu-related rules are only (possibly) used if 523## The following oldxmenu-related rules are only (possibly) used if
526## HAVE_X11 && !USE_GTK, but there is no harm in always defining them. 524## HAVE_X11 && !USE_GTK, but there is no harm in always defining them.
@@ -652,14 +650,13 @@ $(lispsource)/loaddefs.el: $(VCSWITNESS) | bootstrap-emacs$(EXEEXT)
652## files from loadup.el in source form. 650## files from loadup.el in source form.
653bootstrap-emacs$(EXEEXT): temacs$(EXEEXT) 651bootstrap-emacs$(EXEEXT): temacs$(EXEEXT)
654 $(MAKE) -C ../lisp update-subdirs 652 $(MAKE) -C ../lisp update-subdirs
655 if test "$(CANNOT_DUMP)" = "yes"; then \ 653ifeq ($(CANNOT_DUMP),yes)
656 rm -f bootstrap-emacs$(EXEEXT); \ 654 ln -f temacs$(EXEEXT) $@
657 ln temacs$(EXEEXT) bootstrap-emacs$(EXEEXT); \ 655else
658 else \ 656 $(RUN_TEMACS) --batch --load loadup bootstrap
659 $(RUN_TEMACS) --batch --load loadup bootstrap || exit 1; \ 657 $(PAXCTL_if_present) -zex emacs$(EXEEXT)
660 test "X$(PAXCTL)" = X || $(PAXCTL) -zex emacs$(EXEEXT); \ 658 mv -f emacs$(EXEEXT) $@
661 mv -f emacs$(EXEEXT) bootstrap-emacs$(EXEEXT); \ 659endif
662 fi
663 @: Compile some files earlier to speed up further compilation. 660 @: Compile some files earlier to speed up further compilation.
664 $(MAKE) -C ../lisp compile-first EMACS="$(bootstrap_exe)" 661 $(MAKE) -C ../lisp compile-first EMACS="$(bootstrap_exe)"
665 662