Changeset 0aa06cbe in mainline for kernel/Makefile


Ignore:
Timestamp:
2018-03-06T20:48:12Z (7 years ago)
Author:
GitHub <noreply@…>
Parents:
fd57cf17 (diff), 0c793e2 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-06 20:48:12)
git-committer:
GitHub <noreply@…> (2018-03-06 20:48:12)
Message:

Merge 0c793e2e9c4358a2bb2521d35eb36b273cf0283b into fd57cf17d12bbe3b41626a0b8708f075134a073e

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/Makefile

    rfd57cf17 r0aa06cbe  
    4848#
    4949
    50 AGDEPEND = Makefile.ag.depend
     50AUTOGEN = $(ROOT_PATH)/tools/autogen2.sh
    5151RAW = kernel.raw
    5252BIN = kernel.bin
     
    7373
    7474.PHONY: all clean autogen_clean depend
     75.DELETE_ON_ERROR:
    7576
    7677all: $(VERSION_DEF) $(COMMON_MAKEFILE) $(COMMON_HEADER) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) $(BIN) $(DISASM)
     
    132133-include arch/$(KARCH)/Makefile.inc
    133134-include genarch/Makefile.inc
    134 -include $(AGDEPEND)
    135135
    136136## The at-sign
     
    354354GENARCH_DEPENDS := $(addsuffix .d,$(basename $(GENARCH_SOURCES)))
    355355
    356 GENARCH_AUTOGENS_H := $(addsuffix .h,$(basename $(GENARCH_AUTOGENS_AG)))
    357 GENARCH_AUTOGENS_PROBE_C := $(addsuffix .ag.probe.c,$(basename $(GENARCH_AUTOGENS_AG)))
    358 GENARCH_AUTOGENS_PROBE_S := $(addsuffix .ag.probe.s,$(basename $(GENARCH_AUTOGENS_AG)))
    359 
    360 ARCH_AUTOGENS_H := $(addsuffix .h,$(basename $(ARCH_AUTOGENS_AG)))
    361 ARCH_AUTOGENS_PROBE_C := $(addsuffix .ag.probe.c,$(basename $(ARCH_AUTOGENS_AG)))
    362 ARCH_AUTOGENS_PROBE_S := $(addsuffix .ag.probe.s,$(basename $(ARCH_AUTOGENS_AG)))
    363 
    364 AUTOGENS_H := $(ARCH_AUTOGENS_H) $(GENARCH_AUTOGENS_H)
    365356AUTOGENS_AG := $(ARCH_AUTOGENS_AG) $(GENARCH_AUTOGENS_AG)
     357AUTOGEN_DEPENDS := $(addsuffix .d,$(AUTOGENS_AG))
    366358
    367359AS_CFLAGS := $(addprefix -Xassembler ,$(AFLAGS))
     
    371363-include $(ARCH_DEPENDS)
    372364-include $(GENARCH_DEPENDS)
     365-include $(AUTOGEN_DEPENDS)
    373366
    374367ifeq ($(COMPILER),clang)
     
    402395        $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -D__LINKER__ -E -x c $< | grep -v "^\#" > $@
    403396
    404 %.h: %.ag
    405         $(AUTOGEN) probe $< >$<.probe.c
    406         $(CC_AUTOGEN) $(DEFS) $(CFLAGS) -S -o $<.probe.s $<.probe.c
    407         $(AUTOGEN) generate $< <$<.probe.s >$@
     397%.ag.h %.ag.s %.ag.c %.ag.d: %.h
     398        CC="$(CC)" CFLAGS="-DKERNEL $(CFLAGS)" $(AUTOGEN) $< $@
    408399
    409400%.o: %.S | depend
     
    441432        $(GENMAP) $(MAP_PREV) $(DUMP) $@
    442433
    443 $(AUTOGENS_H): $(AGDEPEND)
    444 
    445 $(AGDEPEND): $(AUTOGENS_AG)
    446         echo "# DO NOT EDIT" >$@
    447         for g in $^; do \
    448                 h=`dirname $$g`/`basename $$g .ag`.h; \
    449                 for l in `$(AUTOGEN) depend $$g`; do \
    450                         echo "$$h: $$l" >>$@; \
    451                 done \
    452         done
    453 
    454 depend: $(AUTOGENS_H)
     434depend: $(AUTOGENS_AG)
    455435
    456436autogen_clean:
    457         -rm $(ARCH_AUTOGENS_H) $(ARCH_AUTOGENS_PROBE_C) $(ARCH_AUTOGENS_PROBE_S)
    458         -rm $(GENARCH_AUTOGENS_H) $(GENARCH_AUTOGENS_PROBE_C) $(GENARCH_AUTOGENS_PROBE_S)
    459         -rm $(AGDEPEND)
     437        -rm $(AUTOGENS_AG) $(AUTOGEN_DEPENDS) $(AUTOGENS_AG)
Note: See TracChangeset for help on using the changeset viewer.