Fix a build dependency regression.

Fix the automatic header dependency generation to handle the .pic.o
suffix.  This regression was due to:
    Build both PIC and no PIC static libraries
    af5d6987f8
This commit is contained in:
Jason Evans 2011-03-15 09:40:07 -07:00
parent 41ade967c2
commit 1b17768e24

View File

@ -94,6 +94,7 @@ doc: $(DOCS)
# Include generated dependency files. # Include generated dependency files.
# #
-include $(CSRCS:@srcroot@%.c=@objroot@%.d) -include $(CSRCS:@srcroot@%.c=@objroot@%.d)
-include $(CSRCS:@srcroot@%.c=@objroot@%.pic.d)
@objroot@src/%.o: @srcroot@src/%.c @objroot@src/%.o: @srcroot@src/%.c
@mkdir -p $(@D) @mkdir -p $(@D)
@ -103,7 +104,7 @@ doc: $(DOCS)
@objroot@src/%.pic.o: @srcroot@src/%.c @objroot@src/%.pic.o: @srcroot@src/%.c
@mkdir -p $(@D) @mkdir -p $(@D)
$(CC) $(CFLAGS) -fPIC -DPIC -c $(CPPFLAGS) -o $@ $< $(CC) $(CFLAGS) -fPIC -DPIC -c $(CPPFLAGS) -o $@ $<
@$(SHELL) -ec "$(CC) -MM $(CPPFLAGS) $< | sed \"s/\($(subst /,\/,$(notdir $(basename $@)))\)\.o\([ :]*\)/$(subst /,\/,$(strip $(dir $@)))\1.o \2/g\" > $(@:%.o=%.d)" @$(SHELL) -ec "$(CC) -MM $(CPPFLAGS) $< | sed \"s/\($(subst /,\/,$(notdir $(basename $(basename $@))))\)\.o\([ :]*\)/$(subst /,\/,$(strip $(dir $@)))\1.pic.o \2/g\" > $(@:%.o=%.d)"
%.$(SO) : %.$(SO).$(REV) %.$(SO) : %.$(SO).$(REV)
@mkdir -p $(@D) @mkdir -p $(@D)