Alias Directories to prevent name clashes
This commit is contained in:
@@ -38,6 +38,7 @@ SUBDIRS := $(foreach dir,$(SUBDIRS),$(subst /.,,$(dir)))
|
|||||||
FILTER = crash% doc% include% lib% Libraries% Makefiles%
|
FILTER = crash% doc% include% lib% Libraries% Makefiles%
|
||||||
SUBDIRS := $(filter-out $(FILTER),$(SUBDIRS))
|
SUBDIRS := $(filter-out $(FILTER),$(SUBDIRS))
|
||||||
SUBDIRARS = $(foreach dir,$(SUBDIRS),$(dir)/$(dir).a)
|
SUBDIRARS = $(foreach dir,$(SUBDIRS),$(dir)/$(dir).a)
|
||||||
|
SUBDIRS := $(foreach dir,$(SUBDIRS),$(dir)_DIRECTORY)
|
||||||
|
|
||||||
LOCALSOURCES = $(wildcard *.cpp *.cc)
|
LOCALSOURCES = $(wildcard *.cpp *.cc)
|
||||||
LOCALOBJECTS := $(LOCALSOURCES:.cpp=.o.$(ARCH))
|
LOCALOBJECTS := $(LOCALSOURCES:.cpp=.o.$(ARCH))
|
||||||
@@ -192,15 +193,16 @@ $(ARNAME): $(SUBDIRS) $(LOCALOBJECTS)
|
|||||||
|
|
||||||
.PHONY: $(SUBDIRS)
|
.PHONY: $(SUBDIRS)
|
||||||
$(SUBDIRS):
|
$(SUBDIRS):
|
||||||
@if [ -e "$@/Makefile" ]; then \
|
$(eval DIR := $(subst _DIRECTORY,,$@))
|
||||||
|
@if [ -e "$(DIR)/Makefile" ]; then \
|
||||||
depth=$(MAKELEVEL); \
|
depth=$(MAKELEVEL); \
|
||||||
while [ $${depth} -gt 0 ] ; do \
|
while [ $${depth} -gt 0 ] ; do \
|
||||||
echo -n " "; \
|
echo -n " "; \
|
||||||
depth=`expr $$depth - 1`; \
|
depth=`expr $$depth - 1`; \
|
||||||
done; \
|
done; \
|
||||||
true; \
|
true; \
|
||||||
echo " <$@>"; \
|
echo " <$(DIR)>"; \
|
||||||
if ($(MAKE) -s -S -C $@ artifacts $(ARCH)); then \
|
if ($(MAKE) -s -S -C $(DIR) artifacts $(ARCH)); then \
|
||||||
:; \
|
:; \
|
||||||
else \
|
else \
|
||||||
exit $$?; \
|
exit $$?; \
|
||||||
@@ -211,7 +213,7 @@ $(SUBDIRS):
|
|||||||
depth=`expr $$depth - 1`; \
|
depth=`expr $$depth - 1`; \
|
||||||
done; \
|
done; \
|
||||||
true; \
|
true; \
|
||||||
echo " </$@>"; \
|
echo " </$(DIR)>"; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ---------- Clean Rules ----------
|
# ---------- Clean Rules ----------
|
||||||
@@ -226,6 +228,7 @@ clean:
|
|||||||
true; \
|
true; \
|
||||||
else \
|
else \
|
||||||
for dir in $(SUBDIRS); do \
|
for dir in $(SUBDIRS); do \
|
||||||
|
dir=$${dir%_DIRECTORY}; \
|
||||||
if [ -e "$$dir/Makefile" ]; then \
|
if [ -e "$$dir/Makefile" ]; then \
|
||||||
depth=$(MAKELEVEL); \
|
depth=$(MAKELEVEL); \
|
||||||
while [ $${depth} -gt 0 ] ; do \
|
while [ $${depth} -gt 0 ] ; do \
|
||||||
@@ -259,6 +262,7 @@ cleandeps:
|
|||||||
true; \
|
true; \
|
||||||
else \
|
else \
|
||||||
for dir in $(SUBDIRS); do \
|
for dir in $(SUBDIRS); do \
|
||||||
|
dir=$${dir%_DIRECTORY}; \
|
||||||
if [ -e "$$dir/Makefile" ]; then \
|
if [ -e "$$dir/Makefile" ]; then \
|
||||||
depth=$(MAKELEVEL); \
|
depth=$(MAKELEVEL); \
|
||||||
while [ $${depth} -gt 0 ] ; do \
|
while [ $${depth} -gt 0 ] ; do \
|
||||||
|
|||||||
Reference in New Issue
Block a user