From 4bd2d47e45eb0354d0096d5310ccfe7a0dc3dbd0 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Tue, 11 Feb 2014 12:55:58 +0100 Subject: Improved "make manual" and "make clean" --- Makefile | 14 ++++++++------ manual/APPNOTE_011_Design_Investigation/make.sh | 4 ++-- manual/appnotes.sh | 2 +- manual/clean.sh | 2 ++ 4 files changed, 13 insertions(+), 9 deletions(-) create mode 100755 manual/clean.sh diff --git a/Makefile b/Makefile index 0458b70c..f49d0bf9 100644 --- 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 diff --git a/manual/APPNOTE_011_Design_Investigation/make.sh b/manual/APPNOTE_011_Design_Investigation/make.sh index fa3ca70e..3845dac6 100644 --- a/manual/APPNOTE_011_Design_Investigation/make.sh +++ b/manual/APPNOTE_011_Design_Investigation/make.sh @@ -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 diff --git a/manual/appnotes.sh b/manual/appnotes.sh index f816956a..1160af6a 100755 --- a/manual/appnotes.sh +++ b/manual/appnotes.sh @@ -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 index 00000000..13554c01 --- /dev/null +++ b/manual/clean.sh @@ -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 -- cgit v1.2.3 From d2fd45949d0984635c9f1253416281413c03d02b Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Tue, 11 Feb 2014 12:58:08 +0100 Subject: More Makefile cleanups --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f49d0bf9..697cf69f 100644 --- a/Makefile +++ b/Makefile @@ -154,9 +154,9 @@ manual: $(TARGETS) $(EXTRA_TARGETS) clean: rm -rvf share cd manual && bash clean.sh - rm -vf $(OBJS) $(GENFILES) $(TARGETS) + rm -vf $(OBJS) $(GENFILES) $(TARGETS) $(EXTRA_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 + rm -vf libs/*/*.d frontends/*/*.d passes/*/*.d backends/*/*.d kernel/*.d techlibs/*/*.d test ! -f libs/svgviewer/Makefile || make -C libs/svgviewer distclean mrproper: clean @@ -193,6 +193,7 @@ config-sudo: -include passes/*/*.d -include backends/*/*.d -include kernel/*.d +-include techlibs/*/*.d .PHONY: all top-all abc test install install-abc manual clean mrproper qtcreator .PHONY: config-clean config-clang-debug config-gcc-debug config-release -- cgit v1.2.3