/notes/Makefile (41648af7e70596949c57addbc2ae7970ebf30804) (4107 bytes) (mode 100644) (type blob)
#########################
# Tutorials on Makefile #
#########################
# http://www.gnu.org/software/make/manual/make.html
# http://nuclear.mutantstargoat.com/articles/make/
###########################
# Makefile global options #
###########################
MAKEFLAGS:= -j
# Maximize parallel execution whenever possible
OPTIONSPANDOC:= --toc --filter pandoc-numbering --filter pandoc-citeproc --filter pandoc-include-code --top-level-division=chapter -M date="$$(LANG=en_us_88591 date '+%B %e, %Y (%r)')" --lua-filter filters/default-code-class.lua -M default-code-class=sqlmysql
# Options common to all invokations of pandoc. Cf https://pandoc.org/MANUAL.html to understand them.
OPTIONSPANDOCODT:= $(OPTIONSPANDOC) --default-image-extension=svg
OPTIONSPANDOCHTML:= $(OPTIONSPANDOC) --css=style/style.css --toc-depth=1 --self-contained --default-image-extension=svg
OPTIONSPANDOCPDF:= $(OPTIONSPANDOC) --pdf-engine=xelatex --pdf-engine-opt=-shell-escape -V links-as-notes --default-image-extension=pdf
# Options for (respectively) the odt, html and pdf outputs.
.DEFAULT_GOAL:= all
# By default, we construct all the files.
FIG_FOLDER = fig/*/
# Folder where source code for figures are present.
FIG_SOURCE = $(FIG_FOLDER)*.tex
# Source code for figures
FIG_PDF = $(FIG_FOLDER)*.pdf
# Figures in pdf format
JAVA_CODE = code/java/*.java
#########
# Rules #
#########
# "Phony" rule to compile the figures into pdf using latexmk
# This must be run before compiling the pdf.
.PHONY: fig $(FIG_SOURCE)
fig: $(FIG_SOURCE)
$(FIG_SOURCE):
latexmk -silent -cd -pdf $@
# latexmk automates and simplifies the latex compilation of the figures.
# "Phony" rule to convert the pdf figures to svg (for better integration in htm and odt output).
# This must be run before compiling the odt or html.
.PHONY: fig_svg $(FIG_PDF)
fig_svg: $(FIG_PDF)
$(FIG_PDF): $(FIG_SOURCE)
# $(FIG_SOURCE) is an "order-only" pre-requisite. Cf. http://www.gnu.org/software/make/manual/make.html#Types-of-Prerequisites
# This means that we force fig to be executed before executing fig_svg
pdf2svg $@ $(addsuffix .svg,$(basename $@))
# To understand this syntax, cf. https://www.gnu.org/software/make/manual/html_node/File-Name-Functions.html#File-Name-Functions
###
# Rule for the lecture notes.
###
# Rule to compile to html
html: lectures_notes.md
pandoc $(OPTIONSPANDOCHTML) -o lectures_notes.html $<
# Rule to compile to odt
odt: lectures_notes.md
pandoc $(OPTIONSPANDOCODT) -o lectures_notes.odt $<
# Rule to compile to pdf
pdf: lectures_notes.md
pandoc $(OPTIONSPANDOCPDF) -o lectures_notes.pdf $<
###
# Rule for the example.md file, to test your installation.
###
example: example.md
latexmk -silent -cd -pdf fig/er/abstract.tex fig/fd/course.tex fig/misc/schema_design.tex fig/rel_mod/actor.tex fig/uml/hand.tex
pdf2svg fig/er/abstract.pdf fig/er/abstract.svg
pdf2svg fig/fd/course.pdf fig/fd/course.svg
pdf2svg fig/misc/schema_design.pdf fig/misc/schema_design.svg
pdf2svg fig/rel_mod/actor.pdf fig/rel_mod/actor.svg
pdf2svg fig/uml/hand.pdf fig/uml/hand.svg
pandoc $(OPTIONSPANDOCHTML) -o example.html $<
pandoc $(OPTIONSPANDOCODT) -o example.odt $<
pandoc $(OPTIONSPANDOCPDF) -o example.pdf $<
###
# Rule to compile a temporary file, for testing purposes
###
temp: temp.md
pandoc $(OPTIONSPANDOCHTML) -o temp.html $<
pandoc $(OPTIONSPANDOCODT) -o temp.odt $<
pandoc $(OPTIONSPANDOCPDF) -o temp.pdf $<
# "Phony" rule to compile all three versions (html, odt, pdf) of the document and the "auxiliary" files (readme, contrib, licence and known_bugs, instalation guides).
.PHONY: all
all: pdf odt html aux
###
# "Phony" rule to indent properly the latex files
###
#.PHONY: clean_latex $(FIG_SOURCE)
#clean_latex: $(FIG_SOURCE)
#$(FIG_SOURCE):
# latexindent -w -s $@
###
# "Phony" rule to beautify the java code
###
.PHONY: clean_java $(JAVA_CODE)
clean_java: $(JAVA_CODE)
$(JAVA_CODE):
java -jar lib/google-java-format-1.7-all-deps.jar -i $@
###
# Rules to call makefile from parent directory.
###
aux:
@make -C ../ aux
clean:
@make -C ../ clean
push:
@make -C ../ push
Mode |
Type |
Size |
Ref |
File |
100644 |
blob |
14899 |
43625ef8485a7c9664ca664bbc3cce3fe7feda18 |
CONTRIB.md |
100644 |
blob |
19409 |
9b2ae67b6e3ac705c67ec371f7713fd1ee1018d7 |
KNOWN_BUGS.md |
100644 |
blob |
17217 |
e5c1f9f898cca948da42333b100e331d62b61d3c |
LICENSE.md |
100644 |
blob |
4503 |
080ef659dc8ad364ed16c73ff07bae8a171d0b34 |
README.md |
040000 |
tree |
- |
7b731d189feeb59f3807497c005be6b7b80486ca |
install |
040000 |
tree |
- |
62b597c2c33c56ad9b0f288e297c58ccd6ff77bf |
notes |
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"
Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/caubert/CSCI_3410
Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/caubert/CSCI_3410
Clone this repository using git:
git clone git://git.rocketgit.com/user/caubert/CSCI_3410
You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a
merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main