Browse Source

touchup headers target somemore so building in subdirs works nicely again

Mike Frysinger 19 years ago
parent
commit
94c41e72b5
3 changed files with 6 additions and 7 deletions
  1. 2 4
      Makefile.in
  2. 3 3
      Makerules
  3. 1 0
      Rules.mak

+ 2 - 4
Makefile.in

@@ -13,6 +13,7 @@ noconfig_targets := menuconfig config oldconfig randconfig \
 	release dist tags
 
 include $(top_builddir)Rules.mak
+sub_headers := headers
 
 ifeq ($(HAVE_DOT_CONFIG),y)
 
@@ -267,10 +268,7 @@ extra/config/conf extra/config/mconf:
 	$(MAKE) -C extra/config $(notdir $@)
 
 menuconfig: extra/config/mconf
-	$(RM) -r include/bits
-	$(INSTALL) -d include/bits
-	@./extra/config/mconf extra/Configs/Config.in
-	$(MAKE) headers
+	$(Q)./extra/config/mconf extra/Configs/Config.in
 
 config: extra/config/conf
 	$(RM) -r include/bits

+ 3 - 3
Makerules

@@ -29,7 +29,7 @@ all_objs: $(sort $(shared_objs) $(ar_objs))
 else
 all_objs: $(ar_objs)
 endif
-$(shared_objs) $(ar_objs): | headers
+$(shared_objs) $(ar_objs): | $(sub_headers)
 
 headers-y: $(headers-y)
 	@true
@@ -162,7 +162,7 @@ CFLAGS-.oS+=$(PICFLAG) -DSHARED
 %.s:  %.c ; $(compile.s)
 %.s:  %.S ; $(compile.s)
 
-$(top_builddir)lib/interp.c: | headers
+$(top_builddir)lib/interp.c: | $(sub_headers)
 	$(Q)$(INSTALL) -d $(dir $@)
 	$(Q)echo "/* Force shared libraries to know about the correct library loader */" > $@
 	$(Q)echo "#include <features.h>" >> $@
@@ -180,7 +180,7 @@ $(libc):
 	@cd $(top_builddir); $(MAKE) lib/$(patsubst %.$(MAJOR_VERSION),%,$(notdir $@))
 
 $(headers_dep):
-	@cd $(top_builddir); $(MAKE) headers
+	$(Q)cd $(top_builddir); $(MAKE) headers
 
 CRT := crt1
 

+ 1 - 0
Rules.mak

@@ -85,6 +85,7 @@ libc := $(top_builddir)lib/$(SHARED_MAJORNAME)
 interp := $(top_builddir)lib/interp.os
 ldso := $(top_builddir)lib/$(UCLIBC_LDSO)
 headers_dep := $(top_builddir)include/bits/sysnum.h
+sub_headers := $(headers_dep)
 
 #LIBS :=$(interp) -L$(top_builddir)lib -lc
 LIBS := $(interp) -L$(top_builddir)lib $(libc:.$(MAJOR_VERSION)=)