isa: removed the perltex and replaced ...
[calu.git] / isasty / Makefile
index 387fed0556e9c22974cc5d20cf53b8a01448af73..b63c26b98412bfabb9a420eb18dae14d2e782844 100644 (file)
@@ -2,19 +2,22 @@ SHELL := bash
 
 LATEX := pdflatex
 
-all: noperltex.sty
-       $(LATEX) isa.tex
+FILES = isa.tex
+TARGET = isa.pdf
 
-noperltex.sty: isa_file.tex
-       @if $(SHELL) -c 'perltex --help' > /dev/null 2>&1; then \
-               perltex --makesty --latex=pdflatex isa_gen.tex; \
-               rm -f isa_gen.pdf isa_gen.log isa_gen.aux isa_gen.dfpl isa_gen.frpl isa_gen.lgpl isa_gen.topl isa_gen.pipe; \
-       else \
-               echo "no perltex installed! i hope you have the builded files";\
-       fi
+ISA_FILES = sample.ptex
 
-clean:
-       @rm -f isa.aux isa.log isa.pdf
+ISA_BUILD = $(ISA_FILES:.ptex=.tex)
+
+all: $(TARGET)
+
+$(TARGET) : $(FILES) $(ISA_BUILD)
+       $(LATEX) $(@:.pdf=.tex)
 
-cleanall: clean
-       @rm -f noperltex.sty noperltex-*.tex
+%.tex : %.ptex
+       ./gentex.pl $^
+
+.PHONY: clean
+
+clean:
+               rm -rf *.aux *.log *.dvi *.pdf *.toc *.out $(ISA_BUILD)