Index: Makefile
===================================================================
RCS file: /home/cvs/private/hrs/jadetex-ptex/Makefile,v
retrieving revision 1.1.1.1
retrieving revision 1.7
diff -d -u -I\$FreeBSD: ports/japanese/jadetex-ptex/files/patch-Makefile,v 1.3 2005/02/10 17:52:30 hrs Exp $ -I\$NetBSD:.*\$ -I\$OpenBSD:.*\$ -I\$DragonFly:.*\$ -I\$Id:.*\$ -I\$hrs:.*\$ -r1.1.1.1 -r1.7
--- Makefile	10 Jun 2003 15:24:06 -0000	1.1.1.1
+++ Makefile	30 Oct 2004 10:26:07 -0000	1.7
@@ -1,27 +1,71 @@
-default: basic
+# $hrs: jadetex-ptex/Makefile,v 1.7 2004/10/30 10:26:07 hrs Exp $
 
-basic: jadetex.ltx
-	tex jadetex.ins
+PREFIX?=	/usr/local
 
-jadetex.fmt: basic
-	tex -ini -progname=jadetex "&latex" jadetex.ini
+TEX?=		ptex
+TEX_BIN?=	${PREFIX}/bin/${TEX}
 
-pdfjadetex.fmt: basic
-	pdftex -ini -progname=pdfjadetex "&pdflatex" pdfjadetex.ini
+PDFTEX?=	pdftex
+PDFTEX_BIN?=	${PREFIX}/bin/${PDFTEX}
 
-install: jadetex.fmt pdfjadetex.fmt
-	(TT=$$DESTDIR/`kpsewhich -expand-var '$$TEXMFMAIN'`; \
-	mkdir -p $$TT/web2c; \
-	cp pdfjadetex.fmt $$TT/web2c; \
-	cp jadetex.fmt $$TT/web2c; \
-	mkdir -p $$TT/tex/jadetex ; \
-	cp dsssl.def jadetex.ltx $$TT/tex/jadetex)
+PROGNAME_JADETEX?=	jadetex-ptex
+PROGNAME_JADETEX_BIN?=	${PREFIX}/bin/${PROGNAME_JADETEX}
+
+PROGNAME_PDFJADETEX?=	pdfjadetex-ptex
+PROGNAME_PDFJADETEX?=	${PREFIX}/bin/${PROGNAME_PDFJADETEX}
+
+LATEX?=		platex
+PDFLATEX?=	pdflatex
+
+default: ${PROGNAME_JADETEX}.fmt
+all: default
+
+${PROGNAME_JADETEX}.ins: jadetex.ins
+	sed -e "s@[Jj][Aa][Dd][Ee][Tt][Ee][Xx]\.\([a-zA-Z]*\)@jadetex-ptex.\1@g;s@dsssl.def@dsssl-ptex.def@;s@\\[dsssl\\]@[dsssl-ptex]@" < $? > $@
+${PROGNAME_JADETEX}.dtx: jadetex.dtx
+	sed -e "s@[Jj][Aa][Dd][Ee][Tt][Ee][Xx]\.\([a-zA-Z]*\)@jadetex-ptex.\1@g;s@dsssl.def@dsssl-ptex.def@;s@\\[dsssl\\]@[dsssl-ptex]@" < $? > $@
+${PROGNAME_JADETEX}.ini: jadetex.ini
+	sed -e "s@[Jj][Aa][Dd][Ee][Tt][Ee][Xx]\.\([a-zA-Z]*\)@jadetex-ptex.\1@g;s@dsssl.def@dsssl-ptex.def@;s@\\[dsssl\\]@[dsssl-ptex]@" < $? > $@
+
+${PROGNAME_JADETEX}.ltx: ${PROGNAME_JADETEX}.ins ${PROGNAME_JADETEX}.dtx
+	${TEX_BIN} ${PROGNAME_JADETEX}.ins
+
+${PROGNAME_JADETEX}.fmt: ${PROGNAME_JADETEX}.ini ${PROGNAME_JADETEX}.ltx
+	${TEX_BIN} -ini -progname=${PROGNAME_JADETEX} "&${LATEX}" ${PROGNAME_JADETEX}.ini
+
+#${PROGNAME_PDFJADETEX}.fmt: ${PROGNAME_PDFJADETEX}.ini ${PROGNAME_PDFJADETEX}.ltx
+#	${PDFTEX_BIN} -ini -progname=${PROGNAME_PDFJADETEX} "&${PDFLATEX}" ${PROGNAME_PDFJADETEX}.ini
+
+TEXMFLOCAL_X!=	kpsewhich -expand-var '$$TEXMFLOCAL'
+TEXMFMAIN_X!=	kpsewhich -expand-var '$$TEXMFMAIN'
+TEXMFLOCAL?=	${TEXMFLOCAL_X}
+TEXMFMAIN?=	${TEXMFMAIN_X}
+WEB2CDIR?=	${TEXMFMAIN}/web2c/ptex
+JADETEXDIR?=	${TEXMFLOCAL}/ptex/jadetex
+
+install: ${PROGNAME_JADETEX}.ltx dsssl-ptex.def
+	${MAKE} ${.MAKEFLAGS} jadetex-install
+	mkdir -p ${JADETEXDIR}
+	cp ${PROGNAME_JADETEX}.ltx dsssl-ptex.def ${JADETEXDIR}
+
+jadetex-install: ${PROGNAME_JADETEX}.fmt
+	mkdir -p ${WEB2CDIR}
+	cp ${PROGNAME_JADETEX}.fmt ${WEB2CDIR}
+	ln -s -f ${TEX_BIN} ${PROGNAME_JADETEX_BIN}
+
+#pdfjadetex-install: ${PROGNAME_PDFJADETEX}.fmt
+#	mkdir -p ${WEB2CDIR}
+#	cp ${PROGNAME_PDFJADETEX}.fmt ${WEB2CDIR}
+#	ln -s -f ${PDFTEX_BIN} ${PROGNAME_PDFJADETEX_BIN}
 
 realclean: clean
-	-rm jadetex.fmt pdfjadetex.fmt dsssl.def jadetex.ltx
+	-rm -f ${PROGNAME_JADETEX}.fmt ${PROGNAME_PDFJADETEX}.fmt
+	-rm -f ${PROGNAME_JADETEX}.ltx ${PROGNAME_JADETEX}.dtx
+	-rm -f ${PROGNAME_JADETEX}.ini ${PROGNAME_JADETEX}.ins
+	-rm -f dsssl-ptex.def 
 
 clean:
-	-rm  *.log *.aux *.idx *.pdf *.toc *.dvi *.out
+	-rm -f *-ptex.* *.log *.aux *.idx *.pdf *.toc *.dvi *.out
 
 test:
 	openjade -t tex -d ../docbook/print/docbook.dsl test-tables.sgm
@@ -31,5 +75,4 @@
 	jadetex/index.* jadetex/doc/install.pdf \
 	jadetex/Makefile jadetex/ChangeLog jadetex/*ini)
 
-jadetex.ltx: jadetex.dtx
 


syntax highlighted by Code2HTML, v. 0.9.1