From 4939f58d2c45062d5eac3f4c845b4494cf113f1f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 13 Jul 2014 08:50:35 -0700 Subject: [PATCH] Improve behavior of 'bzr up; cd src; make -k'. * Makefile.in (ACLOCAL_INPUTS): Add all m4/*.m4 files. * src/Makefile.in (top_srcdir): New var. (ntsource, lispsource, ALL_CFLAGS, gl-stamp, emacs.res): Use '$(top_srcdir)' instead of '$(srcdir)/..'; its expansion is a bit shorter. (../config.status): Actually build config.status instead of just complaining. (ACLOCAL_INPUTS, AUTOCONF_INPUTS): New macros, copied and relocated from ../Makefile.in. ($(top_srcdir)/aclocal.m4, $(top_srcdir)/configure, config.in) (../config.status, Makefile): New dependencies and rules, copied with relocation from ../Makefile.in. This should be more likely to rebuild the build machinery properly if you do a 'make' in the src directory. --- ChangeLog | 5 +++++ Makefile.in | 2 +- src/ChangeLog | 17 +++++++++++++++++ src/Makefile.in | 25 ++++++++++++++++--------- 4 files changed, 39 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index f8852211e9a..f694a42202b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-07-13 Paul Eggert + + Improve behavior of 'bzr up; cd src; make -k'. + * Makefile.in (ACLOCAL_INPUTS): Add all m4/*.m4 files. + 2014-07-12 Paul Eggert Merge from gnulib, incorporating: diff --git a/Makefile.in b/Makefile.in index 6b24147c8d3..a6080e5ce78 100644 --- a/Makefile.in +++ b/Makefile.in @@ -413,7 +413,7 @@ $(srcdir)/configure: $(AUTOCONF_INPUTS) cd ${srcdir} && ${AUTOCONF} ACLOCAL_PATH = @ACLOCAL_PATH@ -ACLOCAL_INPUTS = $(srcdir)/configure.ac $(srcdir)/m4/gnulib-comp.m4 +ACLOCAL_INPUTS = $(srcdir)/configure.ac $(wildcard $(srcdir)/m4/*.m4) $(srcdir)/aclocal.m4: $(ACLOCAL_INPUTS) cd $(srcdir) && ACLOCAL_PATH='$(ACLOCAL_PATH)' $(ACLOCAL) -I m4 diff --git a/src/ChangeLog b/src/ChangeLog index 47b0927bbb7..877898443ec 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,20 @@ +2014-07-13 Paul Eggert + + Improve behavior of 'bzr up; cd src; make -k'. + * Makefile.in (top_srcdir): New var. + (ntsource, lispsource, ALL_CFLAGS, gl-stamp, emacs.res): + Use '$(top_srcdir)' instead of '$(srcdir)/..'; + its expansion is a bit shorter. + (../config.status): Actually build config.status instead of + just complaining. + (ACLOCAL_INPUTS, AUTOCONF_INPUTS): + New macros, copied and relocated from ../Makefile.in. + ($(top_srcdir)/aclocal.m4, $(top_srcdir)/configure, config.in) + (../config.status, Makefile): New dependencies and rules, + copied with relocation from ../Makefile.in. This should be more + likely to rebuild the build machinery properly if you do a 'make' + in the src directory. + 2014-07-12 Eli Zaretskii * xdisp.c (display_line): Don't call FETCH_BYTE with argument less diff --git a/src/Makefile.in b/src/Makefile.in index a13f7b8b8be..0dc48868dd8 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -28,9 +28,10 @@ SHELL = @SHELL@ # Here are the things that we expect ../configure to edit. # We use $(srcdir) explicitly in dependencies so as not to depend on VPATH. srcdir = @srcdir@ +top_srcdir = @top_srcdir@ # MinGW CPPFLAGS may use this. abs_top_srcdir=@abs_top_srcdir@ -ntsource = $(srcdir)/../nt +ntsource = $(top_srcdir)/nt VPATH = $(srcdir) CC = @CC@ WINDRES = @WINDRES@ @@ -48,7 +49,7 @@ MKDIR_P = @MKDIR_P@ # LIBS = @LIBS@ LIBOBJS = @LIBOBJS@ -lispsource = $(srcdir)/../lisp +lispsource = $(top_srcdir)/lisp lib = ../lib libsrc = ../lib-src etc = ../etc @@ -319,7 +320,7 @@ MKDEPDIR=@MKDEPDIR@ ## ## FIXME? MYCPPFLAGS only referenced in etc/DEBUG. ALL_CFLAGS=-Demacs $(MYCPPFLAGS) -I. -I$(srcdir) \ - -I$(lib) -I$(srcdir)/../lib \ + -I$(lib) -I$(top_srcdir)/lib \ $(C_SWITCH_MACHINE) $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \ $(GNUSTEP_CFLAGS) $(CFLAGS_SOUND) $(RSVG_CFLAGS) $(IMAGEMAGICK_CFLAGS) \ $(PNG_CFLAGS) $(LIBXML2_CFLAGS) $(DBUS_CFLAGS) \ @@ -474,7 +475,7 @@ GLOBAL_SOURCES = $(base_obj:.o=.c) $(NS_OBJC_OBJ:.o=.m) gl-stamp: $(libsrc)/make-docfile$(EXEEXT) $(GLOBAL_SOURCES) $(libsrc)/make-docfile -d $(srcdir) -g $(obj) > gl.tmp - $(srcdir)/../build-aux/move-if-change gl.tmp globals.h + $(top_srcdir)/build-aux/move-if-change gl.tmp globals.h echo timestamp > $@ $(ALLOBJS): globals.h @@ -505,17 +506,23 @@ $(oldXMenudir)/libXMenu11.a: FORCE FORCE: .PHONY: FORCE -../config.status: config.in epaths.in - @echo "The file ${?:.in=.h} needs to be set up from $?." - @echo "Please run the 'configure' script again." - exit 1 +ACLOCAL_INPUTS = $(top_srcdir)/configure.ac $(wildcard $(top_srcdir)/m4/*.m4) +AUTOCONF_INPUTS = $(top_srcdir)/configure.ac $(top_srcdir)/aclocal.m4 +$(top_srcdir)/aclocal.m4: $(ACLOCAL_INPUTS) +$(top_srcdir)/configure config.in: $(AUTOCONF_INPUTS) +.PRECIOUS: ../config.status Makefile +../config.status: $(top_srcdir)/configure $(top_srcdir)/lisp/version.el +Makefile: ../config.status $(srcdir)/Makefile.in +$(top_srcdir)/aclocal.m4 $(top_srcdir)/configure config.in ../config.status \ + Makefile: + $(MAKE) -C .. am--refresh doc.o: buildobj.h emacs.res: $(ntsource)/emacs.rc \ $(ntsource)/icons/emacs.ico \ $(ntsource)/$(EMACS_MANIFEST) - $(WINDRES) -O COFF --include-dir=$(srcdir)/../nt \ + $(WINDRES) -O COFF --include-dir=$(top_srcdir)/nt \ -o $@ $(ntsource)/emacs.rc .PHONY: ns-app -- 2.39.2