GNU Binutils with patches for OS216
Revision | b22c88c2ca013cc25d7a8fcbc748122bb1a349bb (tree) |
---|---|
Time | 2017-11-28 08:53:21 |
Author | Tom Tromey <tom@trom...> |
Commiter | Tom Tromey |
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.
@@ -1,3 +1,12 @@ | ||
1 | +2017-11-27 Tom Tromey <tom@tromey.com> | |
2 | + | |
3 | + * configure.ac (CONFIG_SRC_SUBDIR): Don't subst. | |
4 | + * configure: Rebuild. | |
5 | + * Makefile.in (CONFIG_SRC_SUBDIR): Redefine. | |
6 | + (CONFIG_DEP_SUBDIR): New variable. | |
7 | + (%.o): Add order-only dependency. | |
8 | + ($(CONFIG_DEP_SUBDIR)): New target. | |
9 | + | |
1 | 10 | 2017-11-26 Dominik Czarnota <dominik.b.czarnota@gmail.com> |
2 | 11 | |
3 | 12 | PR gdb/21945 |
@@ -645,9 +645,11 @@ CONFIG_ALL = @CONFIG_ALL@ | ||
645 | 645 | CONFIG_CLEAN = @CONFIG_CLEAN@ |
646 | 646 | CONFIG_INSTALL = @CONFIG_INSTALL@ |
647 | 647 | CONFIG_UNINSTALL = @CONFIG_UNINSTALL@ |
648 | -CONFIG_SRC_SUBDIR = @CONFIG_SRC_SUBDIR@ | |
649 | 648 | HAVE_NATIVE_GCORE_TARGET = @HAVE_NATIVE_GCORE_TARGET@ |
650 | 649 | |
650 | +CONFIG_SRC_SUBDIR = arch | |
651 | +CONFIG_DEP_SUBDIR = $(addsuffix /$(DEPDIR),$(CONFIG_SRC_SUBDIR)) | |
652 | + | |
651 | 653 | # -I. for config files. |
652 | 654 | # -I$(srcdir) for gdb internal headers. |
653 | 655 | # -I$(srcdir)/config for more generic config files. |
@@ -1927,10 +1929,14 @@ all: gdb$(EXEEXT) $(CONFIG_ALL) | ||
1927 | 1929 | @$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do |
1928 | 1930 | |
1929 | 1931 | # Rule for compiling .c files in the top-level gdb directory. |
1930 | -%.o: %.c | |
1932 | +# The order-only dependencies ensure that we create the build subdirectories. | |
1933 | +%.o: %.c | $(CONFIG_DEP_SUBDIR) | |
1931 | 1934 | $(COMPILE) $< |
1932 | 1935 | $(POSTCOMPILE) |
1933 | 1936 | |
1937 | +$(CONFIG_DEP_SUBDIR): | |
1938 | + $(SHELL) $(srcdir)/../mkinstalldirs $@ | |
1939 | + | |
1934 | 1940 | # Rules for compiling .c files in the various source subdirectories. |
1935 | 1941 | %.o: $(srcdir)/cli/%.c |
1936 | 1942 | $(COMPILE) $< |
@@ -736,7 +736,6 @@ LIBINTL_DEP | ||
736 | 736 | LIBINTL |
737 | 737 | USE_NLS |
738 | 738 | CCDEPMODE |
739 | -CONFIG_SRC_SUBDIR | |
740 | 739 | DEPDIR |
741 | 740 | am__leading_dot |
742 | 741 | CXX_DIALECT |
@@ -5958,13 +5957,6 @@ DEPDIR="${am__leading_dot}deps" | ||
5958 | 5957 | ac_config_commands="$ac_config_commands depdir" |
5959 | 5958 | |
5960 | 5959 | |
5961 | -# Create sub-directories for objects and dependencies. | |
5962 | -CONFIG_SRC_SUBDIR="arch" | |
5963 | - | |
5964 | - | |
5965 | -ac_config_commands="$ac_config_commands gdbdepdir" | |
5966 | - | |
5967 | - | |
5968 | 5960 | depcc="$CC" am_compiler_list= |
5969 | 5961 | |
5970 | 5962 | am_depcomp=$ac_aux_dir/depcomp |
@@ -18512,7 +18504,6 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | ||
18512 | 18504 | # INIT-COMMANDS |
18513 | 18505 | # |
18514 | 18506 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR |
18515 | -ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR CONFIG_SRC_SUBDIR="$CONFIG_SRC_SUBDIR" | |
18516 | 18507 | |
18517 | 18508 | _ACEOF |
18518 | 18509 |
@@ -18524,7 +18515,6 @@ do | ||
18524 | 18515 | case $ac_config_target in |
18525 | 18516 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; |
18526 | 18517 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; |
18527 | - "gdbdepdir") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbdepdir" ;; | |
18528 | 18518 | "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;; |
18529 | 18519 | "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;; |
18530 | 18520 | "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;; |
@@ -19148,11 +19138,6 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} | ||
19148 | 19138 | |
19149 | 19139 | case $ac_file$ac_mode in |
19150 | 19140 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; |
19151 | - "gdbdepdir":C) | |
19152 | - for subdir in ${CONFIG_SRC_SUBDIR} | |
19153 | - do | |
19154 | - $SHELL $ac_aux_dir/mkinstalldirs $subdir/$DEPDIR | |
19155 | - done ;; | |
19156 | 19141 | "gcore":F) chmod +x gcore ;; |
19157 | 19142 | "Makefile":F) |
19158 | 19143 | case x$CONFIG_HEADERS in |
@@ -44,17 +44,6 @@ AX_CXX_COMPILE_STDCXX(11, , mandatory) | ||
44 | 44 | |
45 | 45 | # Dependency checking. |
46 | 46 | ZW_CREATE_DEPDIR |
47 | -# Create sub-directories for objects and dependencies. | |
48 | -CONFIG_SRC_SUBDIR="arch" | |
49 | -AC_SUBST(CONFIG_SRC_SUBDIR) | |
50 | - | |
51 | -AC_CONFIG_COMMANDS([gdbdepdir],[ | |
52 | - for subdir in ${CONFIG_SRC_SUBDIR} | |
53 | - do | |
54 | - $SHELL $ac_aux_dir/mkinstalldirs $subdir/$DEPDIR | |
55 | - done], | |
56 | - [ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR CONFIG_SRC_SUBDIR="$CONFIG_SRC_SUBDIR"]) | |
57 | - | |
58 | 47 | ZW_PROG_COMPILER_DEPENDENCIES([CC]) |
59 | 48 | |
60 | 49 | gnulib_extra_configure_args= |