LaTeXドキュメントのmakefileを作成したいと思います(この最小限の例では)。ファイル「makeindexstyle.ist」がない場合は、(make makeindexstyle.istを実行して)作成し、インデックスのフォーマットに使用する必要があります。のルール
%.pdfはこれを反映しています。ただし、まだ機能していないため、エラーが発生します
ifneq (, ) {
/bin/sh: 1: Syntax error: word unexpected (expecting ")")
make: *** [master.pdf] Error 2
どうしたの?
Parts from Makefile:
MASTER = master
TEX = slave
TEXI = texi2dvi -p
all: $(MASTER:=.pdf)
%.pdf: %.tex $(TEX:=.tex)
    ifneq ($(wildcard makeindexstyle.ist), ) { # if makeindexstyle.ist exists, compile and build index
        $(TEXI) $<
        make makeindexstyle.ist
        makeindex -c -s makeindexstyle.ist $(MASTER:=.idx)
    }
    endif
    $(TEXI) $<
makeindexstyle.ist:
    @(echo "...") > makeindexstyle.ist
更新:エラーの原因をできるだけ簡単に確認できるようにしました。とりわけ(引用など)、私はこれを試しました:
%.pdf: %.tex $(TEX:=.tex)
    exist := $(wildcard "absolute-path-to-makeindexstyle.ist")
    ifneq ($strip $(exist)),)
             echo "foo"
    endif
    $(TEXI) $<
しかし、結果は
exists := 
make: exists: Command not found
make: *** [book.pdf] Error 127