Simplify Makefile

This commit is contained in:
Crayon2000 2019-01-23 11:26:45 -05:00
parent 2f278ab6e7
commit 33da364507
3 changed files with 23 additions and 49 deletions

View file

@ -1,25 +1,17 @@
SUBDIRS:= `ls | egrep -v '^(\.svn)$$'` MAKEFILES := $(shell find . -mindepth 2 -maxdepth 2 -name Makefile)
all: all:
@for i in $(SUBDIRS); do \ @for i in $(MAKEFILES); do \
if test -e $$i/Makefile ; then \ echo "-----------------------------------------------------------"; \
echo "-----------------------------------------------------------";\ $(MAKE) -C `dirname $$i` || exit 1; \
$(MAKE) -C $$i || { exit 1;} \
fi; \
done; done;
clean: clean:
@rm -f *.bz2 @for i in $(MAKEFILES); do \
@for i in $(SUBDIRS); do \ $(MAKE) -C `dirname $$i` clean || exit 1; \
if test -e $$i/Makefile ; then \
$(MAKE) -C $$i clean || { exit 1;} \
fi; \
done; done;
install: install:
@rm -f *.bz2 @for i in $(MAKEFILES); do \
@for i in $(SUBDIRS); do \ $(MAKE) -C `dirname $$i` install || exit 1; \
if test -e $$i/Makefile ; then \
$(MAKE) -C $$i install || { exit 1;} \
fi; \
done; done;

View file

@ -1,25 +1,17 @@
SUBDIRS:= `ls | egrep -v '^(\.svn)$$'` MAKEFILES := $(shell find . -mindepth 2 -maxdepth 2 -name Makefile)
all: all:
@for i in $(SUBDIRS); do \ @for i in $(MAKEFILES); do \
if test -e $$i/Makefile ; then \ echo "-----------------------------------------------------------"; \
echo "-----------------------------------------------------------";\ $(MAKE) -C `dirname $$i` || exit 1; \
$(MAKE) -C $$i || { exit 1;} \
fi; \
done; done;
clean: clean:
@rm -f *.bz2 @for i in $(MAKEFILES); do \
@for i in $(SUBDIRS); do \ $(MAKE) -C `dirname $$i` clean || exit 1; \
if test -e $$i/Makefile ; then \
$(MAKE) -C $$i clean || { exit 1;} \
fi; \
done; done;
install: install:
@rm -f *.bz2 @for i in $(MAKEFILES); do \
@for i in $(SUBDIRS); do \ $(MAKE) -C `dirname $$i` install || exit 1; \
if test -e $$i/Makefile ; then \
$(MAKE) -C $$i install || { exit 1;} \
fi; \
done; done;

View file

@ -1,22 +1,12 @@
SUBDIRS:= `ls | egrep -v '^(\.svn)$$'` MAKEFILES := $(shell find . -mindepth 2 -maxdepth 2 -name Makefile)
DATESTRING := $(shell date +%Y)$(shell date +%m)$(shell date +%d)
all: all:
@for i in $(SUBDIRS); do \ @for i in $(MAKEFILES); do \
if test -e $$i/Makefile ; then \ echo "-----------------------------------------------------------"; \
echo "-----------------------------------------------------------";\ $(MAKE) -C `dirname $$i` || exit 1; \
$(MAKE) -C $$i || { exit 1;} \
fi; \
done; done;
clean: clean:
@rm -f *.bz2 @for i in $(MAKEFILES); do \
@for i in $(SUBDIRS); do \ $(MAKE) -C `dirname $$i` clean || exit 1; \
if test -e $$i/Makefile ; then \
$(MAKE) -C $$i clean || { exit 1;} \
fi; \
done; done;
dist: clean
@tar --exclude=.svn -cvjf wii-examples-$(DATESTRING).tar.bz2 *