Merge pull request #12840 from leandrolanzieri/pr/makefiles_remove_ccache_basedir
makefiles: Generate proper dependency files when using ccache
This commit is contained in:
commit
07c84a4fc3
@ -100,25 +100,25 @@ $(OBJC): $(BINDIR)/$(MODULE)/%.o: %.c $(RIOTBUILD_CONFIG_HEADER_C)
|
|||||||
$(Q)$(CCACHE) $(CC) \
|
$(Q)$(CCACHE) $(CC) \
|
||||||
-DRIOT_FILE_RELATIVE=\"$(patsubst $(RIOTBASE)/%,%,$(abspath $<))\" \
|
-DRIOT_FILE_RELATIVE=\"$(patsubst $(RIOTBASE)/%,%,$(abspath $<))\" \
|
||||||
-DRIOT_FILE_NOPATH=\"$(notdir $<)\" \
|
-DRIOT_FILE_NOPATH=\"$(notdir $<)\" \
|
||||||
$(CFLAGS) $(INCLUDES) -MD -MP -c -o $@ $(abspath $<)
|
$(CFLAGS) $(INCLUDES) -MQ '$@' -MD -MP -c -o $@ $(abspath $<)
|
||||||
|
|
||||||
$(GENOBJC): %.o: %.c $(RIOTBUILD_CONFIG_HEADER_C)
|
$(GENOBJC): %.o: %.c $(RIOTBUILD_CONFIG_HEADER_C)
|
||||||
$(Q) $(CCACHE) $(CC) \
|
$(Q) $(CCACHE) $(CC) \
|
||||||
-DRIOT_FILE_RELATIVE=\"$(patsubst $(RIOTBASE)/%,%,$<)\" \
|
-DRIOT_FILE_RELATIVE=\"$(patsubst $(RIOTBASE)/%,%,$<)\" \
|
||||||
-DRIOT_FILE_NOPATH=\"$(notdir $<)\" \
|
-DRIOT_FILE_NOPATH=\"$(notdir $<)\" \
|
||||||
$(CFLAGS) $(INCLUDES) -MD -MP -c -o $@ $<
|
$(CFLAGS) $(INCLUDES) -MQ '$@' -MD -MP -c -o $@ $<
|
||||||
|
|
||||||
$(OBJCXX): $(BINDIR)/$(MODULE)/%.o: %.cpp $(RIOTBUILD_CONFIG_HEADER_C)
|
$(OBJCXX): $(BINDIR)/$(MODULE)/%.o: %.cpp $(RIOTBUILD_CONFIG_HEADER_C)
|
||||||
$(Q)$(CCACHE) $(CXX) \
|
$(Q)$(CCACHE) $(CXX) \
|
||||||
-DRIOT_FILE_RELATIVE=\"$(patsubst $(RIOTBASE)/%,%,$(abspath $<))\" \
|
-DRIOT_FILE_RELATIVE=\"$(patsubst $(RIOTBASE)/%,%,$(abspath $<))\" \
|
||||||
-DRIOT_FILE_NOPATH=\"$(notdir $<)\" \
|
-DRIOT_FILE_NOPATH=\"$(notdir $<)\" \
|
||||||
$(CXXFLAGS) $(CXXINCLUDES) $(INCLUDES) -MD -MP -c -o $@ $(abspath $<)
|
$(CXXFLAGS) $(CXXINCLUDES) $(INCLUDES) -MQ '$@' -MD -MP -c -o $@ $(abspath $<)
|
||||||
|
|
||||||
$(ASMOBJ): $(BINDIR)/$(MODULE)/%.o: %.s
|
$(ASMOBJ): $(BINDIR)/$(MODULE)/%.o: %.s
|
||||||
$(Q)$(AS) $(ASFLAGS) -o $@ $(abspath $<)
|
$(Q)$(AS) $(ASFLAGS) -o $@ $(abspath $<)
|
||||||
|
|
||||||
$(ASSMOBJ): $(BINDIR)/$(MODULE)/%.o: %.S $(RIOTBUILD_CONFIG_HEADER_C)
|
$(ASSMOBJ): $(BINDIR)/$(MODULE)/%.o: %.S $(RIOTBUILD_CONFIG_HEADER_C)
|
||||||
$(Q)$(CCAS) $(CCASFLAGS) $(INCLUDES) -MD -MP -c -o $@ $(abspath $<)
|
$(Q)$(CCAS) $(CCASFLAGS) $(INCLUDES) -MQ '$@' -MD -MP -c -o $@ $(abspath $<)
|
||||||
|
|
||||||
# pull in dependency info for *existing* .o files
|
# pull in dependency info for *existing* .o files
|
||||||
# deleted header files will be silently ignored
|
# deleted header files will be silently ignored
|
||||||
|
|||||||
@ -23,7 +23,6 @@ include $(RIOT_MAKEFILES_GLOBAL_PRE)
|
|||||||
|
|
||||||
# set undefined variables
|
# set undefined variables
|
||||||
RIOTBASE ?= $(_riotbase)
|
RIOTBASE ?= $(_riotbase)
|
||||||
CCACHE_BASEDIR ?= $(RIOTBASE)
|
|
||||||
RIOTCPU ?= $(RIOTBASE)/cpu
|
RIOTCPU ?= $(RIOTBASE)/cpu
|
||||||
RIOTBOARD ?= $(RIOTBASE)/boards
|
RIOTBOARD ?= $(RIOTBASE)/boards
|
||||||
RIOTMAKE ?= $(RIOTBASE)/makefiles
|
RIOTMAKE ?= $(RIOTBASE)/makefiles
|
||||||
@ -55,7 +54,6 @@ __DIRECTORY_VARIABLES := \
|
|||||||
BUILD_DIR \
|
BUILD_DIR \
|
||||||
BINDIRBASE \
|
BINDIRBASE \
|
||||||
BINDIR \
|
BINDIR \
|
||||||
CCACHE_BASEDIR \
|
|
||||||
GITCACHE \
|
GITCACHE \
|
||||||
PKGDIRBASE \
|
PKGDIRBASE \
|
||||||
DLCACHE_DIR \
|
DLCACHE_DIR \
|
||||||
@ -63,7 +61,6 @@ __DIRECTORY_VARIABLES := \
|
|||||||
|
|
||||||
# Make all paths absolute.
|
# Make all paths absolute.
|
||||||
override RIOTBASE := $(abspath $(RIOTBASE))
|
override RIOTBASE := $(abspath $(RIOTBASE))
|
||||||
override CCACHE_BASEDIR := $(abspath $(CCACHE_BASEDIR))
|
|
||||||
override RIOTCPU := $(abspath $(RIOTCPU))
|
override RIOTCPU := $(abspath $(RIOTCPU))
|
||||||
override RIOTBOARD := $(abspath $(RIOTBOARD))
|
override RIOTBOARD := $(abspath $(RIOTBOARD))
|
||||||
override RIOTMAKE := $(abspath $(RIOTMAKE))
|
override RIOTMAKE := $(abspath $(RIOTMAKE))
|
||||||
|
|||||||
@ -92,9 +92,6 @@ export HEXFILE # The 'intel hex' stripped result of the compilatio
|
|||||||
# RESET # The command to call on "make reset", this command resets/reboots the target.
|
# RESET # The command to call on "make reset", this command resets/reboots the target.
|
||||||
# RESET_FLAGS # The parameters to supply to RESET.
|
# RESET_FLAGS # The parameters to supply to RESET.
|
||||||
|
|
||||||
export CCACHE_BASEDIR # ccache basedir, allows multiple riot build
|
|
||||||
# directories to share a ccache directory
|
|
||||||
|
|
||||||
export DLCACHE # directory used to cache http downloads
|
export DLCACHE # directory used to cache http downloads
|
||||||
export DOWNLOAD_TO_FILE # Use `$(DOWNLOAD_TO_FILE) $(DESTINATION) $(URL)` to download `$(URL)` to `$(DESTINATION)`.
|
export DOWNLOAD_TO_FILE # Use `$(DOWNLOAD_TO_FILE) $(DESTINATION) $(URL)` to download `$(URL)` to `$(DESTINATION)`.
|
||||||
export DOWNLOAD_TO_STDOUT # Use `$(DOWNLOAD_TO_STDOUT) $(URL)` to download `$(URL)` output `$(URL)` to stdout, e.g. to be piped into `tar xz`.
|
export DOWNLOAD_TO_STDOUT # Use `$(DOWNLOAD_TO_STDOUT) $(URL)` to download `$(URL)` output `$(URL)` to stdout, e.g. to be piped into `tar xz`.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user