summaryrefslogtreecommitdiffstats
path: root/encap/src/Makefile
blob: 0e3056ed6d1e8cc0484419ee403c1b7419b7f107 (plain)
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
33
34
35
36
37
38
39
40
41
# $Id$

export SHELL = /bin/sh

.PHONY : test log all clean distclean uninstall

DEST ?= DIST
MKINSTALLDIRS = ./bcfg2-site/bcfg2-site-RENAME/mkinstalldirs

log :
	@printf "Building in background, and logging to ./make.log\n"
	( $(MAKE) all > ./make.log 2>&1 ) &
	tail -f make.log

all : clean
	$(MAKE) -C ./encap-profiles all
	$(MAKE) -C ./bcfg2-site all
	$(MAKE) -C ./makeself-dist all
	if [ ! -d $(DEST) ]; then $(MKINSTALLDIRS) $(DEST); fi
	cp makeself-dist/*.run $(DEST)
	cp encap-profiles/*.tar.gz $(DEST)
	@printf "\n\n### encap build finished...\n"
	@printf "## Client install self-extracting/installing package is:\n"
	@printf "%s\n" "`ls $(DEST)/*.run 2>/dev/null`"
	@printf "\n"
    
clean :
	-$(MAKE) -C ./encap-profiles clean
	-$(MAKE) -C ./bcfg2-site clean
	-$(MAKE) -C ./makeself-dist clean
	-rm ./*.log ./*~ ./\#*
	-rm -rf $(DEST) makeself-dist/bcfg2-*
	-cd bcfg2-site && ls | grep bcfg2-site | grep -v bcfg2-site-RENAME | xargs -n1 rm -rf

distclean : clean
	-$(MAKE) -C ./encap-profiles distclean
	-$(MAKE) -C ./bcfg2-site distclean
	-$(MAKE) -C ./makeself-dist distclean

uninstall : distclean
	-$(MAKE) -C ./encap-profiles uninstall