wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

dir.mk (681B)


      1 MKSUBDIR = \
      2 	set -e;							\
      3 	targ=$@; targ=$${targ\#d};				\
      4 	for i in $$dirs; do					\
      5 		export $(SUBMAKE_EXPORT) BASE=$(BASE)$$i/;	\
      6 		if [ ! -d $$i ]; then				\
      7 			echo Skipping nonexistent directory: $$i 1>&2;	\
      8 		else						\
      9 			echo MAKE $$targ $$BASE;		\
     10 			(cd $$i && $(MAKE) $$targ) || exit $?;	\
     11 		fi;						\
     12 	done
     13 
     14 dall:
     15 	+dirs="$(DIRS)"; $(MKSUBDIR)
     16 dclean:
     17 	+dirs="$(DIRS)"; $(MKSUBDIR)
     18 dinstall:
     19 	+dirs="$(INSTDIRS)"; $(MKSUBDIR)
     20 duninstall:
     21 	+dirs="$(INSTDIRS)"; $(MKSUBDIR)
     22 ddepend:
     23 	+dirs="$(DIRS)"; $(MKSUBDIR)
     24 dtags:
     25 	+dirs="$(DIRS)"; $(MKSUBDIR)
     26 
     27 all: dall
     28 clean: dclean
     29 install: dinstall
     30 uninstall: duninstall
     31 depend: ddepend
     32 tags: dtags
     33 
     34 INSTDIRS = $(DIRS)
     35