Don't clean folders without Makefile

This commit is contained in:
2020-03-17 12:09:42 +01:00
parent 61894c4588
commit 14408c1993
+28 -24
View File
@@ -179,18 +179,20 @@ clean:
true; \ true; \
else \ else \
for dir in $(SUBDIRS); do \ for dir in $(SUBDIRS); do \
depth=$(MAKELEVEL); \ if [ -e "$$dir/Makefile" ]; then \
while [ $${depth} -gt 0 ] ; do \ depth=$(MAKELEVEL); \
echo -n " "; \ while [ $${depth} -gt 0 ] ; do \
depth=`expr $$depth - 1`; \ echo -n " "; \
done; \ depth=`expr $$depth - 1`; \
echo " <$$dir>"; \ done; \
$(MAKE) -s -S -C $$dir $@ $(ARCH); \ echo " <$$dir>"; \
while [ $${depth} -gt 0 ] ; do \ $(MAKE) -s -S -C $$dir $@ $(ARCH); \
echo -n " "; \ while [ $${depth} -gt 0 ] ; do \
depth=`expr $$depth - 1`; \ echo -n " "; \
done; \ depth=`expr $$depth - 1`; \
echo " </$$dir>"; \ done; \
echo " </$$dir>"; \
fi \
done; \ done; \
for target in $(TARGETS); do \ for target in $(TARGETS); do \
rm -f $$target.$(ARCH); \ rm -f $$target.$(ARCH); \
@@ -210,18 +212,20 @@ cleandeps:
true; \ true; \
else \ else \
for dir in $(SUBDIRS); do \ for dir in $(SUBDIRS); do \
depth=$(MAKELEVEL); \ if [ -e "$$dir/Makefile" ]; then \
while [ $${depth} -gt 0 ] ; do \ depth=$(MAKELEVEL); \
echo -n " "; \ while [ $${depth} -gt 0 ] ; do \
depth=`expr $$depth - 1`; \ echo -n " "; \
done; \ depth=`expr $$depth - 1`; \
echo " <$$dir>"; \ done; \
$(MAKE) -s -S -C $$dir $@ $(ARCH); \ echo " <$$dir>"; \
while [ $${depth} -gt 0 ] ; do \ $(MAKE) -s -S -C $$dir $@ $(ARCH); \
echo -n " "; \ while [ $${depth} -gt 0 ] ; do \
depth=`expr $$depth - 1`; \ echo -n " "; \
done; \ depth=`expr $$depth - 1`; \
echo " </$$dir>"; \ done; \
echo " </$$dir>"; \
fi \
done; \ done; \
for target in $(TARGETS); do \ for target in $(TARGETS); do \
rm -f $$target.$(ARCH); \ rm -f $$target.$(ARCH); \