mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-29 17:16:15 +02:00
Change dependency file names from foo.dep to .foo.o.dep
This commit is contained in:
parent
4271927c5b
commit
f324b49ea1
6 changed files with 14 additions and 12 deletions
2
dist.mk
2
dist.mk
|
@ -11,4 +11,6 @@ $(dist_name).tar.bz2: $(dist_files)
|
||||||
|
|
||||||
clean_files += $(dist_name).tar.bz2
|
clean_files += $(dist_name).tar.bz2
|
||||||
|
|
||||||
|
print-top-help += echo " dist: Generate a source distribution";
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -51,3 +51,7 @@ define install-symlink =
|
||||||
$$(trace-install) ln -sfn $(1) $(2)
|
$$(trace-install) ln -sfn $(1) $(2)
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
||||||
|
print-top-help += \
|
||||||
|
echo " install: Install into \$$(prefix) (currently set to '$(prefix)')";
|
||||||
|
|
6
lib.mk
6
lib.mk
|
@ -45,11 +45,7 @@ ifeq ($(BUILD_DEBUG), 1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
# Utility function for recursively finding files, e.g.
|
include mk/functions.mk
|
||||||
# ‘$(call rwildcard, path/to/dir, *.c *.h)’.
|
|
||||||
rwildcard=$(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) $(filter $(subst *,%,$2),$d))
|
|
||||||
|
|
||||||
|
|
||||||
include mk/tracing.mk
|
include mk/tracing.mk
|
||||||
include mk/clean.mk
|
include mk/clean.mk
|
||||||
include mk/dist.mk
|
include mk/dist.mk
|
||||||
|
|
|
@ -107,10 +107,10 @@ define build-library =
|
||||||
$$(foreach obj, $$($(1)_OBJS), $$(eval $$(obj): $$($(1)_COMMON_DEPS)))
|
$$(foreach obj, $$($(1)_OBJS), $$(eval $$(obj): $$($(1)_COMMON_DEPS)))
|
||||||
|
|
||||||
# Include .dep files, if they exist.
|
# Include .dep files, if they exist.
|
||||||
$(1)_DEPS := $$(addsuffix .dep, $$(basename $$(_srcs)))
|
$(1)_DEPS := $$(foreach fn, $$($(1)_OBJS), $$(call filename-to-dep, $$(fn)))
|
||||||
-include $$($(1)_DEPS)
|
-include $$($(1)_DEPS)
|
||||||
|
|
||||||
libs_list += $$($(1)_PATH)
|
libs_list += $$($(1)_PATH)
|
||||||
clean_files += $$(_d)/*.a $$(_d)/*.$(SO_EXT) $$(_d)/*.o $$(_d)/*.dep $$($(1)_DEPS) $$($(1)_OBJS)
|
clean_files += $$(_d)/*.a $$(_d)/*.$(SO_EXT) $$(_d)/*.o $$(_d)/.*.dep $$($(1)_DEPS) $$($(1)_OBJS)
|
||||||
dist_files += $$(_srcs)
|
dist_files += $$(_srcs)
|
||||||
endef
|
endef
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
%.o: %.cc
|
%.o: %.cc
|
||||||
$(trace-cxx) $(CXX) -o $@ -c $< $(GLOBAL_CXXFLAGS) $(CXXFLAGS) $($@_CXXFLAGS) -MMD -MF $(basename $@).dep -MP
|
$(trace-cxx) $(CXX) -o $@ -c $< $(GLOBAL_CXXFLAGS) $(CXXFLAGS) $($@_CXXFLAGS) -MMD -MF $(call filename-to-dep, $@) -MP
|
||||||
|
|
||||||
%.o: %.cpp
|
%.o: %.cpp
|
||||||
$(trace-cxx) $(CXX) -o $@ -c $< $(GLOBAL_CXXFLAGS) $(CXXFLAGS) $($@_CXXFLAGS) -MMD -MF $(basename $@).dep -MP
|
$(trace-cxx) $(CXX) -o $@ -c $< $(GLOBAL_CXXFLAGS) $(CXXFLAGS) $($@_CXXFLAGS) -MMD -MF $(call filename-to-dep, $@) -MP
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(trace-cc) $(CC) -o $@ -c $< $(GLOBAL_CFLAGS) $(CFLAGS) $($@_CFLAGS) -MMD -MF $(basename $@).dep -MP
|
$(trace-cc) $(CC) -o $@ -c $< $(GLOBAL_CFLAGS) $(CFLAGS) $($@_CFLAGS) -MMD -MF $(call filename-to-dep, $@) -MP
|
||||||
|
|
|
@ -53,10 +53,10 @@ define build-program =
|
||||||
$$(foreach obj, $$($(1)_OBJS), $$(eval $$(obj): $$($(1)_COMMON_DEPS)))
|
$$(foreach obj, $$($(1)_OBJS), $$(eval $$(obj): $$($(1)_COMMON_DEPS)))
|
||||||
|
|
||||||
# Include .dep files, if they exist.
|
# Include .dep files, if they exist.
|
||||||
$(1)_DEPS := $$(addsuffix .dep, $$(basename $$(_srcs)))
|
$(1)_DEPS := $$(foreach fn, $$($(1)_OBJS), $$(call filename-to-dep, $$(fn)))
|
||||||
-include $$($(1)_DEPS)
|
-include $$($(1)_DEPS)
|
||||||
|
|
||||||
programs_list += $$($(1)_PATH)
|
programs_list += $$($(1)_PATH)
|
||||||
clean_files += $$($(1)_PATH) $$(_d)/*.o $$(_d)/*.dep $$($(1)_DEPS) $$($(1)_OBJS)
|
clean_files += $$($(1)_PATH) $$(_d)/*.o $$(_d)/.*.dep $$($(1)_DEPS) $$($(1)_OBJS)
|
||||||
dist_files += $$(_srcs)
|
dist_files += $$(_srcs)
|
||||||
endef
|
endef
|
||||||
|
|
Loading…
Reference in a new issue