Improve protocol doc Makefile.
authorFredrik Tolf <fredrik@dolda2000.com>
Sat, 7 Jul 2007 00:27:31 +0000 (02:27 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Sat, 7 Jul 2007 00:27:31 +0000 (02:27 +0200)
doc/protocol/Makefile.am

index 6c091f4..ec6345f 100644 (file)
@@ -3,17 +3,19 @@ EXTRA_DIST = cmd protocol.tex
 .dvi.ps:
        dvips -o $@ $<
 
-protocol.dvi: protocol.tex commands.tex protocol.1st
+protocol.dvi: protocol.tex commands.tex protocol.1st reqlist.sty
        latex protocol
 
-protocol.1st: protocol.tex commands.tex
+protocol.1st: protocol.tex commands.tex reqlist.sty
        latex protocol
        touch protocol.1st
 
 commands.tex: cmd/*.tex
        rm -f commands.tex; \
        for f in cmd/*.tex; do \
-               echo "\\begin{reqspec}{${f%.tex}}" >>commands.tex; \
+               cmd="$${f%.tex}"; \
+               cmd="$${cmd##*/}"; \
+               echo "\\begin{reqspec}{$$cmd}" >>commands.tex; \
                cat "$$f" >>commands.tex; \
                echo "\\end{reqspec}" >>commands.tex; \
        done