]> rtime.felk.cvut.cz Git - sysless.git/commitdiff
New OMK feature (ALL_OMK_SUBDIRS) is now used.
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 2 Mar 2007 17:15:00 +0000 (17:15 +0000)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 2 Mar 2007 17:15:00 +0000 (17:15 +0000)
darcs-hash:20070302171512-f2ef6-64d2fd7f58e7dd54711583fafa873db67829654b.gz

common/Makefile.omk
common/Makefile.rules
common/app/Makefile.omk
common/libs4c/Makefile.omk

index 609a0b42040207dff2f770f0441df21beaa2b453..5baf5ed56f776e3a873ff6d330d2fd894eb12fee 100644 (file)
@@ -1,3 +1,3 @@
 # -*- makefile -*-
 
-SUBDIRS = arch board libs4c app
+SUBDIRS = $(ALL_OMK_SUBDIRS)
index d523c12fbd718cb3ab13dcf00b2806eac51cf169..1e6105b296f3d98d9954696bae430f21ad66e670 100644 (file)
@@ -13,6 +13,7 @@
 # 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
 # LOCAL_CONFIG_H   .. name of local config.h file generated from values #OMK@config_h
 #                     of options defined in the current directory
 # config_include_HEADERS .. names of global config files (possibly
@@ -229,6 +230,13 @@ default-config-pass-local:
        @echo "# Config for $(RELATIVE_DIR)" >> "$(CONFIG_FILE)-default"
        @$(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!')
                                                              #OMK@gcc
 # Rules for compilation of C, C++ and assembler sources using GNU
 # toolchain.
index 6ee1f4925173ef8ebcaa800143dba884c50121b5..63b20afac1cc141daec7cd4402d965647850192d 100644 (file)
@@ -1,4 +1,3 @@
 # -*- makefile -*-
 
-# All subdirectories (even linked) with Makefile.omk
-SUBDIRS := $(shell find -L $(SOURCES_DIR) -maxdepth 2 -mindepth 2 -name Makefile.omk|sed 's!$(SOURCES_DIR)/\(.*\)/.*!\1!')
+SUBDIRS := $(ALL_OMK_SUBDIRS)
index 6ee1f4925173ef8ebcaa800143dba884c50121b5..63b20afac1cc141daec7cd4402d965647850192d 100644 (file)
@@ -1,4 +1,3 @@
 # -*- makefile -*-
 
-# All subdirectories (even linked) with Makefile.omk
-SUBDIRS := $(shell find -L $(SOURCES_DIR) -maxdepth 2 -mindepth 2 -name Makefile.omk|sed 's!$(SOURCES_DIR)/\(.*\)/.*!\1!')
+SUBDIRS := $(ALL_OMK_SUBDIRS)