Alias Directories to prevent name clashes

This commit is contained in:
2020-08-24 11:17:12 +02:00
parent 6f4e21c158
commit c36fa4f1ee
+8 -4
View File
@@ -38,6 +38,7 @@ SUBDIRS := $(foreach dir,$(SUBDIRS),$(subst /.,,$(dir)))
FILTER = crash% doc% include% lib% Libraries% Makefiles%
SUBDIRS := $(filter-out $(FILTER),$(SUBDIRS))
SUBDIRARS = $(foreach dir,$(SUBDIRS),$(dir)/$(dir).a)
SUBDIRS := $(foreach dir,$(SUBDIRS),$(dir)_DIRECTORY)
LOCALSOURCES = $(wildcard *.cpp *.cc)
LOCALOBJECTS := $(LOCALSOURCES:.cpp=.o.$(ARCH))
@@ -192,15 +193,16 @@ $(ARNAME): $(SUBDIRS) $(LOCALOBJECTS)
.PHONY: $(SUBDIRS)
$(SUBDIRS):
@if [ -e "$@/Makefile" ]; then \
$(eval DIR := $(subst _DIRECTORY,,$@))
@if [ -e "$(DIR)/Makefile" ]; then \
depth=$(MAKELEVEL); \
while [ $${depth} -gt 0 ] ; do \
echo -n " "; \
depth=`expr $$depth - 1`; \
done; \
true; \
echo " <$@>"; \
if ($(MAKE) -s -S -C $@ artifacts $(ARCH)); then \
echo " <$(DIR)>"; \
if ($(MAKE) -s -S -C $(DIR) artifacts $(ARCH)); then \
:; \
else \
exit $$?; \
@@ -211,7 +213,7 @@ $(SUBDIRS):
depth=`expr $$depth - 1`; \
done; \
true; \
echo " </$@>"; \
echo " </$(DIR)>"; \
fi
# ---------- Clean Rules ----------
@@ -226,6 +228,7 @@ clean:
true; \
else \
for dir in $(SUBDIRS); do \
dir=$${dir%_DIRECTORY}; \
if [ -e "$$dir/Makefile" ]; then \
depth=$(MAKELEVEL); \
while [ $${depth} -gt 0 ] ; do \
@@ -259,6 +262,7 @@ cleandeps:
true; \
else \
for dir in $(SUBDIRS); do \
dir=$${dir%_DIRECTORY}; \
if [ -e "$$dir/Makefile" ]; then \
depth=$(MAKELEVEL); \
while [ $${depth} -gt 0 ] ; do \