ルギア君の戯言

雑多な記事。

ASCII の mendex も pTeX もビルドできない

Fedora 13 はまだ pTeX 系列は導入されていない。

mendexk

(texlive は texlive-20091107-source.tar.xz のもの)
texlive をビルドしたあと texk の中に展開した mendexk をこの通りにビルドしたんだが

[lugia@arpa-castle mendexk]$ ./configure EUC
config.status: creating Makefile
[lugia@arpa-castle mendexk]$ make
Makefile:6: *** 分離記号を欠いています.  中止.

こうなってしまう。

[lugia@arpa-castle mendexk]$ head -n6 Makefile
# Makefile for mendex
PROGRAM = mendex

KANJI = EUC

ac_include ../make/paths.mk

まあ、そりゃあ、そうね。ac_include って何者なんでしょう。


というわけでこれを潰しても

[lugia@arpa-castle mendexk]$ sed -ie "s:ac_include.*::g" Makefile
[lugia@arpa-castle mendexk]$ make
cc @CFLAGS@ -DKPATHSEA -DKPATHSEA3 -DEUC   -c -o main.o main.c
cc: @CFLAGS@: そのようなファイルやディレクトリはありません
make: *** [main.o] エラー 1

と言われる。


そしてさらにこれも潰せばできることはできるのだが・・・なんかうまく動きそうな雰囲気がないのよね〜。

pTeX

pTeX も症状は同じ。

[lugia@arpa-castle mendexk]$ cd ..
[lugia@arpa-castle texk]$ cd web2c
[lugia@arpa-castle web2c]$ cd ptexdir
[lugia@arpa-castle ptexdir]$ ./configure EUC
creating kanji.h
config.status: creating Makefile
config.status: error: cannot find input file: ...in

エラーにはなるが Makefile はできる。終了ステータスもエラーじゃないし。というか無視されてる。

[lugia@arpa-castle ptexdir]$ echo $?
0

で、このまま make すると

[lugia@arpa-castle ptexdir]$ make
Makefile:12: *** 分離記号を欠いています.  中止.

となるわけだ。
調べれば内容は同じで、

[lugia@arpa-castle ptexdir]$ head -n12 Makefile | tail -n1
ac_include ../../make/paths.mk

でもこちらは潰してもエラー。

[lugia@arpa-castle ptexdir]$ make
../tangle ./ptex.web ptex.ch
warning: kpathsea: configuration file texmf.cnf not found in these directories: /home/lugia/Momonga/TSUPPA4RI/texlive/texlive/BUILD/texlive-2009/texlive-20091107-source/texk/web2c/.libs:/home/lugia/Momonga/TSUPPA4RI/texlive/texlive/BUILD/texlive-2009/texlive-20091107-source/texk/web2c:/home/lugia/Momonga/TSUPPA4RI/texlive/texlive/BUILD/texlive-2009/texlive-20091107-source/texk:/home/lugia/Momonga/TSUPPA4RI/texlive/texlive/BUILD/texlive-2009/texlive-20091107-source/texk/web2c/.libs/share/texmf-local/web2c:/home/lugia/Momonga/TSUPPA4RI/texlive/texlive/BUILD/texlive-2009/texlive-20091107-source/texk/web2c/share/texmf-local/web2c:/home/lugia/Momonga/TSUPPA4RI/texlive/texlive/BUILD/texlive-2009/texlive-20091107-source/texk/share/texmf-local/web2c:/home/lugia/Momonga/TSUPPA4RI/texlive/texlive/BUILD/texlive-2009/texlive-20091107-source/texk/web2c/.libs/texmf-local/web2c:/home/lugia/Momonga/TSUPPA4RI/texlive/texlive/BUILD/texlive-2009/texlive-20091107-source/texk/web2c/texmf-local/web2c:/home/lugia/Momonga/TSUPPA4RI/texlive/texlive/BUILD/texlive-2009/texlive-20091107-source/texk/texmf-local/web2c:/home/lugia/Momonga/TSUPPA4RI/texlive/texlive/BUILD/texlive-2009/texlive-20091107-source/texk/web2c/.libs/share/texmf/web2c:/home/lugia/Momonga/TSUPPA4RI/texlive/texlive/BUILD/texlive-2009/texlive-20091107-source/texk/web2c/share/texmf/web2c:/home/lugia/Momonga/TSUPPA4RI/texlive/texlive/BUILD/texlive-2009/texlive-20091107-source/texk/share/texmf/web2c:/home/lugia/Momonga/TSUPPA4RI/texlive/texlive/BUILD/texlive-2009/texlive-20091107-source/texk/web2c/.libs/texmf/web2c:/home/lugia/Momonga/TSUPPA4RI/texlive/texlive/BUILD/texlive-2009/texlive-20091107-source/texk/web2c/texmf/web2c:/home/lugia/Momonga/TSUPPA4RI/texlive/texlive/BUILD/texlive-2009/texlive-20091107-source/texk/texmf/web2c.
This is TANGLE, Version 4.5 (Web2C 2009)
*1*17*25*38*54*72*99*110*115*133*162*173*199*203*207*211*220*256*268*289*297*300*321*332*366*405*467*490*514*542*586*595*647*683*702*722*771*816*865*894*903*922*945*970*983*1032*1058*1139*1211*1302*1333*1341*1343*1382*1391*1393*1405*1414*1417
Writing the output file.....500.....1000.....1500.....2000.....2500.....3000.....3500.....4000.....4500.....5000.....5500.....6000.....6500.....7000.
Done.
1088 strings written to string pool file.
(No errors were found.)
srcdir=. /bin/sh ./pconvert ptex
texini.o tex0.o tex1.o tex2.o ptexextra.o kanji.o version.o usage.o @socketlibs@ 
make: texini.o: コマンドが見つかりませんでした
make: *** [ptex] エラー 127

もとの Makefile に戻して調査してみたところ*1

[lugia@arpa-castle ptexdir]$ ./configure EUC
creating kanji.h
config.status: creating Makefile
config.status: error: cannot find input file: ...in
[lugia@arpa-castle ptexdir]$ grep texini\\.o Makefile
ptex_o = texini.o tex0.o tex1.o tex2.o ptexextra.o
texini.o: texini.c texcoerce.h texd.h kanji.h ptexhelp.h
[lugia@arpa-castle ptexdir]$ grep ptex_o Makefile
ptex_o = texini.o tex0.o tex1.o tex2.o ptexextra.o
ptex: $(ptex_o) $(plib_o) $(kpathsea) $(proglib)
        $(kpathsea_link) $(ptex_o) $(plib_o) $(socketlibs) $(LOADLIBES)
$(ptex_o): $(ptex_c) texcoerce.h texd.h kanji.h
        rm -f $(ptex_c) $(ptex_o) $(plib_o) $(programs)

どうやら $(kpathsea_link) が空っぽらしい。

[lugia@arpa-castle ptexdir]$ grep kpathsea_link Makefile
        $(kpathsea_link) $(ptex_o) $(plib_o) $(socketlibs) $(LOADLIBES)
        $(kpathsea_link) tftopl.o $(plib_o) $(LOADLIBES)
        $(kpathsea_link) pltotf.o $(plib_o) $(LOADLIBES)
        $(kpathsea_link) pdvitype.o $(plib_o) $(LOADLIBES)
        $(kpathsea_link) jbibtex.o jbibextra.o $(plib_o) $(LOADLIBES)

やはりこの定義が m4 マクロの中にあるのか。


どうすればいいのかよくわからぬ。

*1:結局は関係なかったが