GNUmakefile 4.07 KB
Newer Older
Robert Ricci's avatar
Robert Ricci committed
1 2 3 4
# 
# Braindead makefile for now - always build the thing
#
TOPLEVEL=apt-manual
5
INSTALL_LIVE=ops.emulab.net:/usr/testbed/aptdocs/
6
INSTALL_CLAB=ops.emulab.net:/usr/testbed/cloudlabdocs/
Gary Wong's avatar
Gary Wong committed
7
INSTALL_PNET=ops.emulab.net:/usr/testbed/phantomnetdocs/
Gary Wong's avatar
Gary Wong committed
8
INSTALL_ELAB=ops.emulab.net:/usr/testbed/emulabdocs/
9
INSTALL_POWDER=ops.emulab.net:/usr/testbed/powderdocs/
Robert Ricci's avatar
Robert Ricci committed
10 11

SCRIBBLEFILES=$(wildcard *.scrbl) 
12 13
SCREENSHOTFILES=$(wildcard screenshots/*)
DEFSFILE=defs.rkt
Robert Ricci's avatar
Robert Ricci committed
14

15
GENI_LIB_DIR=$(shell ./py/find-geni-lib.py)
16

17 18
SOURCES=$(SCRIBBLEFILES) $(SCREENSHOTFILES) $(DEFSFILE)

Gary Wong's avatar
Gary Wong committed
19
all: each
20

Gary Wong's avatar
Gary Wong committed
21
pdf: pdf/apt-manual.pdf pdf/cloudlab-manual.pdf pdf/phantomnet-manual.pdf \
22
	pdf/emulab-manual.pdf pdf/powder-manual.pdf
Robert Ricci's avatar
Robert Ricci committed
23

24
apt: $(SOURCES)
25
	-mkdir apt-manual/
26
	cd $(GENI_LIB_DIR)/docs && $(MAKE) html
27
	-rm -rf apt-manual/geni-lib/
28 29
	cp -r $(GENI_LIB_DIR)/docs/build/html apt-manual/geni-lib
	scribble --htmls ++style apt-manual.css ++arg --geni-lib-dir ++arg $(GENI_LIB_DIR) $(TOPLEVEL).scrbl
Robert Ricci's avatar
Robert Ricci committed
30

31
cloudlab: $(SOURCES) 
Robert Ricci's avatar
Robert Ricci committed
32
	-mkdir cloudlab-manual/
33
	cd $(GENI_LIB_DIR)/docs && $(MAKE) html
34
	-rm -rf cloudlab-manual/geni-lib/
35
	cp -r $(GENI_LIB_DIR)/docs/build/html cloudlab-manual/geni-lib
36
	scribble --htmls ++style cloudlab-manual.css ++arg --clab ++arg --geni-lib-dir ++arg $(GENI_LIB_DIR) cloudlab-manual.scrbl
Gary Wong's avatar
Gary Wong committed
37

38 39 40 41 42 43 44
cloudlab-ga: $(SOURCES) 
	-mkdir cloudlab-manual/
	cd $(GENI_LIB_DIR)/docs && $(MAKE) html
	-rm -rf cloudlab-manual/geni-lib/
	cp -r $(GENI_LIB_DIR)/docs/build/html cloudlab-manual/geni-lib
	scribble --htmls ++style cloudlab-manual.css ++arg --ga ++arg --clab ++arg --geni-lib-dir ++arg $(GENI_LIB_DIR) cloudlab-manual.scrbl

Gary Wong's avatar
Gary Wong committed
45
phantomnet: $(SOURCES)
46
	-mkdir phantomnet-manual/
47
	cd $(GENI_LIB_DIR)/docs && $(MAKE) html
48
	-rm -rf phantomnet-manual/geni-lib/
49 50
	cp -r $(GENI_LIB_DIR)/docs/build/html phantomnet-manual/geni-lib
	scribble --htmls ++style phantomnet-manual.css ++arg --pnet ++arg --geni-lib-dir ++arg $(GENI_LIB_DIR) phantomnet-manual.scrbl
Gary Wong's avatar
Gary Wong committed
51

52 53 54 55 56 57 58
powder: $(SOURCES)
	-mkdir powder-manual/
	cd $(GENI_LIB_DIR)/docs && $(MAKE) html
	-rm -rf powder-manual/geni-lib/
	cp -r $(GENI_LIB_DIR)/docs/build/html powder-manual/geni-lib
	scribble --htmls ++style powder-manual.css ++arg --powder ++arg --geni-lib-dir ++arg $(GENI_LIB_DIR) powder-manual.scrbl

Gary Wong's avatar
Gary Wong committed
59
emulab: $(SOURCES)
60
	-mkdir emulab-manual/
61
	cd $(GENI_LIB_DIR)/docs && $(MAKE) html
62
	-rm -rf emulab-manual/geni-lib/
63 64
	cp -r $(GENI_LIB_DIR)/docs/build/html emulab-manual/geni-lib
	scribble --htmls ++style emulab-manual.css ++arg --elab ++arg --geni-lib-dir ++arg $(GENI_LIB_DIR) emulab-manual.scrbl
Gary Wong's avatar
Gary Wong committed
65

Robert Ricci's avatar
Robert Ricci committed
66
pdf/apt-manual.pdf: $(SOURCES)
67
	scribble --dest pdf/ --pdf ++arg --pdf $(TOPLEVEL).scrbl
Robert Ricci's avatar
Robert Ricci committed
68 69

pdf/cloudlab-manual.pdf: $(SOURCES)
70
	scribble --dest pdf/ --pdf ++arg --clab ++arg --pdf cloudlab-manual.scrbl
Robert Ricci's avatar
Robert Ricci committed
71

Gary Wong's avatar
Gary Wong committed
72
pdf/phantomnet-manual.pdf: $(SOURCES)
73
	scribble --dest pdf/ --pdf ++arg --pnet ++arg --pdf phantomnet-manual.scrbl
74

75 76 77
pdf/powder-manual.pdf: $(SOURCES)
	scribble --dest pdf/ --pdf ++arg --powder ++arg --pdf powder-manual.scrbl

Gary Wong's avatar
Gary Wong committed
78
pdf/emulab-manual.pdf: $(SOURCES)
79
	scribble --dest pdf/ --pdf ++arg --elab ++arg --pdf emulab-manual.scrbl
Gary Wong's avatar
Gary Wong committed
80 81

each: apt cloudlab phantomnet emulab
82

83
.PHONY: apt cloudlab phantomnet powder emulab all each clean install-live install-cloudlab  install-phantomnet install-powder install-emulab install-all update-examples
84 85 86 87 88 89

PROFILE_EXAMPLES=$(wildcard code-samples/profile/*/*.py)
update-examples:
	@for example in $(PROFILE_EXAMPLES) ; do \
	    ./fetch-profile-code $$example; \
	done
90

Robert Ricci's avatar
Robert Ricci committed
91 92
clean:
	-rm -rf $(TOPLEVEL)/
93
	-rm -rf cloudlab-manual/
Gary Wong's avatar
Gary Wong committed
94
	-rm -rf phantomnet-manual/
95
	-rm -rf powder-manual/
Gary Wong's avatar
Gary Wong committed
96
	-rm -rf emulab-manual/
97
	-rm -rf pdf/*
Robert Ricci's avatar
Robert Ricci committed
98
	-rm *.bak
Robert Ricci's avatar
Robert Ricci committed
99 100 101 102 103
	-rm *.tex
	-rm *.log
	-rm *.aux
	-rm *.out
	-rm *.png
104

105
install-all: install-live install-cloudlab install-phantomnet install-powder install-emulab
Robert Ricci's avatar
Robert Ricci committed
106

107
install-live: apt
108
	-rsync -v -az -e ssh --delete apt-manual/ $(INSTALL_LIVE)
109

110
install-cloudlab: cloudlab-ga
111
	-rsync -v -az -e ssh --delete cloudlab-manual/ $(INSTALL_CLAB)
Gary Wong's avatar
Gary Wong committed
112

113
install-phantomnet: phantomnet
Gary Wong's avatar
Gary Wong committed
114
	-rsync -v -az -e ssh --delete phantomnet-manual/ $(INSTALL_PNET)
Gary Wong's avatar
Gary Wong committed
115

116 117 118
install-powder: powder
	-rsync -v -az -e ssh --delete powder-manual/ $(INSTALL_POWDER)

119
install-emulab: emulab
Gary Wong's avatar
Gary Wong committed
120
	-rsync -v -az -e ssh --delete emulab-manual/ $(INSTALL_ELAB)