Improved "make manual" and "make clean"
authorClifford Wolf <clifford@clifford.at>
Tue, 11 Feb 2014 11:55:58 +0000 (12:55 +0100)
committerClifford Wolf <clifford@clifford.at>
Tue, 11 Feb 2014 11:55:58 +0000 (12:55 +0100)
Makefile
manual/APPNOTE_011_Design_Investigation/make.sh
manual/appnotes.sh
manual/clean.sh [new file with mode: 0755]

index 0458b70cb502b3970c6710163310d23fa8f52b31..f49d0bf96241728cca7bfa8f91289ef0fb35930a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -146,15 +146,17 @@ install: $(TARGETS) $(EXTRA_TARGETS)
        $(INSTALL_SUDO) mkdir -p $(DESTDIR)/share/yosys
        $(INSTALL_SUDO) cp -r share/. $(DESTDIR)/share/yosys/.
 
-manual:
+manual: $(TARGETS) $(EXTRA_TARGETS)
+       cd manual && bash appnotes.sh
+       cd manual && bash presentation.sh
        cd manual && bash manual.sh
 
 clean:
-       rm -rf share
-       rm -f $(OBJS) $(GENFILES) $(TARGETS)
-       rm -f kernel/version_*.o kernel/version_*.cc abc/abc-[0-9a-f]*
-       rm -f libs/*/*.d frontends/*/*.d passes/*/*.d backends/*/*.d kernel/*.d
-       cd manual && rm -f *.aux *.bbl *.blg *.idx *.log *.out *.pdf *.toc *.ok
+       rm -rvf share
+       cd manual && bash clean.sh
+       rm -vf $(OBJS) $(GENFILES) $(TARGETS)
+       rm -vf kernel/version_*.o kernel/version_*.cc abc/abc-[0-9a-f]*
+       rm -vf libs/*/*.d frontends/*/*.d passes/*/*.d backends/*/*.d kernel/*.d
        test ! -f libs/svgviewer/Makefile || make -C libs/svgviewer distclean
 
 mrproper: clean
index fa3ca70eb968cc87313a9628a52873258d0c1f3d..3845dac6b3177eede0dc70a13e9e362b01f82834 100644 (file)
@@ -18,6 +18,6 @@ if false; then
        sed -i '/^label=/ d;' *.dot
 fi
 for dot_file in *.dot; do
-       pdf_file=${dot_file#.dot}.pdf
-       dot -Tpdf -o example_00.pdf example_00.dot
+       pdf_file=${dot_file%.dot}.pdf
+       dot -Tpdf -o $pdf_file $dot_file
 done
index f816956abbf53980b762b5df5ccd64a11f4ed999..1160af6af1b51ed2937a2718fd95085d181483ab 100755 (executable)
@@ -11,7 +11,7 @@ do
        fi
        old_md5=$([ -f $job.aux ] && md5sum < $job.aux || true)
        while
-               pdflatex -shell-escape -halt-on-error $job.tex
+               pdflatex -shell-escape -halt-on-error $job.tex || exit
                new_md5=$(md5sum < $job.aux)
                [ "$old_md5" != "$new_md5" ]
        do
diff --git a/manual/clean.sh b/manual/clean.sh
new file mode 100755 (executable)
index 0000000..13554c0
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/bash
+for f in $( find -name .gitignore ); do sed -re "s,^,find ${f%.gitignore} -name ',; s,$,' | xargs -r rm -vf,;" $f; done | bash -v