1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-14 03:10:47 +00:00
freebsd-ports/chinese/jis2gb/files/patch-Makefile
2013-09-26 14:35:04 +00:00

52 lines
1.3 KiB
Plaintext

--- Makefile.orig 1995-10-05 16:21:32.000000000 +0800
+++ Makefile 2013-09-26 21:15:32.000000000 +0800
@@ -1,6 +1,11 @@
SHELL = /bin/sh
-CFLAGS = -O -DUNDEFCHAR=0xa1f5
+CC?= cc
+CFLAGS?= -O -pipe
+CFLAGS+= -DUNDEFCHAR=0xa1f5
+PREFIX?= /usr/local
+MANPREFIX?= ${PREFIX}
+MAN1PREFIX?= ${MANPREFIX}
TABLEC = JX0208GB2312.c JX0208GB8565.c JX0212GB2312.c JX0212GB8565.c \
MSSJISGB2312.c MSSJISJX0208.c MSSJISJX0212.c
@@ -13,19 +18,20 @@ TABLEO = JX0208GB2312.o JX0208GB8565.o J
./t2c $< $@
.c.o:
- cc $(CFLAGS) -c $<
+ $(CC) $(CFLAGS) -c $<
.t.o:
./t2c $< $*.c
- cc $(CFLAGS) -c $*.c
+ $(CC) $(CFLAGS) -c $*.c
jis2gb: $(TABLEO) jis2gb.o
- cc jis2gb.o $(TABLEO) -o jis2gb
- strip jis2gb
+ $(CC) jis2gb.o $(TABLEO) -o jis2gb
+# strip jis2gb
install: jis2gb jis2gb.1
- cp jis2gb /usr/local/bin/jis2gb
- cp jis2gb.1 /usr/local/man/man1/jis2gb.1
+ ${BSD_INSTALL_PROGRAM} jis2gb ${DESTDIR}${PREFIX}/bin/jis2gb
+ ${BSD_INSTALL_MAN} jis2gb.1 ${DESTDIR}${MAN1PREFIX}/man/man1/jis2gb.1
+ ${BSD_INSTALL_DATA} jis2gb.el ${DESTDIR}${PREFIX}/share/emacs/site-lisp/jis2gb.el
# nroff -man jis2gb.1 > /usr/local/catman/C/u_man/cat1/jis2gb.1
clean:
@@ -36,7 +42,7 @@ check: $(TABLEC)
-egrep '0x([2-9]|a[1-b]|f[0-9]|..[2-9])' JX0208GB8565.c JX0212GB8565.c
t2c: t2c.c
- cc $(CFLAGS) t2c.c -o t2c
+ $(CC) $(CFLAGS) t2c.c -o t2c
strip t2c
$(TABLEC): t2c