diff options
author | Tom Tromey <tom@tromey.com> | 2017-11-21 12:15:33 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2017-11-27 16:53:21 -0700 |
commit | b22c88c2ca013cc25d7a8fcbc748122bb1a349bb (patch) | |
tree | eb14894718943eb3d5dfdf6de27efb022a5a6953 /gdb/Makefile.in | |
parent | 407e1140841f7fc337e90a7ba4482fb5a10c1701 (diff) | |
download | gdb-b22c88c2ca013cc25d7a8fcbc748122bb1a349bb.zip gdb-b22c88c2ca013cc25d7a8fcbc748122bb1a349bb.tar.gz gdb-b22c88c2ca013cc25d7a8fcbc748122bb1a349bb.tar.bz2 |
A simpler way to make the "arch" build directory
This implements a simpler way to make the "arch" build directory --
namely, now it is done as an order-only dependency in the Makefile,
rather than being created when config.status is run. This simpler
because it means that the build directories can be changed without
re-running autoconf.
ChangeLog
2017-11-27 Tom Tromey <tom@tromey.com>
* configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
* configure: Rebuild.
* Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
(CONFIG_DEP_SUBDIR): New variable.
(%.o): Add order-only dependency.
($(CONFIG_DEP_SUBDIR)): New target.
Diffstat (limited to 'gdb/Makefile.in')
-rw-r--r-- | gdb/Makefile.in | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 7198556..bbe4287 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -645,9 +645,11 @@ CONFIG_ALL = @CONFIG_ALL@ CONFIG_CLEAN = @CONFIG_CLEAN@ CONFIG_INSTALL = @CONFIG_INSTALL@ CONFIG_UNINSTALL = @CONFIG_UNINSTALL@ -CONFIG_SRC_SUBDIR = @CONFIG_SRC_SUBDIR@ HAVE_NATIVE_GCORE_TARGET = @HAVE_NATIVE_GCORE_TARGET@ +CONFIG_SRC_SUBDIR = arch +CONFIG_DEP_SUBDIR = $(addsuffix /$(DEPDIR),$(CONFIG_SRC_SUBDIR)) + # -I. for config files. # -I$(srcdir) for gdb internal headers. # -I$(srcdir)/config for more generic config files. @@ -1927,10 +1929,14 @@ all: gdb$(EXEEXT) $(CONFIG_ALL) @$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do # Rule for compiling .c files in the top-level gdb directory. -%.o: %.c +# The order-only dependencies ensure that we create the build subdirectories. +%.o: %.c | $(CONFIG_DEP_SUBDIR) $(COMPILE) $< $(POSTCOMPILE) +$(CONFIG_DEP_SUBDIR): + $(SHELL) $(srcdir)/../mkinstalldirs $@ + # Rules for compiling .c files in the various source subdirectories. %.o: $(srcdir)/cli/%.c $(COMPILE) $< |