On 03/02/2011 10:37 PM, Tom Tromey wrote: >>>>>> "Yao" == Yao Qi writes: > > Yao> gdb/ > Yao> * Makefile.in (configure-common): Remove. Let Makefile > Yao> in dir common to rebuild itself. > Yao> (common/Makefile): Likewise. > > This part looks ok. Applied this part first. > But the code still has: > > Yao> $(LIBCOMMON): $(LIBCOMMON_DIR)/Makefile > Yao> @$(MAKE) $(FLAGS_TO_PASS) DO=all DODIRS=common subdir_do > > Now there isn't a rule to build $(LIBCOMMON_DIR)/Makefile. > > I suspect the $(LIBCOMMON) target isn't needed, but removing it may > require some other changes. The current dependency relationship is like this, all: gdb$(EXEEXT) $(CONFIG_ALL) @$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do gdb$(EXEEXT): gdb.o libgdb.a $(ADD_DEPS) $(CDEPS) $(TDEPLIBS) while CDEPS includes $(LIBGNU) and $(LIBCOMMON) CDEPS = $(XM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE_DEPS) \ $(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) $(LIBGNU) \ $(LIBCOMMON) so target $(LIBCOMMON) and $(LIBGNU) is needed in target gdb$(EXEEXT), before going to subdir to build in `all:'. We can fix this problem by 1) removing $(LIBGNU) and $(LIBCOMMON) from CDEPS, 2) leaving to Makefile in gnulib/ and common/ to build lib as needed in target gdb$(EXEEXT). -- Yao (齐尧)