aboutsummaryrefslogtreecommitdiff
path: root/packages/patches/build_vars_4_makefile.in.patch
blob: a6903173b7e9f055cd1bb6edc9b95e11da0f96ce (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
Index: makefile.in
===================================================================
RCS file: /cvsroot/pure-data/pd/src/makefile.in,v
retrieving revision 1.5
diff -u -w -r1.5 makefile.in
--- makefile.in	6 Nov 2004 16:07:33 -0000	1.5
+++ makefile.in	28 Nov 2005 06:37:05 -0000
@@ -5,10 +5,20 @@
 EXT= @EXT@
 GUINAME= @GUINAME@
 
-INSTALL_PREFIX = @prefix@
-GFLAGS = -DINSTALL_PREFIX=\"$(INSTALL_PREFIX)\"
-
-MANDIR = @mandir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+bindir = @bindir@
+includedir = @includedir@
+libdir = @libdir@
+mandir = @mandir@
+
+GFLAGS = -DINSTALL_PREFIX=\"$(prefix)\"
+
+# varibles to match packages/Makefile.buildlayout so that they can be easily
+# overridden when building Pd-extended builds. <hans@at.or.at>
+libpddir = $(libdir)/pd
+pddocdir = $(libpddir)/doc
+libpdbindir = $(libpddir)/bin
 
 MORECFLAGS = @MORECFLAGS@
 
@@ -112,30 +122,39 @@
 	cd ../extra/lrshift~;make @EXTERNTARGET@
 	cd ../extra/pique;make @EXTERNTARGET@
 
-INSTDIR = $(DESTDIR)/$(INSTALL_PREFIX)
-MANINSTDIR = $(DESTDIR)/$(INSTALL_PREFIX)/$(MANDIR)
 BINARYMODE=@binarymode@
 
 install:  all
-	install -d $(INSTDIR)/lib/pd/bin
-	install $(BIN_DIR)/$(GUINAME) $(INSTDIR)/lib/pd/bin/$(GUINAME)
-	install $(BIN_DIR)/pd-watchdog $(INSTDIR)/lib/pd/bin/pd-watchdog
-	install -m644 $(BIN_DIR)/pd.tk $(INSTDIR)/lib/pd/bin/pd.tk
-	install -d $(INSTDIR)/bin
-	install $(BINARYMODE) $(PDEXEC) $(INSTDIR)/bin/pd
-	install -m755 $(BIN_DIR)/pdsend $(INSTDIR)/bin/pdsend
-	install -m755 $(BIN_DIR)/pdreceive $(INSTDIR)/bin/pdreceive 
-	cp -pr ../doc ../extra $(INSTDIR)/lib/pd/
-	rm -f $(INSTDIR)/extra/*/*.o
-	install -d $(INSTDIR)/include
-	install -m644 m_pd.h $(INSTDIR)/include/m_pd.h
-	install -d $(MANINSTDIR)/man1
-	gzip < ../man/pd.1 >  $(MANINSTDIR)/man1/pd.1.gz
-	chmod 644 $(MANINSTDIR)/man1/pd.1.gz
-	gzip < ../man/pdsend.1 >  $(MANINSTDIR)/man1/pdsend.1.gz
-	chmod 644 $(MANINSTDIR)/man1/pdsend.1.gz
-	gzip < ../man/pdreceive.1 >  $(MANINSTDIR)/man1/pdreceive.1.gz
-	chmod 644 $(MANINSTDIR)/man1/pdreceive.1.gz
+	install -d $(DESTDIR)$(libpdbindir)
+	install $(BIN_DIR)/$(GUINAME) $(DESTDIR)$(libpdbindir)/$(GUINAME)
+	install $(BIN_DIR)/pd-watchdog $(DESTDIR)$(libpdbindir)/pd-watchdog
+	install -m644 $(BIN_DIR)/pd.tk $(DESTDIR)$(libpdbindir)/pd.tk
+	install -d $(DESTDIR)$(bindir)
+	install $(BINARYMODE) $(PDEXEC) $(DESTDIR)$(bindir)/pd
+	install -m755 $(BIN_DIR)/pdsend $(DESTDIR)$(bindir)/pdsend
+	install -m755 $(BIN_DIR)/pdreceive $(DESTDIR)$(bindir)/pdreceive 
+	for dir in $(shell ls -1 ../doc | grep -v CVS); do \
+		echo "installing $$dir"; \
+		install -d $(DESTDIR)$(pddocdir)/$$dir ; \
+		install -p ../doc/$$dir/*.* $(DESTDIR)$(pddocdir)/$$dir ; \
+	done
+	for dir in $(shell ls -1 ../doc/7.stuff | grep -v CVS); do \
+		echo "installing 7.stuff/$$dir"; \
+		install -d $(DESTDIR)$(pddocdir)/7.stuff/$$dir ; \
+		install -p ../doc/7.stuff/$$dir/*.* $(DESTDIR)$(pddocdir)/7.stuff/$$dir ; \
+	done
+	cp -pr ../extra $(DESTDIR)$(libpddir)/
+	rm -f $(DESTDIR)$(libpddir)/extra/*/*.o
+	install -d $(DESTDIR)$(includedir)
+	install -m644 m_pd.h $(DESTDIR)$(includedir)/m_pd.h
+	install -d $(DESTDIR)$(mandir)/man1
+	gzip < ../man/pd.1 >  $(DESTDIR)$(mandir)/man1/pd.1.gz
+	chmod 644 $(DESTDIR)$(mandir)/man1/pd.1.gz
+	gzip < ../man/pdsend.1 >  $(DESTDIR)$(mandir)/man1/pdsend.1.gz
+	chmod 644 $(DESTDIR)$(mandir)/man1/pdsend.1.gz
+	gzip < ../man/pdreceive.1 >  $(DESTDIR)$(mandir)/man1/pdreceive.1.gz
+	chmod 644 $(DESTDIR)$(mandir)/man1/pdreceive.1.gz
+	@echo "Pd install succeeded."
 
 local-clean:
 	-rm -f ../obj/* $(BIN_DIR)/pd $(BIN_DIR)/$(GUINAME) $(BIN_DIR)/pdsend \
@@ -166,14 +185,14 @@
 	$(CC) $(INCLUDE) $(CFLAGS) -M $(SRC) > makefile.dependencies
 
 uninstall:
-	rm -f -r $(INSTDIR)/lib/pd
-	rm -f $(INSTDIR)/bin/pd
-	rm -f $(INSTDIR)/bin/pdsend
-	rm -f $(INSTDIR)/bin/pdreceive
-	rm -f $(INSTDIR)/include/m_pd.h
-	rm -f $(MANINSTDIR)/man1/pd.1.gz
-	rm -f $(MANINSTDIR)/man1/pdsend.1.gz
-	rm -f $(MANINSTDIR)/man1/pdreceive.1.gz
+	rm -f -r $(libpddir)
+	rm -f $(bindir)/pd
+	rm -f $(bindir)/pdsend
+	rm -f $(bindir)/pdreceive
+	rm -f $(includedir)/m_pd.h
+	rm -f $(mandir)/man1/pd.1.gz
+	rm -f $(mandir)/man1/pdsend.1.gz
+	rm -f $(mandir)/man1/pdreceive.1.gz
 
 include makefile.dependencies