This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfa/rfc] Build libcommon.a for gdb and gdbserver


On 03/01/2011 10:36 PM, Tom Tromey wrote:
> 
> common/Makefile: configure-common common/Makefile.in config.status @frags@
>         CONFIG_FILES="common/Makefile" \
>           CONFIG_COMMANDS="depfiles" \
>           CONFIG_HEADERS= \
>           CONFIG_LINKS= \
>           $(SHELL) config.status
> 
> 
> But since we are running a separate configure script in common/, it is
> incorrect to run this directory's config.status to try to make it.
> 
> Usually one doesn't bother with this stuff -- just recurse and let the
> subdir Makefile rebuild itself as needed.

We can remove this rule, and let common/Makefile to rebuild itself.
Fixed in this patch.

-- 
Yao (éå)
gdb/
	* Makefile.in (configure-common): Remove.  Let Makefile
	in dir common to rebuild itself.
	(common/Makefile): Likewise.

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 6363773..ef78329 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1174,22 +1174,6 @@ all-lib: gnulib/Makefile
 $(LIBCOMMON): $(LIBCOMMON_DIR)/Makefile
 	@$(MAKE) $(FLAGS_TO_PASS) DO=all DODIRS=common subdir_do
 
-configure-common: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-        test ! -f common/Makefile || exit 0; \
-        $(SHELL) $(srcdir)/../mkinstalldirs common ; \
-        $(HOST_EXPORTS)  \
-        echo Configuring in common; \
-        cd "common" || exit 1; \
-        commondir="$$s/common"; \
-        srcdiroption="--srcdir=$${commondir}"; \
-	$(SHELL) $${commondir}/configure --enable-gdbserver=no \
-          $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-          --target=${target_alias} $${srcdiroption}  \
-          || exit 1
-
 # Convenience rule to handle recursion.
 .PHONY: all-data-directory
 all-data-directory: data-directory/Makefile
@@ -1325,13 +1309,6 @@ data-directory/Makefile: data-directory/Makefile.in config.status @frags@
 	  CONFIG_LINKS= \
 	  $(SHELL) config.status
 
-common/Makefile: configure-common common/Makefile.in config.status @frags@
-        CONFIG_FILES="common/Makefile" \
-          CONFIG_COMMANDS="depfiles" \
-          CONFIG_HEADERS= \
-          CONFIG_LINKS= \
-          $(SHELL) config.status
-
 config.h: stamp-h ; @true
 stamp-h: $(srcdir)/config.in config.status
 	CONFIG_HEADERS=config.h:config.in \

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]