[BACK]Return to patch-aa CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / converters / cn2jp / patches

File: [cvs.NetBSD.org] / pkgsrc / converters / cn2jp / patches / patch-aa (download)

Revision 1.2, Fri Jan 29 16:43:34 2010 UTC (11 years, 10 months ago) by joerg
Branch: MAIN
CVS Tags: pkgsrc-2021Q3-base, pkgsrc-2021Q3, pkgsrc-2021Q2-base, pkgsrc-2021Q2, pkgsrc-2021Q1-base, pkgsrc-2021Q1, pkgsrc-2020Q4-base, pkgsrc-2020Q4, pkgsrc-2020Q3-base, pkgsrc-2020Q3, pkgsrc-2020Q2-base, pkgsrc-2020Q2, pkgsrc-2020Q1-base, pkgsrc-2020Q1, pkgsrc-2019Q4-base, pkgsrc-2019Q4, pkgsrc-2019Q3-base, pkgsrc-2019Q3, pkgsrc-2019Q2-base, pkgsrc-2019Q2, pkgsrc-2019Q1-base, pkgsrc-2019Q1, pkgsrc-2018Q4-base, pkgsrc-2018Q4, pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1, pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3, pkgsrc-2017Q2-base, pkgsrc-2017Q2, pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-2016Q2-base, pkgsrc-2016Q2, pkgsrc-2016Q1-base, pkgsrc-2016Q1, pkgsrc-2015Q4-base, pkgsrc-2015Q4, pkgsrc-2015Q3-base, pkgsrc-2015Q3, pkgsrc-2015Q2-base, pkgsrc-2015Q2, pkgsrc-2015Q1-base, pkgsrc-2015Q1, pkgsrc-2014Q4-base, pkgsrc-2014Q4, pkgsrc-2014Q3-base, pkgsrc-2014Q3, pkgsrc-2014Q2-base, pkgsrc-2014Q2, pkgsrc-2014Q1-base, pkgsrc-2014Q1, pkgsrc-2013Q4-base, pkgsrc-2013Q4, pkgsrc-2013Q3-base, pkgsrc-2013Q3, pkgsrc-2013Q2-base, pkgsrc-2013Q2, pkgsrc-2013Q1-base, pkgsrc-2013Q1, pkgsrc-2012Q4-base, pkgsrc-2012Q4, pkgsrc-2012Q3-base, pkgsrc-2012Q3, pkgsrc-2012Q2-base, pkgsrc-2012Q2, pkgsrc-2012Q1-base, pkgsrc-2012Q1, pkgsrc-2011Q4-base, pkgsrc-2011Q4, pkgsrc-2011Q3-base, pkgsrc-2011Q3, pkgsrc-2011Q2-base, pkgsrc-2011Q2, pkgsrc-2011Q1-base, pkgsrc-2011Q1, pkgsrc-2010Q4-base, pkgsrc-2010Q4, pkgsrc-2010Q3-base, pkgsrc-2010Q3, pkgsrc-2010Q2-base, pkgsrc-2010Q2, pkgsrc-2010Q1-base, pkgsrc-2010Q1, HEAD
Changes since 1.1: +3 -3 lines

DESTDIR support

$NetBSD: patch-aa,v 1.2 2010/01/29 16:43:34 joerg Exp $

--- Makefile.orig	Tue Feb 27 22:35:44 1996
+++ Makefile
@@ -1,7 +1,5 @@
-INCLUDE=
 
-CC=cc
-CFLAGS= -g -I../lib -I. -L../lib -L.
+CFLAGS+= -I./lib
 
 SRC = README Makefile */*.c */*.h */*.tbl */Makefile */README
 OBJS = big2jis/b2j-util.o big2jis/b2j_table.o \
@@ -12,37 +10,43 @@
 	jis2gb/j2g-util.o jis2gb/j2g_table.o \
 	lib/lang-util.o lib/cn-util.o \
 	lib/py-tbl.o lib/uzpj-tbl.o lib/uzpj-util.o \
-	hz2gb.o gb2hz.o SINO.o jp-util2.o
+	lib/hz2gb.o lib/gb2hz.o lib/SINO.o lib/jp-util.o
 
-all: makeall libcn2jp.a
+PROG = big2jis/b2j jis2big/j2b \
+	big2gb/b2g gb2big/g2b \
+	gb2jis/g2j jis2gb/j2g
+
+LIB = libcn2jp.a
+
+install:
+	$(LIBTOOL) --mode=install $(BSD_INSTALL_DATA) $(LIB:.a=.la) ${DESTDIR}$(PREFIX)/lib
+	for i in $(PROG);do \
+		$(LIBTOOL) --mode=install $(BSD_INSTALL_PROGRAM) $$i ${DESTDIR}$(PREFIX)/bin; \
+	done
+
+all: clean mktable $(LIB) makeall
+
+mktable:
+	cd table;make
+	ln -s table/mktable mktable
+	ln -s table/mktbl2c mktbl2c
+	cd big2jis;../mktable big2jis.tbl;../mktbl2c big2jis.t b2j > b2j_table.c
+	cd jis2big;../mktable jis2big.tbl;../mktbl2c jis2big.t j2b > j2b_table.c
+	cd big2gb;../mktable big2gb.tbl;../mktbl2c big2gb.t b2g > b2g_table.c
+	cd gb2big;../mktable gb2big.tbl;../mktbl2c gb2big.t g2b > g2b_table.c
+	cd gb2jis;../mktable gb2jis.tbl;../mktbl2c gb2jis.t g2j > g2j_table.c
+	cd jis2gb;../mktable jis2gb.tbl;../mktbl2c jis2gb.t j2g > j2g_table.c
+
+makeall: big2jis/b2j.o jis2big/j2b.o big2gb/b2g.o gb2big/g2b.o gb2jis/g2j.o jis2gb/j2g.o
+	for i in $(PROG);do \
+		$(LIBTOOL) --mode=link $(CC) -o $$i $$i.lo $(LIB:.a=.la); \
+	done
 
+$(LIB): $(OBJS)
+	$(LIBTOOL) --mode=link $(CC) -o $(LIB:.a=.la) $(OBJS:.o=.lo) -rpath $(PREFIX)/lib
 
-makeall:
-	cd lib; make; cd ..
-	cd big2jis; make; cd ..
-	cd jis2big; make; cd ..
-	cd big2gb; make; cd ..
-	cd gb2big; make; cd ..
-	cd gb2jis; make; cd ..
-	cd jis2gb; make; cd ..
-
-libcn2jp.a:  $(OBJS)
-	rm -f libcn2jp.a
-	ar r libcn2jp.a $(OBJS)
-	ranlib libcn2jp.a
-	cp libcn2jp.a ../../../lib/libcn2jp.a
-
-gb2hz.o: lib/gb2hz.c
-	$(CC) -c lib/gb2hz.c
-
-hz2gb.o: lib/hz2gb.c
-	$(CC) -c lib/hz2gb.c
-
-SINO.o: lib/SINO.c
-	$(CC) -c lib/SINO.c
-
-jp-util2.o: lib/jp-util2.c
-	$(CC) -c lib/jp-util2.c
+%.o: %.c
+	$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c -o $@ $<
 
 tar:
 	echo "Produce cn2jp`date '+%m%d'`.tar..."