summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Boreham <dboreham@redhat.com>2005-01-26 22:10:48 +0000
committerDavid Boreham <dboreham@redhat.com>2005-01-26 22:10:48 +0000
commit508e0d08e1a93371e7ae92e70ddd60aaa4d7c782 (patch)
treef3ae294b34a812b9aeb35aa5c60b14cbfca5939a
parentb65176542a299e201c81cf8cf41251eb3637d9a1 (diff)
downloadds-508e0d08e1a93371e7ae92e70ddd60aaa4d7c782.tar.gz
ds-508e0d08e1a93371e7ae92e70ddd60aaa4d7c782.tar.xz
ds-508e0d08e1a93371e7ae92e70ddd60aaa4d7c782.zip
Makefile changes to allow building on Linux machines where uname reports four-part version
-rw-r--r--config/config.mk9
-rw-r--r--nsconfig.mk5
2 files changed, 14 insertions, 0 deletions
diff --git a/config/config.mk b/config/config.mk
index b962fae0..2da430db 100644
--- a/config/config.mk
+++ b/config/config.mk
@@ -77,6 +77,14 @@ ifeq ($(OS_ARCH),Linux)
ifeq (,$(filter-out Linux FreeBSD,$(NSOS_ARCH)))
OS_RELEASE := $(shell echo $(OS_RELEASE) | sed 's/-.*//')
endif
+# If the release returned by uname has _4_ components, the original
+# logic here broke. The following lines detect this and add a second
+# 'basename' to fixup the version such that everything still works.
+OS_RELEASE_TEMP := $(subst ., ,$(OS_RELEASE))
+OS_RELEASE_COUNT := $(words $(OS_RELEASE_TEMP))
+ifeq ($(OS_RELEASE_COUNT), 4)
+ OS_RELEASE := $(basename $(OS_RELEASE))
+endif
OS_RELEASE := $(basename $(OS_RELEASE))
ifeq (86,$(findstring 86,$(OS_TEST)))
CPU_TAG = _x86
@@ -230,6 +238,7 @@ ifdef NSOS_RELEASE_OVERRIDE
OS_RELEASE := $(NSOS_RELEASE_OVERRIDE)
endif
+
include $(DEPTH)/config/$(OS_ARCH)$(OS_RELEASE).mk
OS_CONFIG := $(OS_ARCH)$(OS_RELEASE)
diff --git a/nsconfig.mk b/nsconfig.mk
index c4ab985d..145fd96b 100644
--- a/nsconfig.mk
+++ b/nsconfig.mk
@@ -179,6 +179,11 @@ ifeq ($(NSOS_ARCH),Linux)
ifeq (,$(filter-out Linux FreeBSD,$(NSOS_ARCH)))
NSOS_RELEASE := $(shell echo $(NSOS_RELEASE) | sed 's/-.*//')
endif
+NSOS_RELEASE_TEMP := $(subst ., ,$(NSOS_RELEASE))
+NSOS_RELEASE_COUNT := $(words $(NSOS_RELEASE_TEMP))
+ifeq ($(NSOS_RELEASE_COUNT), 4)
+ NSOS_RELEASE := $(basename $(NSOS_RELEASE))
+endif
NSOS_RELEASE := $(basename $(NSOS_RELEASE))
NSOS_ARCH := Linux
PRETTY_ARCH := Linux