libixp

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

dir.mk (632B)


      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 
     25 all: dall
     26 clean: dclean
     27 install: dinstall
     28 uninstall: duninstall
     29 depend: ddepend
     30 
     31 INSTDIRS = $(DIRS)
     32