Pullup ticket #3480 - requested by obache
[pkgsrcv2.git] / devel / rx / patches / patch-ab
1 $NetBSD: patch-ab,v 1.3 2008/04/04 15:24:56 joerg Exp $
2
3 --- rx/Makefile.in.orig Fri Nov 22 13:47:49 1996
4 +++ rx/Makefile.in
5 @@ -59,24 +59,23 @@
6         $(CC) $(ALL_CFLAGS) -DSCM_MAGIC_SNARFER -E $< | grep "^%%%" | sed -e "s/^%%%//" > $@ ; \
7  
8  .c.o:
9 -       $(CC) -c $(ALL_CFLAGS) $(DEFS) -I$(srcdir) $<
10 +       $(LIBTOOL) --mode=compile $(CC) -c $(ALL_CFLAGS) $(DEFS) -I$(srcdir) $<
11  
12 -all: librx.a
13 +all: librx.la
14  
15  install: all
16 -       test -d $(libdir) || mkdir $(libdir)
17 -       test -d $(includedir) || mkdir $(includedir)
18 +       ${BSD_INSTALL_DATA_DIR} ${DESTDIR}$(libdir)
19 +       ${BSD_INSTALL_DATA_DIR} ${DESTDIR}$(includedir)
20 -       $(INSTALL) librx.a $(libdir)/librx.a
21 -       $(RANLIB) $(libdir)/librx.a
22 -       $(INSTALL) $(srcdir)/inst-rxposix.h $(includedir)/rxposix.h
23 +       $(LIBTOOL) --mode=install $(BSD_INSTALL_LIB) librx.la ${DESTDIR}$(libdir)
24 +       $(BSD_INSTALL_DATA) $(srcdir)/inst-rxposix.h ${DESTDIR}$(includedir)/rxposix.h
25  
26  
27  uninstall:
28 -       -rm -f $(libdir)/librx.a
29 +       -$(LIBTOOL) rm -f $(libdir)/librx.la
30         -rm -f $(includedir)/rxposix.h
31  
32  clean:
33 -       -rm -f $(libobjs) librx.a  $(opt_objs) 
34 +       -$(LIBTOOL) rm -f $(libobjs) librx.a  $(opt_objs) 
35  
36  distclean: clean
37         -rm Makefile config.status config.log rgx.x
38 @@ -111,10 +110,9 @@
39         rm -rf `cat .fname` .fname
40  
41  
42 -librx.a: $(libobjs) $(opt_objs)
43 -       rm -f librx.a
44 -       $(AR) $(AR_FLAGS) librx.a $(libobjs) $(opt_objs)
45 -       $(RANLIB) librx.a
46 +librx.la: $(libobjs) $(opt_objs)
47 +       $(LIBTOOL) --mode=link $(CC) -o $@ $(libobjs:.o=.lo) $(opt_objs:.o=.lo) \
48 +               -rpath $(libdir) -version-info $(RX_MAJOR):$(RX_MINOR)
49  
50  
51  depends: