]> rtime.felk.cvut.cz Git - sysless.git/commitdiff
Updated Makefile.rules (fixes ALL_OMK_SUBDIRS)
authorMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 21 Mar 2007 16:12:00 +0000 (16:12 +0000)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 21 Mar 2007 16:12:00 +0000 (16:12 +0000)
darcs-hash:20070321161204-f2ef6-5a6a623d47c0a11ba384e8d5e5d4187731f7fbd1.gz

Makefile.rules

index 1e6105b296f3d98d9954696bae430f21ad66e670..7be9fe8dc6148ca9f83ba8957f35450b1a1dd3b0 100644 (file)
@@ -13,7 +13,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
 # 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
@@ -164,6 +163,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 = $(patsubst %/Makefile.omk,%,$(patsubst $(SOURCES_DIR)/%,%,$(wildcard $(SOURCES_DIR)/*/Makefile.omk)))
+
 # ===================================================================
 # We have set up all important variables, so we can check and include
 # real OCERA style Makefile.omk now
@@ -231,12 +234,6 @@ 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!')
                                                              #OMK@gcc
 # Rules for compilation of C, C++ and assembler sources using GNU
 # toolchain.