File: dir.mk

package info (click to toggle)
libixp 0.5-5
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 608 kB
  • sloc: ansic: 4,857; sh: 96; makefile: 75
file content (32 lines) | stat: -rw-r--r-- 618 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
MKSUBDIR = \
	set -e;							\
	targ=`echo $@ |sed 's/^d//'`;			\
	for i in $$dirs; do					\
		export BASE=$(BASE)$$i/;			\
		if [ ! -d $$i ]; then				\
			echo Skipping nonexistent directory: $$i 1>&2;	\
		else						\
			echo MAKE $$targ $$BASE;		\
			(cd $$i && $(MAKE) $$targ) || exit $?;	\
		fi;						\
	done

dall:
	+dirs="$(DIRS)"; $(MKSUBDIR)
dclean:
	+dirs="$(DIRS)"; $(MKSUBDIR)
dinstall:
	+dirs="$(INSTDIRS)"; $(MKSUBDIR)
duninstall:
	+dirs="$(INSTDIRS)"; $(MKSUBDIR)
ddepend:
	+dirs="$(DIRS)"; $(MKSUBDIR)

all: dall
clean: dclean
install: dinstall
uninstall: duninstall
depend: ddepend

INSTDIRS = $(DIRS)