summaryrefslogtreecommitdiff
path: root/www/tidy/patches/patch-ac
blob: fbc02281ff2c45f643711ef47a964cd17874e5d5 (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
$NetBSD: patch-ac,v 1.5 2006/09/16 15:29:36 hira Exp $

--- build/gmake/Makefile.orig	2005-07-14 23:58:10.000000000 -0700
+++ build/gmake/Makefile	2006-04-07 23:06:38.000000000 -0700
@@ -58,13 +58,13 @@
 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
 incinst = ${devinst_prefix}/include/$(PROJECT)
-maninst = ${devinst_prefix}/man
+maninst = ${devinst_prefix}/${PKGMANDIR}
 
 # Internal variables. - No spaces allowed: libtool chokes on spaces in directory names.
 TOPDIR = ../..
@@ -79,14 +79,14 @@
 # CFLAGS etc..
 # For optimised builds, flags such as "-O2" should be added and -D_DEBUG=1
 # disabled.
-CC= gcc
-CFLAGS= -g -Wall -Wno-switch -Wno-parentheses -I $(INCDIR)
+#CC= gcc
+CFLAGS+= -g -Wall -Wno-switch -Wno-parentheses -I $(INCDIR)
 # flags only supported with gcc 3.x
 # CFLAGS += -Wunused-parameter
 
 OTHERCFLAGS=
 OTHERCFLAGS+= -D_DEBUG=1
-# OTHERCFLAGS+= -DSUPPORT_ACCESSIBILITY_CHECKS=1 -DSUPPORT_UTF16_ENCODINGS=1 -DSUPPORT_ASIAN_ENCODINGS=1
+OTHERCFLAGS+= -DSUPPORT_ACCESSIBILITY_CHECKS=1 -DSUPPORT_UTF16_ENCODINGS=1 -DSUPPORT_ASIAN_ENCODINGS=1
 ifdef SUPPORT_UTF16_ENCODINGS
 CFLAGS += -DSUPPORT_UTF16_ENCODINGS=$(SUPPORT_UTF16_ENCODINGS)
 endif
@@ -115,7 +115,7 @@
 OBJSUF = .o
 
 LIBRARY = $(LIBDIR)/$(LIBPREFIX)$(PROJECT)$(LIBSUFFIX)
-AR=ar -r
+#AR=ar -r
 
 XSLTPROC = xsltproc
 
@@ -164,7 +164,7 @@
 
 $(LIBRARY): $(OBJFILES)
 	if [ ! -d $(LIBDIR) ]; then mkdir $(LIBDIR); fi
-	$(AR) $@ $(OBJFILES)
+	$(AR) -r $@ $(OBJFILES)
 ifdef RANLIB
 	$(RANLIB) $@
 endif
@@ -175,7 +175,7 @@
 
 $(BINDIR)/$(PROJECT):	$(APPDIR)/tidy.c $(HFILES) $(LIBRARY)
 	if [ ! -d $(BINDIR) ]; then mkdir $(BINDIR); fi
-	$(CC) $(CFLAGS) $(OTHERCFLAGS) -o $@ $(APPDIR)/tidy.c -I$(INCDIR) -L$(LIBDIR) -l$(PROJECT)
+	$(CC) $(CFLAGS) $(OTHERCFLAGS) -o $@ $(APPDIR)/tidy.c -I$(INCDIR) $(LIBRARY)
 
 $(BINDIR)/tab2space: $(APPDIR)/tab2space.c
 	if [ ! -d $(BINDIR) ]; then mkdir $(BINDIR); fi
@@ -205,19 +205,19 @@
 	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: $(DOCDIR)/tidy.1
-	if [ ! -d "$(maninst)/man1" ]; then mkdir -p "$(maninst)/man1"; fi;
-	cp -f $(DOCDIR)/tidy.1 "$(maninst)/man1/tidy.1";
+	if [ ! -d "$(maninst)/man1" ]; then $(BSD_INSTALL_MAN_DIR) "$(maninst)/man1"; fi;
+	$(BSD_INSTALL_MAN) $(DOCDIR)/tidy.1 "$(maninst)/man1/tidy.1";
 
 install: installhdrs installib installmanpage installexes