Use GNU stat (as determined by OpenWRT) for GLUON_CONFIG_VERSION
This *should* fix the build on non-Linux systems like MacOS X.
This commit is contained in:
parent
de223ceaf2
commit
6c862525f7
16
Makefile
16
Makefile
@ -39,8 +39,9 @@ update-patches: FORCE
|
||||
_SINGLE=export MAKEFLAGS=$(space);
|
||||
|
||||
override OPENWRT_BUILD=1
|
||||
override GLUON_TOOLS=1
|
||||
GREP_OPTIONS=
|
||||
export OPENWRT_BUILD GREP_OPTIONS
|
||||
export OPENWRT_BUILD GLUON_TOOLS GREP_OPTIONS
|
||||
|
||||
-include $(TOPDIR)/include/debug.mk
|
||||
-include $(TOPDIR)/include/depends.mk
|
||||
@ -56,19 +57,24 @@ endef
|
||||
|
||||
include $(GLUONDIR)/include/profiles.mk
|
||||
|
||||
CheckExternal := test -d $(GLUON_OPENWRTDIR) || (echo 'You don'"'"'t seem to have optained the external repositories needed by Gluon; please call `make update` first!'; false)
|
||||
CheckExternal := test -d $(GLUON_OPENWRTDIR) || (echo 'You don'"'"'t seem to have obtained the external repositories needed by Gluon; please call `make update` first!'; false)
|
||||
|
||||
all: FORCE
|
||||
@$(CheckExternal)
|
||||
+@$(SUBMAKE) -C $(TOPDIR) prepare-tmpinfo OPENWRT_BUILD=0
|
||||
+@$(GLUONMAKE) gluon-tools GLUON_TOOLS=0
|
||||
+@$(GLUONMAKE) prepare
|
||||
+@$(GLUONMAKE) images
|
||||
|
||||
download prepare images: FORCE
|
||||
@$(CheckExternal)
|
||||
+@$(SUBMAKE) -C $(TOPDIR) prepare-tmpinfo OPENWRT_BUILD=0
|
||||
+@$(GLUONMAKE) gluon-tools GLUON_TOOLS=0
|
||||
+@$(GLUONMAKE) $@
|
||||
|
||||
manifest: FORCE
|
||||
@$(CheckExternal)
|
||||
+@$(GLUONMAKE) gluon-tools GLUON_TOOLS=0
|
||||
[ -n "$(GLUON_BRANCH)" ] || (echo 'Please set GLUON_BRANCH to create a manifest.'; false)
|
||||
+@$(GLUONMAKE) $@
|
||||
|
||||
@ -134,6 +140,10 @@ include $(INCLUDE_DIR)/target.mk
|
||||
include $(GLUONDIR)/include/profiles.mk
|
||||
|
||||
|
||||
$(STAGING_DIR_HOST)/bin/stat: $(STAGING_DIR_HOST)/.prepared
|
||||
gluon-tools: $(STAGING_DIR_HOST)/bin/stat
|
||||
|
||||
|
||||
$(BUILD_DIR)/.prepared: Makefile
|
||||
@mkdir -p $$(dirname $@)
|
||||
@touch $@
|
||||
@ -311,6 +321,6 @@ manifest: FORCE
|
||||
) :)) > $(GLUON_IMAGEDIR)/sysupgrade/$(GLUON_BRANCH).manifest
|
||||
|
||||
|
||||
.PHONY: all images prepare clean cleanall
|
||||
.PHONY: all images prepare clean cleanall gluon-tools
|
||||
|
||||
endif
|
||||
|
@ -26,7 +26,11 @@ $(GLUON_SITEDIR)/site.mk:
|
||||
GLUON_VERSION := $(shell cd $(GLUONDIR) && git describe --always 2>/dev/null || echo unknown)
|
||||
export GLUON_VERSION
|
||||
|
||||
GLUON_CONFIG_VERSION := $(shell test -d $(GLUON_SITEDIR) && (cd $(GLUON_SITEDIR) && git describe --always --dirty=.$$(stat -c %Y $(GLUON_SITEDIR)/site.conf) 2>/dev/null || stat -c %Y site.conf))
|
||||
|
||||
ifeq ($(OPENWRT_BUILD),1)
|
||||
ifeq ($(GLUON_TOOLS),1)
|
||||
|
||||
GLUON_CONFIG_VERSION := $(shell test -d $(GLUON_SITEDIR) && (cd $(GLUON_SITEDIR) && git describe --always --dirty=.$$($(STAGING_DIR_HOST)/bin/stat -c %Y $(GLUON_SITEDIR)/site.conf) 2>/dev/null || $(STAGING_DIR_HOST)/bin/stat -c %Y site.conf))
|
||||
export GLUON_CONFIG_VERSION
|
||||
|
||||
GLUON_SITE_CODE := $(shell $(GLUONDIR)/scripts/site.sh site_code)
|
||||
@ -35,6 +39,10 @@ export GLUON_SITE_CODE
|
||||
GLUON_RELEASE ?= $(shell $(GLUONDIR)/scripts/site.sh release)
|
||||
export GLUON_RELEASE
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
define merge-lists
|
||||
$(1) :=
|
||||
$(foreach var,$(2),$(1) := $$(sort $$(filter-out -% $$(patsubst -%,%,$$(filter -%,$$($(var)))),$$($(1)) $$($(var))))
|
||||
|
@ -0,0 +1,26 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Wed, 7 May 2014 22:57:10 +0200
|
||||
Subject: tools/Makefile: fix host tools build dependency
|
||||
|
||||
diff --git a/tools/Makefile b/tools/Makefile
|
||||
index 2236373..88c0562 100644
|
||||
--- a/tools/Makefile
|
||||
+++ b/tools/Makefile
|
||||
@@ -100,7 +100,7 @@ $(STAGING_DIR_HOST)/.prepared: $(TMP_DIR)/.build
|
||||
|
||||
|
||||
define PrepareCommand
|
||||
-$(STAGING_DIR_HOST)/bin/$(1): $(STAGING_DIR)/.prepared
|
||||
+$(STAGING_DIR_HOST)/bin/$(1): $(STAGING_DIR_HOST)/.prepared
|
||||
@mkdir -p "$$(dir $$@)"; rm -f "$$@"
|
||||
@export FILE="$$$$(which $(2) 2>/dev/null | grep -v 'not found' | head -n1)"; [ -n "$$$$FILE" ] || { \
|
||||
echo "Command $(1) not found."; false; \
|
||||
@@ -109,7 +109,7 @@ $(STAGING_DIR_HOST)/bin/$(1): $(STAGING_DIR)/.prepared
|
||||
endef
|
||||
endif
|
||||
|
||||
-$(STAGING_DIR_HOST)/bin/stat: $(STAGING_DIR)/.prepared
|
||||
+$(STAGING_DIR_HOST)/bin/stat: $(STAGING_DIR_HOST)/.prepared
|
||||
@rm -f $@
|
||||
@if stat --version > /dev/null 2>&1; then \
|
||||
ln -s `which stat` $@; \
|
Loading…
Reference in New Issue
Block a user