From d703a4dce564ede122f5c307889e4bd0e3f3e75c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 11 Jan 2015 18:19:31 -0800 Subject: [PATCH] Have 'make' output better GEN names * lisp/Makefile.in (PHONY_EXTRAS): New macro. (.PHONY): Depend on it, and on $(lisp)/loaddefs.el, so that the relevant files' time stamps are ignored. (custom-deps, $(lisp)/cus-load.el, finder-data) ($(lisp)/finder-inf.el): Use PHONY_EXTRAS. (custom-deps, $(lisp)/cus-load.el, finder-data) ($(lisp)/finder-inf.el, autoloads, $(lisp)/loaddefs.el) ($(lisp)/subdirs.el, update-subdirs): Output more-accurate destination names with GEN. * src/Makefile.in (gl-stamp, globals.h): Simplify by putting the new contents of globals.h into gl-stamp. This lets us use AM_V_GEN more naturally so that 'make' can output more-accurate names. --- lisp/ChangeLog | 11 +++++++++++ lisp/Makefile.in | 21 ++++++++++++--------- src/ChangeLog | 7 +++++++ src/Makefile.in | 9 ++++----- 4 files changed, 34 insertions(+), 14 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7a208225d40..6a478537532 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,16 @@ 2015-01-12 Paul Eggert + Have 'make' output better GEN names + * Makefile.in (PHONY_EXTRAS): New macro. + (.PHONY): Depend on it, and on $(lisp)/loaddefs.el, so that the + relevant files' time stamps are ignored. + (custom-deps, $(lisp)/cus-load.el, finder-data) + ($(lisp)/finder-inf.el): Use PHONY_EXTRAS. + (custom-deps, $(lisp)/cus-load.el, finder-data) + ($(lisp)/finder-inf.el, autoloads, $(lisp)/loaddefs.el) + ($(lisp)/subdirs.el, update-subdirs): + Output more-accurate destination names with GEN. + Say "ELC foo.elc" instead of "GEN foo.elc" * Makefile.in (AM_V_ELC, am__v_ELC_, am__v_ELC_0, am__v_ELC_1): New macros. diff --git a/lisp/Makefile.in b/lisp/Makefile.in index bb61cab8875..7bf53861e71 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -150,7 +150,8 @@ setwins_for_subdirs=for file in `find ${srcdir} -type d -print`; do \ # we add them here to make sure they get built. all: compile-main $(lisp)/cus-load.el $(lisp)/finder-inf.el -.PHONY: all custom-deps finder-data autoloads update-subdirs +PHONY_EXTRAS = +.PHONY: all custom-deps finder-data autoloads update-subdirs $(PHONY_EXTRAS) # custom-deps and finder-data both used to scan _all_ the *.el files. # This could lead to problems in parallel builds if automatically @@ -166,18 +167,19 @@ all: compile-main $(lisp)/cus-load.el $(lisp)/finder-inf.el # Nowadays these commands don't scan automatically generated files, # since they will never contain any useful information # (see finder-no-scan-regexp and custom-dependencies-no-scan-regexp). -$(lisp)/cus-load.el: - $(MAKE) custom-deps custom-deps: + $(AM_V_at)$(MAKE) PHONY_EXTRAS=$(lisp)/cus-load.el $(lisp)/cus-load.el +$(lisp)/cus-load.el: $(AM_V_GEN)$(setwins_almost); \ echo Directories: $$wins; \ $(emacs) -l cus-dep \ --eval '(setq generated-custom-dependencies-file (unmsys--file-name "$(srcdir)/cus-load.el"))' \ -f custom-make-dependencies $$wins -$(lisp)/finder-inf.el: - $(MAKE) finder-data finder-data: + $(AM_V_at)$(MAKE) PHONY_EXTRAS=$(lisp)/finder-inf.el \ + $(lisp)/finder-inf.el +$(lisp)/finder-inf.el: $(AM_V_GEN)$(setwins_finder); \ echo Directories: $$wins; \ $(emacs) -l finder \ @@ -190,21 +192,22 @@ finder-data: # Note that we set no-update-autoloads in _generated_ leim files. # If you want to allow autoloads in such files, remove that, # and make this depend on leim. -autoloads: $(LOADDEFS) +autoloads .PHONY: $(lisp)/loaddefs.el +$(lisp)/loaddefs.el: $(LOADDEFS) $(AM_V_GEN)$(setwins_almost); \ echo Directories: $$wins; \ $(emacs) -l autoload \ --eval '(setq autoload-ensure-writable t)' \ --eval '(setq autoload-builtin-package-versions t)' \ - --eval '(setq generated-autoload-file (expand-file-name (unmsys--file-name "$(srcdir)/loaddefs.el")))' \ + --eval '(setq generated-autoload-file (expand-file-name (unmsys--file-name "$@")))' \ -f batch-update-autoloads $$wins # This is required by the bootstrap-emacs target in ../src/Makefile, so # we know that if we have an emacs executable, we also have a subdirs.el. $(lisp)/subdirs.el: - $(MAKE) update-subdirs + $(AM_V_GEN)$(MAKE) update-subdirs update-subdirs: - $(AM_V_GEN)$(setwins_for_subdirs); \ + $(AM_V_at)$(setwins_for_subdirs); \ for file in $$wins; do \ $(srcdir)/../build-aux/update-subdirs $$file; \ done; diff --git a/src/ChangeLog b/src/ChangeLog index 3767622836e..75e9ad51835 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2015-01-12 Paul Eggert + + Have 'make' output better GEN names + * Makefile.in (gl-stamp, globals.h): Simplify by putting the new + contents of globals.h into gl-stamp. This lets us use AM_V_GEN + more naturally so that 'make' can output more-accurate names. + 2015-01-11 Stefan Monnier * buffer.c (init_buffer_once): Initialize buffer_local_flags before diff --git a/src/Makefile.in b/src/Makefile.in index a2754eadacd..2ac34f5c44d 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -492,14 +492,13 @@ buildobj.h: Makefile done >$@.tmp $(AM_V_at)mv $@.tmp $@ -globals.h: gl-stamp; @true - GLOBAL_SOURCES = $(base_obj:.o=.c) $(NS_OBJC_OBJ:.o=.m) gl-stamp: $(libsrc)/make-docfile$(EXEEXT) $(GLOBAL_SOURCES) - $(AM_V_GEN)$(libsrc)/make-docfile -d $(srcdir) -g $(obj) > gl.tmp - $(AM_V_at)$(top_srcdir)/build-aux/move-if-change gl.tmp globals.h - $(AM_V_at)echo timestamp > $@ + $(AM_V_GEN)$(libsrc)/make-docfile -d $(srcdir) -g $(obj) >$@ + +globals.h: gl-stamp + $(AM_V_GEN)cmp $< $@ >/dev/null || cp $< $@ $(ALLOBJS): globals.h -- 2.39.2