]> rtime.felk.cvut.cz Git - omk.git/commitdiff
Configuration file config.target is supported by all rules.
authorMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 16 Dec 2007 22:09:00 +0000 (22:09 +0000)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 16 Dec 2007 22:09:00 +0000 (22:09 +0000)
darcs-hash:20071216220926-f2ef6-5fdb97f279f873fadca7d5b2b915c008da4305af.gz

snippets/linux-setup
tests/omk_config/Makefile [new file with mode: 0644]
tests/omk_config/Makefile.omk [new file with mode: 0644]
tests/omk_config/config.omk [new file with mode: 0644]
tests/omk_config/config.omk-default [new file with mode: 0644]
tests/omk_config/config.target [new file with mode: 0644]
tests/omk_config/runtest [new file with mode: 0755]

index 70d6e7f7bc5b6b045ee06a7788693400b21bfc82..d2cab04c5e2a8d3f5a397e99ada7d9e236e14102 100644 (file)
@@ -1,5 +1,7 @@
 -include $(MAKERULES_DIR)/OCERA_TOP_DIR
 
+-include $(MAKERULES_DIR)/config.target
+
 BUILD_DIR_NAME = _build
 COMPILED_DIR_NAME = _compiled
 ifndef GROUP_DIR_NAME
diff --git a/tests/omk_config/Makefile b/tests/omk_config/Makefile
new file mode 100644 (file)
index 0000000..f595272
--- /dev/null
@@ -0,0 +1,14 @@
+# Generic directory or leaf node makefile for OCERA make framework
+
+ifndef MAKERULES_DIR
+MAKERULES_DIR := $(shell ( old_pwd="" ;  while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" == `pwd`  ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) )
+endif
+
+ifeq ($(MAKERULES_DIR),)
+all : default
+.DEFAULT::
+       @echo -e "\nThe Makefile.rules has not been found in this or partent directory\n"
+else   
+include $(MAKERULES_DIR)/Makefile.rules
+endif
+
diff --git a/tests/omk_config/Makefile.omk b/tests/omk_config/Makefile.omk
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/omk_config/config.omk b/tests/omk_config/config.omk
new file mode 100644 (file)
index 0000000..46ce8fc
--- /dev/null
@@ -0,0 +1 @@
+$(warning config.omk included)
diff --git a/tests/omk_config/config.omk-default b/tests/omk_config/config.omk-default
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/omk_config/config.target b/tests/omk_config/config.target
new file mode 100644 (file)
index 0000000..ce4b4e3
--- /dev/null
@@ -0,0 +1 @@
+$(warning config.target included)
diff --git a/tests/omk_config/runtest b/tests/omk_config/runtest
new file mode 100755 (executable)
index 0000000..d1a57d3
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+source ../functions.sh
+
+OUTPUT=$(make 2>&1)
+
+echo $OUTPUT
+echo $OUTPUT|grep -q 'config.target included'|| error "config.target not included"
+echo $OUTPUT|grep -q 'config.omk included'|| error "config.omk not included"