summaryrefslogtreecommitdiff
path: root/textproc/mxml/patches/patch-aa
blob: 2121da09380fd8834761a75247f177c4e661e739 (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
$NetBSD: patch-aa,v 1.1.1.1 2007/10/12 17:30:04 drochner Exp $

--- Makefile.in.orig	2007-04-27 02:49:03.000000000 +0200
+++ Makefile.in
@@ -29,7 +29,7 @@ DSO		=	@DSO@
 DSOFLAGS	=	@DSOFLAGS@
 LDFLAGS		=	$(OPTIM) @LDFLAGS@
 INSTALL		=	@INSTALL@
-LIBMXML		=	@LIBMXML@
+LIBMXML		=	libmxml.la
 LN		=	@LN@ -s
 MKDIR		=	@MKDIR@
 OPTIM		=	@OPTIM@
@@ -119,7 +119,7 @@ distclean:	clean
 # Install everything...
 #
 
-install:	$(TARGETS) install-$(LIBMXML) install-libmxml.a
+install:	$(TARGETS) install-$(LIBMXML)
 	$(INSTALL_DIR) $(BUILDROOT)$(bindir)
 	$(INSTALL_BIN) mxmldoc $(BUILDROOT)$(bindir) 
 	$(INSTALL_DIR) $(BUILDROOT)$(docdir)
@@ -135,10 +135,9 @@ install:	$(TARGETS) install-$(LIBMXML) i
 	$(INSTALL_DIR) $(BUILDROOT)$(mandir)/man3
 	$(INSTALL_MAN) doc/mxml.man $(BUILDROOT)$(mandir)/man3/mxml.3
 
-install-libmxml.a:
+install-libmxml.la:
 	$(INSTALL_DIR) $(BUILDROOT)$(libdir)
-	$(INSTALL_LIB) libmxml.a $(BUILDROOT)$(libdir)
-	$(RANLIB) $(BUILDROOT)$(libdir)/libmxml.a
+	$(INSTALL_LIB) libmxml.la $(BUILDROOT)$(libdir)
 
 install-libmxml.so.1.3:
 	$(INSTALL_DIR) $(BUILDROOT)$(libdir)
@@ -228,10 +227,13 @@ config.h:	configure config.h.in
 # libmxml.a
 #
 
-libmxml.a:	$(LIBOBJS)
-	$(RM) $@
-	$(AR) $(ARFLAGS) $@ $(LIBOBJS)
-	$(RANLIB) $@
+libmxml.la:	$(LIBOBJS:.o=.lo)
+	${LIBTOOL} --mode=link ${CC} ${LDFLAGS} ${LIBOBJS:.o=.lo} \
+	  -o libmxml.la -rpath ${PREFIX}/lib -version-info 1:3
+
+.SUFFIXES: .lo
+.c.lo:
+	${LIBTOOL} --mode=compile ${CC} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
 
 $(LIBOBJS):	mxml.h
 
@@ -276,7 +278,7 @@ libmxml.1.dylib:	$(LIBOBJS)
 #
 
 mxmldoc:	$(LIBMXML) mxmldoc.o
-	$(CC) -L. $(LDFLAGS) -o $@ mxmldoc.o -lmxml
+	${LIBTOOL} --mode=link $(CC) -L. $(LDFLAGS) -o $@ mxmldoc.o libmxml.la
 
 mxmldoc-static:	libmxml.a mxmldoc.o
 	$(CC) $(LDFLAGS) -o $@ mxmldoc.o libmxml.a
@@ -288,8 +290,8 @@ mxmldoc.o:	mxml.h
 # testmxml
 #
 
-testmxml:	libmxml.a testmxml.o
-	$(CC) $(LDFLAGS) -o $@ testmxml.o libmxml.a
+testmxml:	libmxml.la testmxml.o
+	${LIBTOOL} --mode=link $(CC) $(LDFLAGS) -o $@ testmxml.o libmxml.la
 	@echo Testing library...
 	./testmxml test.xml >temp1.xml 2>temp1s.xml
 	./testmxml temp1.xml >temp2.xml 2>temp2s.xml
@@ -319,9 +321,9 @@ testmxml.o:	mxml.h
 # mxml.xml
 #
 
-mxml.xml:	mxmldoc-static mxml.h $(PUBLIBOBJS:.o=.c)
+mxml.xml:	mxmldoc mxml.h $(PUBLIBOBJS:.o=.c)
 	$(RM) mxml.xml
-	./mxmldoc-static mxml.xml mxml.h $(PUBLIBOBJS:.o=.c) >doc/reference.html
+	./mxmldoc mxml.xml mxml.h $(PUBLIBOBJS:.o=.c) >doc/reference.html
 
 valgrind:	mxmldoc-static
 	$(RM) valgrind.xml
@@ -334,9 +336,9 @@ valgrind:	mxmldoc-static
 # doc/mxml.man
 #
 
-doc/mxml.man: mxmldoc-static mxml.xml
+doc/mxml.man: mxmldoc mxml.xml
 	$(RM) doc/mxml.man
-	./mxmldoc-static --man mxml --title "Mini-XML API" \
+	./mxmldoc --man mxml --title "Mini-XML API" \
 		--intro doc/intro.man mxml.xml >doc/mxml.man