forked from beejjorgensen/bgc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (31 loc) · 986 Bytes
/
Makefile
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
PACKAGE=bgc
[email protected]:~/beej.us/guide/$(PACKAGE)
BUILDDIR=./build
.PHONY: all
all:
$(MAKE) -C builders
.PHONY: buildcp
buildcp:
mkdir -p $(BUILDDIR)/{pdf,html/single,html/multi,html/archive,translations,examples}
cp -v website/* $(BUILDDIR)
cp -v builders/print/*.pdf $(BUILDDIR)/pdf
cp -v builders/html/$(PACKAGE)*.{tgz,zip} $(BUILDDIR)/html/archive
cp -v builders/html/singlepage/*.{html,css} $(BUILDDIR)/html/single
cp -v builders/html/multipage/*.{html,css} $(BUILDDIR)/html/multi
cp -v translations/*.pdf $(BUILDDIR)/translations 2>/dev/null || :
cp -v examples/*.c $(BUILDDIR)/examples
cp -v examples/Makefile $(BUILDDIR)/examples
.PHONY: upload
upload: pristine all buildcp
rsync -rv -e ssh --delete build/* $(UPLOADDIR)
.PHONY: pristine
pristine: clean
$(MAKE) -C builders $@
$(MAKE) -C examples $@
rm -rf $(BUILDDIR)
rm -f lib/*.pyc
.PHONY: clean
clean:
$(MAKE) -C builders $@
$(MAKE) -C examples $@
rm -f $(PACKAGE).valid