summaryrefslogtreecommitdiff
path: root/pcr/cc65/patch-2.13.3.diff
blob: 3e35a2a46dbaeba7a8aad3e6904506732066f6f4 (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
diff -ur cc65-2.13.2-orig//make/gcc.mak cc65-2.13.2-new//make/gcc.mak
--- cc65-2.13.2-orig//make/gcc.mak	2010-04-06 21:05:59.659188896 +0200
+++ cc65-2.13.2-new//make/gcc.mak	2010-04-06 21:26:31.323885004 +0200
@@ -15,7 +15,8 @@
 # (That trick has been disabled.)
 
 # The install prefix and directories
-prefix		= /usr/local
+D=$(DEST_DIR)
+prefix		= /usr
 exec_prefix	= $(prefix)
 
 bindir		= $(exec_prefix)/bin
@@ -34,7 +35,7 @@
 
 # Programs
 
-MKDIR		= mkdir -m 755
+MKDIR		= mkdir -m 755 -p
 
 # BSD-like install-script/-program
 INSTALL		= make/install-sh
@@ -119,76 +120,76 @@
 	  fi 2>/dev/null
 
 .PHONY:	install-dirs
-install-dirs:	$(bindir) $(datadir) $(docdir) $(libdir) \
-		$(CC65_DOC) $(CC65_HOME) \
-		$(CA65_INC) $(CC65_INC) \
-		$(CC65_INC)/em $(CC65_INC)/geos $(CC65_INC)/joystick \
-		$(CC65_INC)/mouse $(CC65_INC)/sys $(CC65_INC)/tgi \
-		$(LD65_CFG) $(LD65_LIB) $(LD65_OBJ) \
-		$(CC65_HOME)/emd $(CC65_HOME)/joy $(CC65_HOME)/mou \
-		$(CC65_HOME)/ser $(CC65_HOME)/tgi
-
-$(bindir) $(datadir) $(docdir) $(libdir) \
-$(CC65_DOC) $(CC65_HOME) \
-$(CA65_INC) $(CC65_INC) \
-$(LD65_CFG) $(LD65_LIB) $(LD65_OBJ):
+install-dirs:	$(D)/$(bindir) $(D)/$(datadir) $(D)/$(docdir) $(D)/$(libdir) \
+		$(D)/$(CC65_DOC) $(D)/$(CC65_HOME) \
+		$(D)/$(CA65_INC) $(D)/$(CC65_INC) \
+		$(D)/$(CC65_INC)/em $(D)/$(CC65_INC)/geos $(D)/$(CC65_INC)/joystick \
+		$(D)/$(CC65_INC)/mouse $(D)/$(CC65_INC)/sys $(D)/$(CC65_INC)/tgi \
+		$(D)/$(LD65_CFG) $(D)/$(LD65_LIB) $(D)/$(LD65_OBJ) \
+		$(D)/$(CC65_HOME)/emd $(D)/$(CC65_HOME)/joy $(D)/$(CC65_HOME)/mou \
+		$(D)/$(CC65_HOME)/ser $(D)/$(CC65_HOME)/tgi
+
+$(D)/$(bindir) $(D)/$(datadir) $(D)/$(docdir) $(D)/$(libdir) \
+$(D)/$(CC65_DOC) $(D)/$(CC65_HOME) \
+$(D)/$(CA65_INC) $(D)/$(CC65_INC) \
+$(D)/$(LD65_CFG) $(D)/$(LD65_LIB) $(D)/$(LD65_OBJ):
 	$(MKDIR) $@
 
-$(CC65_HOME)/% $(CC65_INC)/% $(CC65_DOC)/%:
+$(D)/$(CC65_HOME)/% $(D)/$(CC65_INC)/% $(D)/$(CC65_DOC)/%:
 	$(MKDIR) $@
 
 install-bins:
 	for f in ar65 ca65 cc65 cl65 co65 da65 ld65 od65 grc; \
-	  do $(INSTALL_STRIP) src/$$f/$$f${EXT} $(bindir) || exit $$?; \
+	  do $(INSTALL_STRIP) src/$$f/$$f${EXT} $(D)/$(bindir) || exit $$?; \
 	  done
-	$(INSTALL_PROG) src/ca65html/ca65html $(bindir)
+	$(INSTALL_PROG) src/ca65html/ca65html $(D)/$(bindir)
 
 install-libs:
 	for f in asminc/*.inc; \
-	  do $(INSTALL_DATA) $$f $(CA65_INC) || exit $$?; \
+	  do $(INSTALL_DATA) $$f $(D)/$(CA65_INC) || exit $$?; \
 	  done
 	for f in include/*.h; \
-	  do $(INSTALL_DATA) $$f $(CC65_INC) || exit $$?; \
+	  do $(INSTALL_DATA) $$f $(D)/$(CC65_INC) || exit $$?; \
 	  done
 	for d in em geos joystick mouse sys tgi; \
 	  do for f in include/$$d/*.h; \
-	    do $(INSTALL_DATA) $$f $(CC65_INC)/$$d || exit $$?; \
+	    do $(INSTALL_DATA) $$f $(D)/$(CC65_INC)/$$d || exit $$?; \
 	    done || exit $$?; \
 	  done
 	for f in libsrc/*.lib; \
-	  do $(INSTALL_DATA) $$f $(LD65_LIB) || exit $$?; \
+	  do $(INSTALL_DATA) $$f $(D)/$(LD65_LIB) || exit $$?; \
 	  done
 	for f in libsrc/*-*.o; \
-	  do $(INSTALL_DATA) $$f $(LD65_OBJ) || exit $$?; \
+	  do $(INSTALL_DATA) $$f $(D)/$(LD65_OBJ) || exit $$?; \
 	  done
 	for d in emd joy mou ser tgi; \
 	  do for f in libsrc/*.$$d; \
-	    do $(INSTALL_DATA) $$f $(CC65_HOME)/$$d || exit $$?; \
+	    do $(INSTALL_DATA) $$f $(D)/$(CC65_HOME)/$$d || exit $$?; \
 	    done || exit $$?; \
 	  done
 	for f in src/ld65/cfg/*-*.cfg; \
-	  do $(INSTALL_DATA) $$f $(LD65_CFG) || exit $$?; \
+	  do $(INSTALL_DATA) $$f $(D)/$(LD65_CFG) || exit $$?; \
 	  done
 
 install-docs:
 	for f in src/ca65/macpack/*.mac; \
-	  do $(INSTALL_DATA) $$f $(CC65_DOC) || exit $$?; \
+	  do $(INSTALL_DATA) $$f $(D)/$(CC65_DOC) || exit $$?; \
 	  done
 	for f in readme.1st compile.txt CREDITS BUGS internal.txt newvers.txt; \
-	  do $(INSTALL_DATA) doc/$$f $(CC65_DOC) || exit $$?; \
+	  do $(INSTALL_DATA) doc/$$f $(D)/$(CC65_DOC) || exit $$?; \
 	  done
 	if [ -f doc/index.htm* ]; \
 	  then for f in doc/*.htm*; \
-	    do $(INSTALL_DATA) $$f $(CC65_DOC) || exit $$?; \
+	    do $(INSTALL_DATA) $$f $(D)/$(CC65_DOC) || exit $$?; \
 	    done; \
 	  fi
 
-install-samps:	${addprefix $(CC65_DOC)/, $(shell find samples -type d)}
+install-samps:	${addprefix $(D)/$(CC65_DOC)/, $(shell find samples -type d)}
 	@$(MAKE) -C samples zap
 	for d in `find samples -type d`; \
 	  do for f in $$d/*; \
 	    do if [ -f $$f ]; \
-	      then $(INSTALL_DATA) $$f $(CC65_DOC)/$$d || exit $$?; \
+	      then $(INSTALL_DATA) $$f $(D)/$(CC65_DOC)/$$d || exit $$?; \
 	      fi; \
 	    done || exit $$?; \
 	  done