Changes in kernel/Makefile [ae7bbfd0:2889634] in mainline


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/Makefile

    rae7bbfd0 r2889634  
    4848#
    4949
     50AGDEPEND = Makefile.ag.depend
    5051DEPEND = Makefile.depend
    5152DEPEND_PREV = $(DEPEND).prev
     
    138139-include genarch/Makefile.inc
    139140-include $(DEPEND)
     141-include $(AGDEPEND)
    140142
    141143## The at-sign
     
    377379GENARCH_OBJECTS := $(addsuffix .o,$(basename $(GENARCH_SOURCES)))
    378380
     381GENARCH_AUTOGENS_H := $(addsuffix .h,$(basename $(GENARCH_AUTOGENS_AG)))
     382GENARCH_AUTOGENS_PROBE_C := $(addsuffix .ag.probe.c,$(basename $(GENARCH_AUTOGENS_AG)))
     383GENARCH_AUTOGENS_PROBE_S := $(addsuffix .ag.probe.s,$(basename $(GENARCH_AUTOGENS_AG)))
     384
    379385ARCH_AUTOGENS_H := $(addsuffix .h,$(basename $(ARCH_AUTOGENS_AG)))
    380386ARCH_AUTOGENS_PROBE_C := $(addsuffix .ag.probe.c,$(basename $(ARCH_AUTOGENS_AG)))
    381387ARCH_AUTOGENS_PROBE_S := $(addsuffix .ag.probe.s,$(basename $(ARCH_AUTOGENS_AG)))
     388
     389AUTOGENS_H := $(ARCH_AUTOGENS_H) $(GENARCH_AUTOGENS_H)
     390AUTOGENS_AG := $(ARCH_AUTOGENS_AG) $(GENARCH_AUTOGENS_AG)
    382391
    383392LFLAGS_LTO := $(addprefix -Xlinker ,$(LFLAGS))
     
    460469        $(GENMAP) $(MAP_PREV) $(DUMP) $@
    461470
    462 $(DEPEND): $(COMMON_HEADER_ARCH) $(ARCH_AUTOGENS_H)
     471$(AUTOGENS_H): $(AGDEPEND)
     472
     473$(AGDEPEND): $(AUTOGENS_AG)
     474        echo "# DO NOT EDIT" >$@
     475        for g in $^; do \
     476                h=`dirname $$g`/`basename $$g .ag`.h; \
     477                for l in `$(AUTOGEN) depend $$g`; do \
     478                        echo "$$h: $$l" >>$@; \
     479                done \
     480        done
     481
     482$(DEPEND): $(COMMON_HEADER_ARCH) $(AUTOGENS_H)
    463483        makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(ARCH_SOURCES) $(GENARCH_SOURCES) $(GENERIC_SOURCES) > $@ 2> /dev/null
    464484        -[ -f $(DEPEND_PREV) ] && diff -q $(DEPEND_PREV) $@ && mv -f $(DEPEND_PREV) $@
     
    469489autogen_clean:
    470490        -rm $(ARCH_AUTOGENS_H) $(ARCH_AUTOGENS_PROBE_C) $(ARCH_AUTOGENS_PROBE_S)
     491        -rm $(GENARCH_AUTOGENS_H) $(GENARCH_AUTOGENS_PROBE_C) $(GENARCH_AUTOGENS_PROBE_S)
     492        -rm $(AGDEPEND)
Note: See TracChangeset for help on using the changeset viewer.