mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-18 12:24:38 +08:00
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.
This commit is contained in:
parent
407e114084
commit
b22c88c2ca
@ -1,3 +1,12 @@
|
||||
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.
|
||||
|
||||
2017-11-26 Dominik Czarnota <dominik.b.czarnota@gmail.com>
|
||||
|
||||
PR gdb/21945
|
||||
|
@ -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) $<
|
||||
|
15
gdb/configure
vendored
15
gdb/configure
vendored
@ -736,7 +736,6 @@ LIBINTL_DEP
|
||||
LIBINTL
|
||||
USE_NLS
|
||||
CCDEPMODE
|
||||
CONFIG_SRC_SUBDIR
|
||||
DEPDIR
|
||||
am__leading_dot
|
||||
CXX_DIALECT
|
||||
@ -5958,13 +5957,6 @@ DEPDIR="${am__leading_dot}deps"
|
||||
ac_config_commands="$ac_config_commands depdir"
|
||||
|
||||
|
||||
# Create sub-directories for objects and dependencies.
|
||||
CONFIG_SRC_SUBDIR="arch"
|
||||
|
||||
|
||||
ac_config_commands="$ac_config_commands gdbdepdir"
|
||||
|
||||
|
||||
depcc="$CC" am_compiler_list=
|
||||
|
||||
am_depcomp=$ac_aux_dir/depcomp
|
||||
@ -18512,7 +18504,6 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
# INIT-COMMANDS
|
||||
#
|
||||
ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
|
||||
ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR CONFIG_SRC_SUBDIR="$CONFIG_SRC_SUBDIR"
|
||||
|
||||
_ACEOF
|
||||
|
||||
@ -18524,7 +18515,6 @@ do
|
||||
case $ac_config_target in
|
||||
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
|
||||
"depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
|
||||
"gdbdepdir") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbdepdir" ;;
|
||||
"jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
|
||||
"$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
|
||||
"gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
|
||||
@ -19148,11 +19138,6 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
|
||||
|
||||
case $ac_file$ac_mode in
|
||||
"depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
|
||||
"gdbdepdir":C)
|
||||
for subdir in ${CONFIG_SRC_SUBDIR}
|
||||
do
|
||||
$SHELL $ac_aux_dir/mkinstalldirs $subdir/$DEPDIR
|
||||
done ;;
|
||||
"gcore":F) chmod +x gcore ;;
|
||||
"Makefile":F)
|
||||
case x$CONFIG_HEADERS in
|
||||
|
@ -44,17 +44,6 @@ AX_CXX_COMPILE_STDCXX(11, , mandatory)
|
||||
|
||||
# Dependency checking.
|
||||
ZW_CREATE_DEPDIR
|
||||
# Create sub-directories for objects and dependencies.
|
||||
CONFIG_SRC_SUBDIR="arch"
|
||||
AC_SUBST(CONFIG_SRC_SUBDIR)
|
||||
|
||||
AC_CONFIG_COMMANDS([gdbdepdir],[
|
||||
for subdir in ${CONFIG_SRC_SUBDIR}
|
||||
do
|
||||
$SHELL $ac_aux_dir/mkinstalldirs $subdir/$DEPDIR
|
||||
done],
|
||||
[ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR CONFIG_SRC_SUBDIR="$CONFIG_SRC_SUBDIR"])
|
||||
|
||||
ZW_PROG_COMPILER_DEPENDENCIES([CC])
|
||||
|
||||
gnulib_extra_configure_args=
|
||||
|
Loading…
Reference in New Issue
Block a user