SOURCES_LIST_FN=sources.txt
ifndef SOURCES_LIST
SOURCES_LIST_DIR:=$(RELATIVE_DIR)
-SOURCES_LIST:=$(MAKERULES_DIR)/$(SOURCES_LIST_DIR)/$(SOURCES_LIST_FN)
+SOURCES_LIST:=$(OUTPUT_DIR)/$(SOURCES_LIST_DIR)/$(SOURCES_LIST_FN)
export SOURCES_LIST SOURCES_LIST_DIR
endif
.PHONY: sources-list
sources-list: $(SOURCES_LIST)
-$(SOURCES_LIST): $(CONFIG_FILE) $(CONFIG_FILE)-default $(shell find -name Makefile.omk)
+$(SOURCES_LIST): $(CONFIG_FILES) $(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"
@mv "$(SOURCES_LIST).tmp2" "$(SOURCES_LIST)"
endif
-$(eval $(call omk_pass_template,sources-list-pass,$$(LOCAL_BUILD_DIR)))
+$(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:$(OUTPUT_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) \
+ @$(foreach bin,$(lib_LIBRARIES) $(shared_LIBRARIES) $(bin_PROGRAMS) $(test_PROGRAMS) $(utils_PROGRAMS) \
$(kernel_LIBRARIES) $(rtlinux_LIBRARIES) $(kernel_MODULES),\
$(foreach src,$(filter-out %.o,$($(bin)_SOURCES)),echo "$(RELATIVE_DIR:$(SOURCES_LIST_DIR)/%=%)/$(src)" >> "$(SOURCES_LIST).tmp";))
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))