]> rtime.felk.cvut.cz Git - omk/sssa.git/commitdiff
Fixed bug in $(ALL_OMK_SUBDIRS) - when used with :=
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 15 Mar 2007 07:27:00 +0000 (07:27 +0000)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 15 Mar 2007 07:27:00 +0000 (07:27 +0000)
darcs-hash:20070315072721-f2ef6-43659b3a48a7c500972b5cf5f390e20a90bf0f51.gz

snippets/base
tests/all_omk_subdirs/Makefile.omk [deleted file]
tests/all_omk_subdirs/runtest-recurs-expanded [new file with mode: 0755]
tests/all_omk_subdirs/runtest-simply-expanded [new file with mode: 0755]
tests/all_omk_subdirs/test.inc [moved from tests/all_omk_subdirs/runtest with 85% similarity]

index 271149f3238b768bb1ff47f0eaae7063a196eb9a..79be91b46207c4fe02dd74636a862276bee2c9c4 100644 (file)
@@ -11,7 +11,6 @@
 # W                .. whole tree - if set to 1, make is always called from the top-level directory
 # SUBDIRS          .. list of subdirectories intended for make from actual directory
 # default_CONFIG   .. list of default config assignments CONFIG_XXX=y/n ...
-# ALL_OMK_SUBDIRS  .. Expands to all subdirectories (even linked ones) containing Makefile.omk
 
 # We need to ensure definition of sources directory first
 ifndef SOURCES_DIR
@@ -105,6 +104,10 @@ else
   QUIET_CMD_ECHO = echo
 endif
 
+# All subdirectories (even linked ones) containing Makefile.omk
+# Usage in Makefile.omk: SUBDIRS = $(ALL_OMK_SUBDIRS)
+ALL_OMK_SUBDIRS = $(shell find -L $(SOURCES_DIR) -maxdepth 2 -mindepth 2 -name Makefile.omk|sed 's!$(SOURCES_DIR)/\(.*\)/.*!\1!')
+
 # ===================================================================
 # We have set up all important variables, so we can check and include
 # real OCERA style Makefile.omk now
@@ -172,9 +175,3 @@ default-config-pass-local:
        @$(foreach x, $(default_CONFIG), echo $(x) | \
                sed -e 's/^.*=x$$/#\0/' >> "$(CONFIG_FILE)-default" ; )
 
-# =======================
-# Useful macros
-
-# All subdirectories (even linked ones) containing Makefile.omk
-# Usage in Makefile.omk: SUBDIRS = $(ALL_OMK_SUBDIRS)
-ALL_OMK_SUBDIRS = $(shell find -L $(SOURCES_DIR) -maxdepth 2 -mindepth 2 -name Makefile.omk|sed 's!$(SOURCES_DIR)/\(.*\)/.*!\1!')
diff --git a/tests/all_omk_subdirs/Makefile.omk b/tests/all_omk_subdirs/Makefile.omk
deleted file mode 100644 (file)
index 4392cf5..0000000
+++ /dev/null
@@ -1 +0,0 @@
-SUBDIRS = $(ALL_OMK_SUBDIRS)
\ No newline at end of file
diff --git a/tests/all_omk_subdirs/runtest-recurs-expanded b/tests/all_omk_subdirs/runtest-recurs-expanded
new file mode 100755 (executable)
index 0000000..6b6aae8
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+OP="="
+. test.inc
diff --git a/tests/all_omk_subdirs/runtest-simply-expanded b/tests/all_omk_subdirs/runtest-simply-expanded
new file mode 100755 (executable)
index 0000000..907198c
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+OP=":="
+. test.inc
similarity index 85%
rename from tests/all_omk_subdirs/runtest
rename to tests/all_omk_subdirs/test.inc
index a83c163c4a8ccd7ee5c8aed2a513e6654d1574b4..10964265b638d5160a31734a0100ff85432c8d15 100755 (executable)
@@ -3,6 +3,8 @@
 . $OMK_TESTSROOT/functions.sh
 
 touch config.omk-default
+echo "SUBDIRS $OP \$(ALL_OMK_SUBDIRS)" > Makefile.omk
+
 OUTPUT=$(make 2>&1) || canttest
 echo $OUTPUT | grep make-in-dir1 || error "Make was not called in dir1" 
 echo $OUTPUT | grep make-in-dir2 || error "Make was not called in dir2"