Making the ccache cache directory
This is my first stab at ensuring that the ccache cache directory exists. I'm very new to buildroot, so I'm not certain that I'm keeping with buildroot conventions nor am I certain I haven't overlooked something.
Cheers,
-- Dan
PATCH 1/1 ccache: Make the cache directory after ccache is built
This ensures that the cache directory (and all of its ancestor directories) exist. This is a nice thing to do because, if the parent of the cache directory doesn't exist, then ccache will complain that it cannot create the cache directory, causing the build to fail.
--- package/ccache/ccache.mk | 9 +++++++++ 1 file changed, 9 insertions(+)
package/ccache/ccache.mk +9 -0
@@ -38,6 +38,15 @@ endef HOST_CCACHE_POST_CONFIGURE_HOOKS += \ HOST_CCACHE_PATCH_CONFIGURATION +ifeq ($(BR2_CCACHE),y) +define HOST_CCACHE_MAKE_CACHE_DIR + mkdir -p $(BR_CACHE_DIR) +endef + +HOST_CCACHE_POST_BUILD_HOOKS += \ + HOST_CCACHE_MAKE_CACHE_DIR +endif + $(eval $(host-autotools-package)) ifeq ($(BR2_CCACHE),y)
Signature · 1 line
1.8.2.1
PATCH 1/1 ccache: Make the cache directory after ccache is built
Quoted 17 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Dan" == Dan Moulding <[email protected]> writes:
This ensures that the cache directory (and all of its ancestor directories) exist. This is a nice thing to do because, if the parent of the cache directory doesn't exist, then ccache will complain that it cannot create the cache directory, causing the build to fail.
Signed-off-by Dan Moulding <[email protected]>--- package/ccache/ccache.mk | 9 +++++++++ 1 file changed, 9 insertions(+)package/ccache/ccache.mk +0
-0
package/ccache/ccache.mk endef · line 41
Quoted 4 lines
package/ccache/ccache.mk +1
-0@@ -38,6 +38,15 @@ endef HOST_CCACHE_POST_CONFIGURE_HOOKS += \ HOST_CCACHE_PATCH_CONFIGURATION +ifeq ($(BR2_CCACHE),y)
This doesn't need to be inside a BR2_CCACHE conditional (just like the _PATCH_CONFIGURATION hook above) - As it isn't executed unless ccache is built.
package/ccache/ccache.mk endef · line 47
Quoted 6 lines
package/ccache/ccache.mk +6
-0+define HOST_CCACHE_MAKE_CACHE_DIR + mkdir -p $(BR_CACHE_DIR) +endef + +HOST_CCACHE_POST_BUILD_HOOKS += \ + HOST_CCACHE_MAKE_CACHE_DIR
It's not really related to building ccache, more its proper installation
- So I've changed this to use _POST_INSTALL_HOOKS.
Committed with those changes, thanks.
Signature · 1 line
Bye, Peter Korsgaard