diff options
author | Andreas Müller <andreas.mueller@ost.ch> | 2021-06-04 16:46:46 +0200 |
---|---|---|
committer | Andreas Müller <andreas.mueller@ost.ch> | 2021-06-04 16:46:46 +0200 |
commit | 4752a00668c8de082d467bbdb8ba47f3cb0091b4 (patch) | |
tree | a3c3782662c1f8ee5e54c40eb9b9d62d30f90c74 /buch/papers/scripts/mkmakefile | |
parent | add ideas file (diff) | |
download | SeminarSpezielleFunktionen-4752a00668c8de082d467bbdb8ba47f3cb0091b4.tar.gz SeminarSpezielleFunktionen-4752a00668c8de082d467bbdb8ba47f3cb0091b4.zip |
add basic file infrastructure for special function book
Diffstat (limited to 'buch/papers/scripts/mkmakefile')
-rw-r--r-- | buch/papers/scripts/mkmakefile | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/buch/papers/scripts/mkmakefile b/buch/papers/scripts/mkmakefile new file mode 100644 index 0000000..9590119 --- /dev/null +++ b/buch/papers/scripts/mkmakefile @@ -0,0 +1,95 @@ +# +# mkmakefile -- build the Makefile.inc for all the papers +# +# (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule +# + +# +# Header of the Makefile.inc +# +cat >common/Makefile.inc <<EOF +# +# Makefile.inc -- Makefile Targets und Variablen für Papers +# +# Achtung: dieses File wird erzeugt vom Skript scripts/mkmakefile +# +# (c) 2020 Prof Dr Andreas Müller, Hochschule Rapperswil +# +EOF + +# +# add dependency variables for the main paper files +# +awk 'BEGIN { + printf("PAPERFILES = \\\n") + printf("\tpapers/part2.tex \\\n") + printf("\tpapers/uebersicht.tex \\\n") +} +{ + printf("\tpapers/%s/main.tex \\\n", $1) +} +END { + printf("\t\n") +}' common/paperlist >> common/Makefile.inc + +# +# generate bibliographic dependency variables and commands +# +awk 'BEGIN { + counter=1 +} +{ + printf("buch%d-blx.bbl:\tbuch%d-blx.aux\n", counter, counter) + printf("\tbibtex buch%d-blx\n\n", counter) + counter++ +} +END { + printf("buch%d-blx.bbl:\tbuch%d-blx.aux\n", counter, counter) + printf("\tbibtex buch%d-blx\n\n", counter) + printf("BLXFILES = buch.bbl \\\n") + for (i = 1; i <= counter; i++) { + printf("\tbuch%d-blx.bbl \\\n", i) + } + #printf("\tbuch%d-blx.bbl\n", i) + printf("\n") +}' common/paperlist >> common/Makefile.inc + +# +# generate a directory list for +# +awk 'BEGIN { + printf("PAPER_DIRECTORIES = \\\n") +} +{ + printf("\t%s \\\n", $1) +} +END { + printf("\t\n") +}' common/paperlist >> common/Makefile.inc + +# +# generate a list of Makefile.inc to be used by the top level makefile +# +awk 'BEGIN { + printf("PAPER_MAKEFILEINC = \\\n") +} +{ + printf("\tpapers/%s/Makefile.inc \\\n", $1) +} +END { + printf("\t\n") +}' common/paperlist >> common/Makefile.inc + +# +# add include directives for all papers +# +awk '{ + printf("include papers/%s/Makefile.inc\n", $1) + texfiles = sprintf("%s\t$(dependencies-%s) \\\n", texfiles, $1); +} +END { + printf("\n") + printf("TEXFILES = \\\n") + printf("%s\n", texfiles) +}' common/paperlist > common/includes.inc + |