]> rtime.felk.cvut.cz Git - omk.git/blobdiff - snippets/sources-list
The include-pass has to be initiated if LOCAL_CONFIG_H is set for Sysless and RTEMS...
[omk.git] / snippets / sources-list
index 037b6b1c6e43feae5498ddb9713aa799467d1b0b..ec2943f8fdf3874e229c5ae1509aa7c2e90aeed0 100644 (file)
@@ -24,7 +24,7 @@ ifeq ($(NEED_SOURCES_LIST),y) # avoid execution of find command bellow if it is
 .PHONY: sources-list
 sources-list: $(SOURCES_LIST)
 
-$(SOURCES_LIST): $(CONFIG_FILE) $(CONFIG_FILE)-default $(shell find -name Makefile.omk)
+$(SOURCES_LIST): $(CONFIG_FILE) $(CONFIG_FILE)-default $(shell find -name $(MAKEFILE_OMK))
        @echo -n "" > "$(SOURCES_LIST).tmp"
        @$(MAKE) --no-print-directory sources-list-pass
        @echo "# Automatically generated list of files in '$(RELATIVE_DIR)' that are used during OMK compilation" > "$(SOURCES_LIST).tmp2"
@@ -38,6 +38,8 @@ $(eval $(call omk_pass_template,sources-list-pass,$$(LOCAL_BUILD_DIR),,always))
 sources-list-pass-local:
        @$(foreach h,$(include_HEADERS) $(nobase_include_HEADERS) $(kernel_HEADERS),\
          echo "$(RELATIVE_DIR:$(SOURCES_LIST_DIR)/%=%)/$(h)" >> "$(SOURCES_LIST).tmp";)
+       @$(foreach ch,$(config_include_HEADERS), \
+         echo "$(USER_INCLUDE_DIR:$(MAKERULES_DIR)/$(addsuffix /,$(SOURCES_LIST_DIR))%=%)/$(ch)" >> "$(SOURCES_LIST).tmp";)
        @$(foreach h,$(renamed_include_HEADERS),echo "$(RELATIVE_DIR:$(SOURCES_LIST_DIR)/%=%)/$(h)"|sed -e 's/\(.*\)->.*/\1/' >> "$(SOURCES_LIST).tmp";)
        @$(foreach bin,$(lib_LIBRARIES) $(shared_LIBRARIES) $(bin_PROGRAMS) $(utils_PROGRAMS) \
          $(kernel_LIBRARIES) $(rtlinux_LIBRARIES) $(kernel_MODULES),\
@@ -48,16 +50,17 @@ sources-list-pass-local:
 ifeq ($(MAKECMDGOALS),TAGS)
 ETAGS=etags
 TAGS_CMD = $(ETAGS)
+TAGS: $(SOURCES_LIST)
+       @$(MAKE) --no-print-directory do-tags
 endif
 ifeq ($(MAKECMDGOALS),tags) 
 CTAGS=ctags -N
 TAGS_CMD = $(CTAGS)
+tags: $(SOURCES_LIST)
+       @$(MAKE) --no-print-directory do-tags
 endif
 export TAGS_CMD
 
-tags TAGS: $(SOURCES_LIST)
-       @$(MAKE) --no-print-directory do-tags
-
 ifeq ($(MAKECMDGOALS),do-tags)
 .PHONY: do-tags
 do-tags: $(shell sed -e '/^\#/d' $(SOURCES_LIST))