diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-02-01 11:31:25 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-02-01 11:31:25 +0100 |
commit | f324b49ea19e606f84b89ecb499f0e961646cd50 (patch) | |
tree | fa11c86a31d72bed8d9cf1f816ff2372a0f08db4 | |
parent | 4271927c5be2c5b87ca83682d1f2bd71d5ce4a66 (diff) |
Change dependency file names from foo.dep to .foo.o.dep
-rw-r--r-- | dist.mk | 2 | ||||
-rw-r--r-- | install.mk | 4 | ||||
-rw-r--r-- | lib.mk | 6 | ||||
-rw-r--r-- | libraries.mk | 4 | ||||
-rw-r--r-- | patterns.mk | 6 | ||||
-rw-r--r-- | programs.mk | 4 |
6 files changed, 14 insertions, 12 deletions
@@ -11,4 +11,6 @@ $(dist_name).tar.bz2: $(dist_files) clean_files += $(dist_name).tar.bz2 +print-top-help += echo " dist: Generate a source distribution"; + endif diff --git a/install.mk b/install.mk index aee4bf38b..093f30b81 100644 --- a/install.mk +++ b/install.mk @@ -51,3 +51,7 @@ define install-symlink = $$(trace-install) ln -sfn $(1) $(2) endef + + +print-top-help += \ + echo " install: Install into \$$(prefix) (currently set to '$(prefix)')"; @@ -45,11 +45,7 @@ ifeq ($(BUILD_DEBUG), 1) endif -# Utility function for recursively finding files, e.g. -# ‘$(call rwildcard, path/to/dir, *.c *.h)’. -rwildcard=$(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) $(filter $(subst *,%,$2),$d)) - - +include mk/functions.mk include mk/tracing.mk include mk/clean.mk include mk/dist.mk diff --git a/libraries.mk b/libraries.mk index 90eb125a6..461a3e9a6 100644 --- a/libraries.mk +++ b/libraries.mk @@ -107,10 +107,10 @@ define build-library = $$(foreach obj, $$($(1)_OBJS), $$(eval $$(obj): $$($(1)_COMMON_DEPS))) # 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) 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) endef diff --git a/patterns.mk b/patterns.mk index 91a758f33..f5674d404 100644 --- a/patterns.mk +++ b/patterns.mk @@ -1,8 +1,8 @@ %.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 - $(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 - $(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 diff --git a/programs.mk b/programs.mk index c608a6f25..0478e16d0 100644 --- a/programs.mk +++ b/programs.mk @@ -53,10 +53,10 @@ define build-program = $$(foreach obj, $$($(1)_OBJS), $$(eval $$(obj): $$($(1)_COMMON_DEPS))) # 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) 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) endef |