Changeset 4761f54 in mainline


Ignore:
Timestamp:
2017-10-21T04:41:07Z (7 years ago)
Author:
jzr <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9c14309
Parents:
feab36ae
Message:

Get rid of makedepend.

Files:
8 edited

Legend:

Unmodified
Added
Removed
  • .bzrignore

    rfeab36ae r4761f54  
    55*.prev
    66*.so.*
     7*.d
    78Makefile.ag.depend
    89Makefile.common
    910Makefile.config
    10 Makefile.depend
    1111autotool/
    1212boot/distroot/
  • boot/Makefile

    rfeab36ae r4761f54  
    126126        $(MAKE) -r -f $(POSTBUILD) clean PRECHECK=$(PRECHECK)
    127127endif
    128         rm -f $(POST_OUTPUT) $(BOOT_OUTPUT) $(DEPEND) $(DEPEND_PREV) arch/*/include/common.h
     128        rm -f $(POST_OUTPUT) $(BOOT_OUTPUT) arch/*/include/common.h
    129129        find generic/src/ arch/*/src/ genarch/src/ -name '*.o' -follow -exec rm \{\} \;
     130        find generic/src/ arch/*/src/ genarch/src/ -name '*.d' -follow -exec rm \{\} \;
    130131
    131132clean_dist:
  • boot/Makefile.build

    rfeab36ae r4761f54  
    2727#
    2828
    29 .PHONY: all clean
     29.PHONY: all clean depend
    3030
    3131include Makefile.common
     
    6464endif
    6565
    66 ifeq ($(COMPILER),gcc_native)
    67         CFLAGS = $(COMMON_CFLAGS) $(GCC_CFLAGS) $(EXTRA_CFLAGS)
    68         DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    69 endif
    70 
    71 ifeq ($(COMPILER),gcc_cross)
    72         CFLAGS = $(COMMON_CFLAGS) $(GCC_CFLAGS) $(EXTRA_CFLAGS)
    73         DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    74 endif
    75 
    76 ifeq ($(COMPILER),gcc_helenos)
    77         CFLAGS = $(COMMON_CFLAGS) $(GCC_CFLAGS) $(EXTRA_CFLAGS)
    78         DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    79 endif
    80 
    8166ifeq ($(COMPILER),clang)
    8267        CFLAGS = $(COMMON_CFLAGS) $(CLANG_CFLAGS) $(EXTRA_CFLAGS)
    83         DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
     68else
     69        CFLAGS = $(COMMON_CFLAGS) $(GCC_CFLAGS) $(EXTRA_CFLAGS)
    8470endif
    8571
    8672OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
     73DEPENDS := $(addsuffix .d,$(basename $(SOURCES)))
    8774
    8875all: $(VERSION_DEF) $(COMMON_MAKEFILE) $(COMMON_HEADER) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) $(BOOT_OUTPUT)
    89         -[ -f $(DEPEND) ] && cp -a $(DEPEND) $(DEPEND_PREV)
    9076
    9177clean:
    9278        rm -f $(RAW) $(MAP) $(ARCH_INCLUDE) $(GENARCH_INCLUDE)
    9379
    94 ifneq ($(MAKECMDGOALS),clean)
    95 -include $(DEPEND)
    96 endif
     80-include $(DEPENDS)
    9781
    9882AS_CFLAGS := $(addprefix -Xassembler ,$(AFLAGS))
     
    10488        $(LD) -n $(LFLAGS) -T $(LINK) -M -Map $(MAP) -o $@ $(OBJECTS)
    10589
    106 $(LINK): $(DEPEND)
     90$(LINK): | depend
    10791        $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -D__LINKER__ -E -x c $(LINK).in | grep -v "^\#" > $(LINK)
    10892
    109 %.o: %.S $(DEPEND)
    110         $(CC) $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@
     93%.o: %.S | depend
     94        $(CC) -MD $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@
    11195ifeq ($(PRECHECK),y)
    11296        $(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(CFLAGS) -D__ASM__
    11397endif
    11498
    115 %.o: %.c $(DEPEND)
    116         $(CC) $(DEFS) $(CFLAGS) -c $< -o $@
     99%.o: %.c | depend
     100        $(CC) -MD $(DEFS) $(CFLAGS) -c $< -o $@
    117101ifeq ($(PRECHECK),y)
    118102        $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS)
    119103endif
    120104
    121 %.o: %.s $(DEPEND)
    122         $(CC) $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@
     105%.o: %.s | depend
     106        $(CC) -MD $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@
    123107ifeq ($(PRECHECK),y)
    124108        $(JOBFILE) $(JOB) $< $@ as asm
    125109endif
    126110
    127 $(DEPEND): $(ARCH_INCLUDE) $(GENARCH_INCLUDE) $(COMMON_HEADER_ARCH) $(PRE_DEPEND)
    128         makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(SOURCES) > $@ 2> /dev/null
    129         -[ -f $(DEPEND_PREV) ] && diff -q $(DEPEND_PREV) $@ && mv -f $(DEPEND_PREV) $@
     111depend: $(ARCH_INCLUDE) $(GENARCH_INCLUDE) $(COMMON_HEADER_ARCH) $(PRE_DEPEND)
    130112
    131113$(COMPS).s: $(COMPS).zip
  • boot/Makefile.common

    rfeab36ae r4761f54  
    6363GENARCH_INCLUDE = generic/include/genarch
    6464
    65 DEPEND = Makefile.depend
    66 DEPEND_PREV = $(DEPEND).prev
    6765DISTROOT = distroot
    6866INITRD = initrd
  • kernel/Makefile

    rfeab36ae r4761f54  
    4949
    5050AGDEPEND = Makefile.ag.depend
    51 DEPEND = Makefile.depend
    52 DEPEND_PREV = $(DEPEND).prev
    5351RAW = kernel.raw
    5452BIN = kernel.bin
     
    6765SIZEOK_MAP = generic/src/debug/sizeok_map.o
    6866
    69 .PHONY: all clean autogen_clean
     67.PHONY: all clean autogen_clean depend
    7068
    7169all: $(VERSION_DEF) $(COMMON_MAKEFILE) $(COMMON_HEADER) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) $(BIN) $(DISASM)
    72         -[ -f $(DEPEND) ] && cp -a $(DEPEND) $(DEPEND_PREV)
    7370
    7471clean: autogen_clean
    75         rm -f $(DEPEND) $(DEPEND_PREV) $(RAW) $(BIN) $(MAP) $(JOB) $(MAP_PREV) $(DISASM) $(DUMP) $(REAL_MAP).* arch/*/_link.ld arch/*/include/arch/common.h
     72        rm -f $(RAW) $(BIN) $(MAP) $(JOB) $(MAP_PREV) $(DISASM) $(DUMP) $(REAL_MAP).* arch/*/_link.ld arch/*/include/arch/common.h
    7673        find generic/src/ arch/*/src/ genarch/src/ test/ -name '*.o' -follow -exec rm '{}' \;
     74        find generic/src/ arch/*/src/ genarch/src/ test/ -name '*.d' -follow -exec rm '{}' \;
    7775
    7876## Common compiler flags
     
    129127-include arch/$(KARCH)/Makefile.inc
    130128-include genarch/Makefile.inc
    131 -include $(DEPEND)
    132129-include $(AGDEPEND)
    133130
     
    152149#
    153150
    154 ifeq ($(COMPILER),gcc_native)
    155         CFLAGS = $(COMMON_CFLAGS) $(GCC_CFLAGS)
    156         DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    157         INSTRUMENTATION = -finstrument-functions
    158 endif
    159 
    160 ifeq ($(COMPILER),gcc_cross)
    161         CFLAGS = $(COMMON_CFLAGS) $(GCC_CFLAGS)
    162         DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    163         INSTRUMENTATION = -finstrument-functions
    164 endif
    165 
    166 ifeq ($(COMPILER),gcc_helenos)
    167         CFLAGS = $(COMMON_CFLAGS) $(GCC_CFLAGS)
    168         DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    169         INSTRUMENTATION = -finstrument-functions
    170 endif
    171 
    172151ifeq ($(COMPILER),clang)
    173152        CFLAGS = $(COMMON_CFLAGS) $(CLANG_CFLAGS)
    174         DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    175         INSTRUMENTATION = -finstrument-functions
    176 endif
    177 
     153else
     154        CFLAGS = $(COMMON_CFLAGS) $(GCC_CFLAGS)
     155endif
     156
     157INSTRUMENTATION = -finstrument-functions
    178158
    179159## Generic kernel sources
     
    364344GENARCH_OBJECTS := $(addsuffix .o,$(basename $(GENARCH_SOURCES)))
    365345
     346GENERIC_DEPENDS := $(addsuffix .d,$(basename $(GENERIC_SOURCES)))
     347ARCH_DEPENDS := $(addsuffix .d,$(basename $(ARCH_SOURCES)))
     348GENARCH_DEPENDS := $(addsuffix .d,$(basename $(GENARCH_SOURCES)))
     349
    366350GENARCH_AUTOGENS_H := $(addsuffix .h,$(basename $(GENARCH_AUTOGENS_AG)))
    367351GENARCH_AUTOGENS_PROBE_C := $(addsuffix .ag.probe.c,$(basename $(GENARCH_AUTOGENS_AG)))
     
    378362LD_CFLAGS := $(addprefix -Xlinker ,$(LFLAGS))
    379363
     364-include $(GENERIC_DEPENDS)
     365-include $(ARCH_DEPENDS)
     366-include $(GENARCH_DEPENDS)
     367
    380368ifeq ($(COMPILER),clang)
    381369        AS_CFLAGS += -mllvm -asm-macro-max-nesting-depth=1000
     
    408396endif
    409397
    410 $(LINK): $(LINK).in $(DEPEND)
     398$(LINK): $(LINK).in | depend
    411399        $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -D__LINKER__ -E -x c $< | grep -v "^\#" > $@
    412400
     
    416404        $(AUTOGEN) generate $< <$<.probe.s >$@   
    417405
    418 %.o: %.S $(DEPEND)
    419         $(CC) $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__ -c -o $@ $<
     406%.o: %.S | depend
     407        $(CC) -MD $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__ -c -o $@ $<
    420408ifeq ($(PRECHECK),y)
    421409        $(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(CFLAGS) -D__ASM__
    422410endif
    423411
    424 %.o: %.s $(DEPEND)
    425         $(CC) $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__ -c -o $@ $<
     412%.o: %.s | depend
     413        $(CC) -MD $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__ -c -o $@ $<
    426414ifeq ($(PRECHECK),y)
    427415        $(JOBFILE) $(JOB) $< $@ as asm $(DEFS) $(CFLAGS) $(EXTRA_FLAGS)
    428416endif
    429417
    430 %.o: %.c $(DEPEND)
    431         $(CC) $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS) $(if $(findstring $<,$(INSTRUMENTED_SOURCES)),$(INSTRUMENTATION)) -c -o $@ $<
     418%.o: %.c | depend
     419        $(CC) -MD $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS) $(if $(findstring $<,$(INSTRUMENTED_SOURCES)),$(INSTRUMENTATION)) -c -o $@ $<
    432420ifeq ($(PRECHECK),y)
    433421        $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS)
     
    470458        done
    471459
    472 $(DEPEND): $(COMMON_HEADER_ARCH) $(AUTOGENS_H)
    473         makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(ARCH_SOURCES) $(GENARCH_SOURCES) $(GENERIC_SOURCES) > $@ 2> /dev/null
    474         -[ -f $(DEPEND_PREV) ] && diff -q $(DEPEND_PREV) $@ && mv -f $(DEPEND_PREV) $@
     460depend: $(COMMON_HEADER_ARCH) $(AUTOGENS_H)
    475461
    476462$(COMMON_HEADER_ARCH): $(COMMON_HEADER)
  • tools/autotool.py

    rfeab36ae r4761f54  
    850850                check_app(["diff", "--version"], "Diff utility", "usually part of diffutils")
    851851                check_app(["make", "--version"], "Make utility", "preferably GNU Make")
    852                 check_app(["makedepend", "-f", "-"], "Makedepend utility", "usually part of imake or xutils")
    853852                check_app(["unzip"], "unzip utility", "usually part of zip/unzip utilities")
    854853               
  • uspace/Makefile.common

    rfeab36ae r4761f54  
    100100endif
    101101
    102 DEPEND = Makefile.depend
    103 DEPEND_PREV = $(DEPEND).prev
    104 
    105102LIB_PREFIX = $(USPACE_PREFIX)/lib
    106103
     
    223220endif
    224221
    225 .PHONY: all clean
     222.PHONY: all clean depend
    226223
    227224all: $(VERSION_DEF) $(COMMON_MAKEFILE) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) $(LIBS) $(OUTPUT) $(LOUTPUT) $(EXTRA_OUTPUT)
    228         -[ -f $(DEPEND) ] && cp -a $(DEPEND) $(DEPEND_PREV)
    229225
    230226all-test: $(TEST_OUTPUT) $(TEST_DISASM)
    231227
    232228clean:
    233         rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(LARCHIVE) $(LOUTPUT) $(EXTRA_OUTPUT) $(EXTRA_CLEAN)
     229        rm -f $(DEPENDS) $(JOB) $(OUTPUT) $(LARCHIVE) $(LOUTPUT) $(EXTRA_OUTPUT) $(EXTRA_CLEAN)
    234230        find . -name '*.o' -follow -exec rm \{\} \;
    235231        find . -name '*.lo' -follow -exec rm \{\} \;
     
    276272JOBFILE = $(LIBC_PREFIX)/../../../tools/jobfile.py
    277273
    278 ifeq ($(COMPILER),gcc_cross)
    279         CFLAGS += $(COMMON_CFLAGS) $(GCC_CFLAGS)
    280         DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    281 endif
    282 
    283 ifeq ($(COMPILER),gcc_helenos)
    284         CFLAGS += $(COMMON_CFLAGS) $(GCC_CFLAGS)
    285         DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    286 endif
    287 
    288 ifeq ($(COMPILER),gcc_native)
    289         CFLAGS += $(COMMON_CFLAGS) $(GCC_CFLAGS)
    290         DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    291 endif
    292 
    293274ifeq ($(COMPILER),clang)
    294275        CFLAGS += $(COMMON_CFLAGS) $(CLANG_CFLAGS)
    295         DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
     276else
     277        CFLAGS += $(COMMON_CFLAGS) $(GCC_CFLAGS)
    296278endif
    297279
    298280LIB_CFLAGS = $(CFLAGS) -fPIC
    299281LIB_LFLAGS = $(LFLAGS) -shared -soname $(LSONAME) --whole-archive
    300 
    301 ifneq ($(MAKECMDGOALS),clean)
    302 -include $(DEPEND)
    303 endif
    304282
    305283AS_CFLAGS := $(addprefix -Xassembler ,$(AFLAGS))
     
    309287LOBJECTS := $(addsuffix .lo,$(basename $(SOURCES)))
    310288TEST_OBJECTS := $(addsuffix .test.o,$(basename $(TEST_SOURCES)))
     289DEPENDS := $(addsuffix .d,$(basename $(SOURCES))) $(addsuffix .test.d,$(basename $(TEST_SOURCES)))
     290
     291-include $(DEPENDS)
    311292
    312293ifneq ($(BINARY),)
     
    367348endif
    368349
    369 %.o: %.S $(DEPEND)
    370         $(CC) $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@
     350%.o: %.S | depend
     351        $(CC) -MD $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@
    371352ifeq ($(PRECHECK),y)
    372353        $(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) -D__ASM__
    373354endif
    374355
    375 %.o: %.s $(DEPEND)
    376         $(CC) $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@
     356%.o: %.s | depend
     357        $(CC) -MD $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@
    377358ifeq ($(PRECHECK),y)
    378359        $(JOBFILE) $(JOB) $< $@ as asm
    379360endif
    380361
    381 %.o: %.c $(DEPEND)
    382         $(CC) $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@
     362%.o: %.c | depend
     363        $(CC) -MD $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@
    383364ifeq ($(PRECHECK),y)
    384365        $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS)
    385366endif
    386367
    387 %.test.o: %.c $(DEPEND)
    388         $(CC) $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(TEST_CFLAGS) -c $< -o $@
     368%.test.o: %.c | depend
     369        $(CC) -MD $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(TEST_CFLAGS) -c $< -o $@
    389370ifeq ($(PRECHECK),y)
    390371        $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(TEST_CFLAGS)
    391372endif
    392373
    393 %.lo: %.S $(DEPEND)
    394         $(CC) $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@
     374%.lo: %.S | depend
     375        $(CC) -MD $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@
    395376ifeq ($(PRECHECK),y)
    396377        $(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) -D__ASM__
    397378endif
    398379
    399 %.lo: %.s $(DEPEND)
    400         $(CC) $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@
     380%.lo: %.s | depend
     381        $(CC) -MD $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@
    401382ifeq ($(PRECHECK),y)
    402383        $(JOBFILE) $(JOB) $< $@ as asm
    403384endif
    404385
    405 %.lo: %.c $(DEPEND)
    406         $(CC) $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@
     386%.lo: %.c | depend
     387        $(CC) -MD $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@
    407388ifeq ($(PRECHECK),y)
    408389        $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS)
    409390endif
    410391
    411 $(DEPEND): $(PRE_DEPEND)
    412         makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) $(EXTRA_CFLAGS) -- $(SOURCES) > $@ 2> /dev/null
    413         makedepend -f - -o.test.o -- $(DEPEND_DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(TEST_CFLAGS) -- $(TEST_SOURCES) >> $@ 2> /dev/null
    414         -[ -f $(DEPEND_PREV) ] && diff -q $(DEPEND_PREV) $@ && mv -f $(DEPEND_PREV) $@
     392depend: $(PRE_DEPEND)
    415393
    416394##
  • uspace/lib/pcut/Makefile

    rfeab36ae r4761f54  
    2525        $(PCUT_TEST_PREFIX)xmlreport$(PCUT_TEST_SUFFIX)
    2626
    27 EXTRA_CLEAN = $(SELF_TESTS)
     27EXTRA_CLEAN = $(SELF_TESTS) tests/*.d
    2828
    2929include helenos.mak
Note: See TracChangeset for help on using the changeset viewer.