aboutsummaryrefslogtreecommitdiff
path: root/doc/Makefile
blob: af7e396a54762ec5b4cec4c000eb691dc20157ce (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
#==============================================================================#
#
# Centralized build system for "doc".  
#
# see for instructions: http://puredata.org/docs/developer/build
#  <hans@at.or.at>
#
#==============================================================================#

CWD := $(shell pwd)

# these are designed to be overridden by the packages/Makefile
cvs_root_dir = $(CWD)/..
prefix = build
BUILDLAYOUT_DIR = $(CWD)

# default target
all:
	@echo "this currently does nothing"

include $(BUILDLAYOUT_DIR)/Makefile.buildlayout

#==============================================================================#
#
# OVERARCHING BUILD TARGETS
#
#==============================================================================#

# clean up after everything is installed
final_setup:
	chmod -R ugo-w $(pddocdir)

install: externals-howto_install pd_fileformat_install pd-msg_install 
install: pddp_install tutorials_install
	@echo " "
	@echo "doc install succeeded!"

#==============================================================================#
#
# PROJECT-SPECIFIC TARGETS
#
#==============================================================================#

#------------------------------------------------------------------------------#
# EXTERNALS-HOWTO
EXTERNALS-HOWTO_NAME = Externals-HOWTO
externals-howto_install: $(manualsdir)
	install -d $(manualsdir)/$(EXTERNALS-HOWTO_NAME)
	curl http://iem.kug.ac.at/pd/externals-HOWTO/pd-externals-HOWTO.pdf > \
		$(manualsdir)/$(EXTERNALS-HOWTO_NAME)/pd-externals-HOWTO.pdf
	curl http://iem.kug.ac.at/pd/externals-HOWTO/node1.html > \
		$(manualsdir)/$(EXTERNALS-HOWTO_NAME)/node1.html
	curl http://iem.kug.ac.at/pd/externals-HOWTO/node2.html > \
		$(manualsdir)/$(EXTERNALS-HOWTO_NAME)/node2.html
	curl http://iem.kug.ac.at/pd/externals-HOWTO/node3.html > \
		$(manualsdir)/$(EXTERNALS-HOWTO_NAME)/node3.html
	curl http://iem.kug.ac.at/pd/externals-HOWTO/node4.html > \
		$(manualsdir)/$(EXTERNALS-HOWTO_NAME)/node.html
	curl http://iem.kug.ac.at/pd/externals-HOWTO/node5.html > \
		$(manualsdir)/$(EXTERNALS-HOWTO_NAME)/node5.html
	curl http://iem.kug.ac.at/pd/externals-HOWTO/node6.html > \
		$(manualsdir)/$(EXTERNALS-HOWTO_NAME)/node6.html
	curl http://iem.kug.ac.at/pd/externals-HOWTO/node7.html > \
		$(manualsdir)/$(EXTERNALS-HOWTO_NAME)/node7.html
	curl http://iem.kug.ac.at/pd/externals-HOWTO/node8.html > \
		$(manualsdir)/$(EXTERNALS-HOWTO_NAME)/node8.html
	curl http://iem.kug.ac.at/pd/externals-HOWTO/node9.html > \
		$(manualsdir)/$(EXTERNALS-HOWTO_NAME)/node9.html
	curl http://iem.kug.ac.at/pd/externals-HOWTO/node10.html > \
		$(manualsdir)/$(EXTERNALS-HOWTO_NAME)/node10.html


#------------------------------------------------------------------------------#
# PD-MSG
PD-MSG_NAME = pd-msg
pd-msg_install: $(manualsdir)
	install -d $(manualsdir)/$(PD-MSG_NAME)
	install -p $(doc_src)/additional/pd-msg/*.txt \
		$(manualsdir)/$(PD-MSG_NAME) 
	for dir in $(shell cd  $(doc_src)/additional/pd-msg && ls -d [1-5].*); do \
		echo "Including $$dir in $(PD-MSG_NAME)"; \
		install -d $(manualsdir)/$(PD-MSG_NAME)/$$dir; \
		install -p $(doc_src)/additional/pd-msg/$$dir/*.* \
			$(manualsdir)/$(PD-MSG_NAME)/$$dir; \
	done



#------------------------------------------------------------------------------#
# PD_FILEFORMAT
PD_FILEFORMAT_NAME = Pd
pd_fileformat_install: $(manualsdir)
	install -d $(manualsdir)/$(PD_FILEFORMAT_NAME)
	curl http://student-kmt.hku.nl/%7Etjeerd/pd/pd_fileformat.html > \
		$(manualsdir)/$(PD_FILEFORMAT_NAME)/Pd_File_Format.html


#------------------------------------------------------------------------------#
# PDDP
pddp_install: $(helpdir)
	install -p $(doc_src)/pddp/*.pd $(helpdir)
# this file is used in key-help.pd
	install -p $(doc_src)/pddp/keyboard_fun.txt $(helpdir)



#------------------------------------------------------------------------------#
# TUTORIALS
tutorials_install: $(manualsdir)
# pddrums
	install -d $(manualsdir)/PdDrums
	install -p $(doc_src)/tutorials/footils/pddrums/*.* $(manualsdir)/PdDrums
# playnow
	install -d $(manualsdir)/PlayNow
	install -p $(doc_src)/tutorials/playnow/*.pd $(manualsdir)/PlayNow
# these aren't needed yet <hans@at.or.at>
#	install -p $(doc_src)/tutorials/playnow/*.mid $(manualsdir)/PlayNow


#==============================================================================#
#
# DEVELOPER'S TARGETS
#
#==============================================================================#

# make the symlinks necessary to simulate the installed environment
devsymlinks:
	test -e $(doc_src)/2.control.examples || \
		ln -s $(pd_src)/doc/2.control.examples $(doc_src)/2.control.examples
	test -e $(doc_src)/3.audio.examples || \
		ln -s $(pd_src)/doc/3.audio.examples $(doc_src)/3.audio.examples
# pd <= 0.38-4 has 4.fft.examples
	test -e $(doc_src)/4.fft.examples || \
		ln -s $(pd_src)/doc/4.fft.examples $(doc_src)/4.fft.examples
# pd > 0.38-4 has 4.data.structures
	test -e $(doc_src)/4.data.structures || \
		ln -s $(pd_src)/doc/4.data.structures $(doc_src)/4.data.structures
	test -e $(doc_src)/7.stuff || \
		ln -s $(pd_src)/doc/7.stuff $(doc_src)/7.stuff
	test -e $(doc_src)/sound || \
		ln -s $(pd_src)/doc/sound $(doc_src)/sound
# put the pddp support objects in the path
	test -e $(doc_src)/pddp/pddp || \
		ln -s $(abstractions_src)/pddp $(doc_src)/pddp/pddp

#==============================================================================#
#
# CLEAN TARGETS
#
#==============================================================================#

# the destination-specific clean targets are in Makefile.buildlayout
clean: install_clean

distclean: clean cruft_clean