Reputation: 11
I'm totally clueless with Unix-type command line compilation, and now I'm saddled with a document written in LaTEX to compile using a provided makefile.
Bad enough situation, but it gets worse: I work under Windows, have installed all the latex components called by the documentation, including Pygmentize, I even installed Make for Windows, but still can't get it to work.
First of all, what is the correct syntax when calling "Make" to have it use the makefile: just "make", or "make", followed by the intended target pdf file name?
I tried both, the first resulted in:
No rule to make target "command" needed by "pdf". Stop.
The second got me:
No rule to make target "User_manual.pdf". Stop.
I searched around, but all results either had nothing to do with my problem, or presupposed much more knowledge about the whole process than I have (in other words, I didn't understand the answer).
So could someone tell me what I did wrong?
Here is the content of the makefile, if it's any use:
CURRFILE=User_manual
TEXFILES := $(wildcard *.tex) $(wildcard */*.tex) $(wildcard */*/*.tex)
KBFEXAMPLES := $(wildcard KBF/*.kbf)
PYGEXAMPLES := $(wildcard KBF/*.pyg)
KBFCEXAMPLES := $(patsubst %.kbf,%.pyg,$(KBFEXAMPLES))
CHAPTERNUM := 1 2 3 4 5
PDFLATEX := $(shell command -v pdflatex 2>&1)
BIBTEX := $(shell command -v bibtex 2>&1)
MKINDEX := $(shell command -v makeindex 2>&1)
PDFOPTION=-shell-escape
DICOFILES := $(wildcard *.cfg)
# implement automatic PATH check
PYGMZE_PATH := $(shell command -v pygmentize 2>&1)
# $(shell command -v pygmentize >/dev/null 2>&1 || { @echo >&2 "Missing pygmentize in PATH."; })
all : pdf flat dico
pdf: $(PYGMZE_PATH)
ifeq ($(strip $(PYGMZE_PATH)),)
${info PYGMZE_PATH = $(PYGMZE_PATH)}
$(error ERROR missing pygmentize in PATH)
endif
ifeq ($(strip $(PDFLATEX)),)
${info PDFLATEX = $(PDFLATEX)}
$(error ERROR missing pdflatex in PATH)
endif
$(PDFLATEX) $(PDFOPTION) $(CURRFILE).tex
$(MKINDEX) $(CURRFILE).nlo -s nomencl.ist -o $(CURRFILE).nls -t $(CURRFILE).nlg
$(BIBTEX) $(CURRFILE)
$(PDFLATEX) $(PDFOPTION) $(CURRFILE).tex
$(PDFLATEX) $(PDFOPTION) $(CURRFILE).tex
fast: $(KBFEXAMPLES)
$(PDFLATEX) $(PDFOPTION) $(CURRFILE).tex
flat:
#cleartool ls Flat.tex | grep -q CHECKEDOUT || cleartool co -q -nc Flat.tex
latexpand $(CURRFILE).tex > Flat.tex
dico: apollo_input_dictionary.cfg
apollo_input_dictionary.cfg: Flat.tex
echo "Generating dictionary"
./dictionarygen.sh
updatepyg: $(KBFEXAMPLES)
KBF/%.pyg: KBF/%.kbf
rm $@
Tex/%.tex: updatepyg FORCE
sed -n '1,/begin{document}/ p' $(CURRFILE).tex > _region.tex
cat $@ >> _region.tex
echo "\end{document}" >> _region.tex
$(PDFLATEX) $(PDFOPTION) _region.tex
$(PDFLATEX) $(PDFOPTION) _region.tex
clean: $(PYGEXAMPLES)
@for f in $(PYGEXAMPLES); do mv $$f $$f.old; done
rm -f $(TEXFILES:.tex=.aux)
rm -f $(CURRFILE).log $(CURRFILE).dvi $(CURRFILE).bbl $(CURRFILE).blg $(CURRFILE).toc $(CURRFILE).lof $(CURRFILE).lot $(CURRFILE).ind $(CURRFILE).out $(CURRFILE).nls $(CURRFILE).nlo $(CURRFILE).nlg $(CURRFILE).kbf $(CURRFILE).dhdf $(CURRFILE).hdf
distclean: clean
rm -f $(CURRFILE).pdf
rm -f Flat.tex inputkeyword apollo_input_dictionary.cfg outputkeyword apollo_output_dictionary.cfg
FORCE :
stop:
$(error ERROR make failed)
I have to use the makefile as is, as it is what the customer expects, I just have to know how to make it work in Windows...
Thanks for any help you can provide!
Upvotes: 0
Views: 299
Reputation: 11
As posted in the comments, the problem was with the syntax used in the makefile, which was calling upon Unix-specific commands, so it couldn't work on a pure Windows system. Transposing the package on Linux did the trick.
Upvotes: 1