summaryrefslogtreecommitdiff
path: root/www/tidy/patches/patch-ac
blob: 19a4c5ad422a0e5c40ca597b696b2df2480c07af (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
$NetBSD: patch-ac,v 1.1 2003/10/28 12:34:58 cube Exp $

--- build/gmake/Makefile.orig	2003-04-12 08:57:03.000000000 +0200
+++ build/gmake/Makefile
@@ -58,8 +58,8 @@ SHELL=/bin/sh
 PROJECT=tidy
 
 # Installation variables.  Spaces OK, only dir create and file copy operations.
-runinst_prefix=/usr/local
-devinst_prefix=/usr/local
+runinst_prefix=${PREFIX}
+devinst_prefix=${PREFIX}
 
 bininst = ${runinst_prefix}/bin
 libinst = ${devinst_prefix}/lib
@@ -76,7 +76,7 @@ LIBDIR = ${TOPDIR}/lib
 BINDIR = ${TOPDIR}/bin
 
 # CFLAGS etc..
-CC= gcc
+#CC= gcc
 CFLAGS= -Wall -Wno-switch -Wno-parentheses -Wno-unused -I $(INCDIR)
 
 # OTHERCFLAGS= -DSUPPORT_ACCESSIBILITY_CHECKS=1 -DSUPPORT_UTF16_ENCODINGS=1 -DSUPPORT_ASIAN_ENCODINGS=1
@@ -107,7 +107,7 @@ LIBPREFIX = lib
 LIBSUFFIX = .a
 
 LIBRARY = $(LIBDIR)/$(LIBPREFIX)$(PROJECT)$(LIBSUFFIX)
-AR=ar -r
+#AR=ar -r
 
 EXES = $(BINDIR)/$(PROJECT) $(BINDIR)/tab2space
 
@@ -148,7 +148,7 @@ all:    $(LIBRARY) $(EXES)
 
 $(LIBRARY): $(OBJFILES)
 	if [ ! -d $(LIBDIR) ]; then mkdir $(LIBDIR); fi
-	$(AR) $@ $(OBJFILES)
+	$(AR) -r $@ $(OBJFILES)
 ifdef RANLIB
 	$(RANLIB) $@ 
 endif
@@ -177,21 +177,21 @@ clean:
 	if [ "$(BINDIR)" != "$(TOPDIR)" -a -d $(BINDIR) ]; then rmdir $(BINDIR); fi
 
 installhdrs: $(HFILES)
-	if [ ! -d "$(incinst)" ]; then mkdir -p "$(incinst)"; fi
-	cp -f $(HFILES) "$(incinst)/"
+	if [ ! -d "$(incinst)" ]; then $(BSD_INSTALL_DATA_DIR) "$(incinst)"; fi
+	$(BSD_INSTALL_DATA) $(HFILES) "$(incinst)/"
 
 installib: $(LIBRARY)
-	if [ ! -d "$(libinst)" ]; then mkdir -p "$(libinst)"; fi
-	cp -f $(LIBRARY) "$(libinst)/"
+	if [ ! -d "$(libinst)" ]; then $(BSD_INSTALL_DATA_DIR) "$(libinst)"; fi
+	$(BSD_INSTALL_DATA) $(LIBRARY) "$(libinst)/"
 
 installexes: $(EXES)
-	if [ ! -d "$(bininst)" ]; then mkdir -p "$(bininst)"; fi
-	cp -f $(EXES) "$(bininst)/"
+	if [ ! -d "$(bininst)" ]; then $(BSD_INSTALL_PROGRAM_DIR) "$(bininst)"; fi
+	$(BSD_INSTALL_PROGRAM) $(EXES) "$(bininst)/"
 
 installmanpage:
 	if [ -f "$(TOPDIR)/htmldoc/man_page.txt" ] ; then \
-    	if [ ! -d "$(maninst)/man1" ]; then mkdir -p "$(maninst)/man1"; fi; \
-    	cp -f $(TOPDIR)/htmldoc/man_page.txt "$(maninst)/man1/tidy.1"; \
+    	if [ ! -d "$(maninst)/man1" ]; then $(BSD_INSTALL_MAN_DIR) "$(maninst)/man1"; fi; \
+    	$(BSD_INSTALL_MAN) $(TOPDIR)/htmldoc/man_page.txt "$(maninst)/man1/tidy.1"; \
 	fi
    
 install: installhdrs installib installmanpage installexes