summaryrefslogtreecommitdiff
path: root/x11-libs/xpa/files/xpa-2.1.18-makefile.patch
blob: 1ceb29dbfcb24c3e44ffc872613670c78f566327 (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
--- a/Makefile.in
+++ b/Makefile.in
@@ -28,6 +28,11 @@
 
 prefix =		@prefix@
 exec_prefix =		@exec_prefix@
+bindir = 		@bindir@
+libdir = 		@libdir@
+datadir = 		@datadir@
+mandir = 		@mandir@
+includedir = 		@includedir@
 
 # The following definition can be set to non-null for special systems
 # like AFS with replication.  It allows the pathnames used for installation
@@ -37,19 +42,19 @@
 INSTALL_ROOT =
 
 # Directory in which to install the .a or .so binary for the XPA library:
-LIB_INSTALL_DIR =	$(INSTALL_ROOT)$(exec_prefix)/lib
+LIB_INSTALL_DIR =	$(INSTALL_ROOT)$(libdir)
 
 # Directory in which to install the program wish:
-BIN_INSTALL_DIR =	$(INSTALL_ROOT)$(exec_prefix)/bin
+BIN_INSTALL_DIR =	$(INSTALL_ROOT)$(bindir)
 
 # Directory in which to install the include file xpa.h:
-INCLUDE_INSTALL_DIR =	$(INSTALL_ROOT)$(prefix)/include
+INCLUDE_INSTALL_DIR =	$(INSTALL_ROOT)$(includedir)
 
 # Top-level directory for manual entries:
-MAN_INSTALL_DIR =	$(INSTALL_ROOT)$(prefix)/man
+MAN_INSTALL_DIR =	$(INSTALL_ROOT)$(mandir)
 
 # Top-level directory for share entries:
-MAN_SHARE_DIR =		$(INSTALL_ROOT)$(prefix)/share/xpa
+MAN_SHARE_DIR =		$(INSTALL_ROOT)$(datadir)/xpa
 
 # Platform-specific X compiler flags (include file specifications)
 X_CFLAGS = 		@X_CFLAGS@
@@ -173,12 +178,12 @@
 
 $(LIB):		$(LIBOBJS)
 		$(RM) $(LIB)
-		ar crv $(LIB) $(LIBOBJS)
+		$(AR) crv $(LIB) $(LIBOBJS)
 		$(RANLIB) $(LIB)
 
 shlib:		$(LIB)
-		@(rm -rf lib$(PACKAGE).tmp; mkdir lib$(PACKAGE).tmp; \
-		(cd lib$(PACKAGE).tmp && ar x ../lib$(PACKAGE).a); \
+		@(rm -rf lib$(PACKAGE).tmp; mkdir -p lib$(PACKAGE).tmp; \
+		(cd lib$(PACKAGE).tmp && $(AR) x ../lib$(PACKAGE).a); \
 		rm -f lib$(PACKAGE).tmp/xt*.o; \
 		rm -f lib$(PACKAGE).tmp/tcl*.o; \
 		CC='$(CC)' CXX=$(CXX) \
@@ -193,8 +198,8 @@
 		-lwsock32
 
 tclxpa:		$(LIB)
-		@(rm -rf libtclxpa.tmp; mkdir libtclxpa.tmp; \
-		(cd libtclxpa.tmp && ar x ../lib$(PACKAGE).a); \
+		@(rm -rf libtclxpa.tmp; mkdir -p libtclxpa.tmp; \
+		(cd libtclxpa.tmp && $(AR) x ../lib$(PACKAGE).a); \
 		rm -f libtclxpa.tmp/xt*.o; \
 		CC='$(CC)' CXX=$(CXX) \
 		./mklib -o tclxpa libtclxpa.tmp/*.o $(TCL_LIBS); \
@@ -275,7 +280,7 @@
 	    do \
 	    if [ ! -d $$i ] ; then \
 		echo "Making directory $$i"; \
-		mkdir $$i; \
+		mkdir -p $$i; \
 		chmod 755 $$i; \
 		else true; \
 		fi; \
@@ -297,7 +302,7 @@
 install-man:
 	@if [ ! -d $(MAN_INSTALL_DIR) ] ; then \
 	    echo "Making directory $(MAN_INSTALL_DIR)"; \
-	    mkdir $(MAN_INSTALL_DIR); \
+	    mkdir -p $(MAN_INSTALL_DIR); \
 	    chmod 755 $(MAN_INSTALL_DIR); \
 	    else true; \
 	fi;
@@ -308,7 +313,7 @@
 		M="$(MAN_INSTALL_DIR)/man$$E"; \
 		if [ ! -d $$M ] ; then \
 		    echo "Making directory $$M"; \
-		    mkdir $$M; \
+		    mkdir -p $$M; \
 		    chmod 755 $$M; \
 		    else true; \
 		fi; \
@@ -462,7 +467,7 @@
 
 dist:   	configure
 		($(RM) -r $(DISTDIR); \
-		mkdir $(DISTDIR); \
+		mkdir -p $(DISTDIR); \
 		cp -p *.[ch] *.tcl $(DISTDIR)/.; \
 		cp -p pkgIndex.tcl $(DISTDIR)/.; \
 		cp -p Makefile.in $(DISTDIR)/.; \
@@ -484,13 +489,13 @@
 		cp -p install-sh $(DISTDIR)/install-sh; \
 		chmod 755 $(DISTDIR)/install-sh; \
 		cp -p README INSTALL COPYING $(DISTDIR)/.; \
-		mkdir $(DISTDIR)/doc; \
+		mkdir -p $(DISTDIR)/doc; \
 		cp -p ./doc/*.html $(DISTDIR)/doc/.; \
 		cp -p ./doc/*.ps ./doc/*.pdf $(DISTDIR)/doc/.; \
 		cp -p ./doc/Makefile $(DISTDIR)/doc/.; \
-		mkdir $(DISTDIR)/doc/sman; \
+		mkdir -p $(DISTDIR)/doc/sman; \
 		cp -p ./doc/sman/* $(DISTDIR)/doc/sman/.; \
-		mkdir $(DISTDIR)/man; \
+		mkdir -p $(DISTDIR)/man; \
 		cp -p -R ./man/* $(DISTDIR)/man/.)
 
 release:	dist
--- a/mklib
+++ b/mklib
@@ -211,9 +211,9 @@
 	if [ "x$LINK" = "x" ] ; then
 	    # -linker was not specified so set default link command now
             if [ $CPLUSPLUS = 1 ] ; then
-                LINK=g++
+                LINK=${CXX}
             else
-                LINK=gcc
+                LINK=${CC}
             fi
 	fi
 
@@ -248,7 +248,7 @@
         elif [ $STATIC = 1 ] ; then
             LIBNAME="lib${LIBNAME}.a"     # prefix with "lib", suffix with ".a"
             echo "mklib: Making" $ARCH "static library: " ${LIBNAME}
-            LINK="ar"
+            LINK="${AR}"
             OPTS="-ru"
             if [ "${ALTOPTS}" ] ; then
                 OPTS=${ALTOPTS}