Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Alija Sabic
fhtw-latex-slides
Commits
ee0fab1e
Commit
ee0fab1e
authored
Nov 28, 2018
by
Alija Sabic
Browse files
Cleanup and templatize Makefile
parent
1ab04102
Changes
5
Hide whitespace changes
Inline
Side-by-side
.latexmkrc
View file @
ee0fab1e
# -*- cperl -*-
# -*- cperl -*-
# latexmkrc
# latexmkrc
$builddir = $ENV{'BUILDDIR'};
$builddir = $ENV{'BUILDDIR'};
$target = $ENV{'TARGET'};
$bibdirs = $ENV{'BIBDIRS'};
$bibdirs = $ENV{'BIBDIRS'};
$target = $ENV{'TARGET'};
$type = $ENV{'TYPE'};
$type = $ENV{'TYPE'};
$viewer = $ENV{'VIEWER'};
$viewer = $ENV{'VIEWER'};
...
...
Makefile
View file @
ee0fab1e
BASENAME
=
demo
BASENAME
=
demo
BUILDDIR
=
build
BUILDDIR
=
build
VARIANTS
=
presentation handout notes
TARGETS
=
$(BASENAME)
-presentation
.pdf
\
TARGETS
=
$(BASENAME)
-presentation
.pdf
\
$(BASENAME)
-handout
.pdf
\
$(BASENAME)
-handout
.pdf
\
$(BASENAME)
-notes
.pdf
$(BASENAME)
-notes
.pdf
...
@@ -24,38 +25,20 @@ clean:
...
@@ -24,38 +25,20 @@ clean:
distclean
:
distclean
:
rm
-rf
$(BUILDDIR)
rm
-rf
$(BUILDDIR)
$(BASENAME)-presentation.pdf presentation presentation.build
:
setup
define
TEMPLATE
=
$(
call
LATEXMKV,presentation,
)
$(BASENAME)-$(strip $(1)).pdf $(strip $(1)).build $(1)
:
setup
presentation.view
:
setup
$(
call
LATEXMKV,
$(
strip
$(1)
)
,
)
$(
call
LATEXMKV,presentation,-pv
)
$(strip $(1)).view
:
setup
presentation.preview
:
setup
$(
call
LATEXMKV,
$(
strip
$(1)
)
,-pv
)
$(
call
LATEXMKV,presentation,-pvc
)
$(strip $(1)).preview
:
setup
presentation.clean
:
setup
$(
call
LATEXMKV,
$(
strip
$(1)
)
,-pvc
)
$(
call
LATEXMKV,presentation,-c
)
$(strip $(1)).clean
:
setup
presentation.distclean
:
setup
$(
call
LATEXMKV,
$(
strip
$(1)
)
,-c
)
$(
call
LATEXMKV,presentation,-C
)
$(strip $(1)).distclean
:
setup
$(
call
LATEXMKV,
$(
strip
$(1)
)
,-C
)
endef
$(BASENAME)-handout.pdf handout handout.build
:
setup
$(foreach
variant,
$(VARIANTS),
$(eval
$(call
TEMPLATE,
$(variant))))
$(
call
LATEXMKV,handout,
)
handout.view
:
setup
$(
call
LATEXMKV,handout,-pv
)
handout.preview
:
setup
$(
call
LATEXMKV,handout,-pvc
)
handout.clean
:
setup
$(
call
LATEXMKV,handout,-c
)
handout.distclean
:
setup
$(
call
LATEXMKV,handout,-C
)
$(BASENAME)-notes.pdf notes notes.build
:
setup
$(
call
LATEXMKV,notes,
)
notes.view
:
setup
$(
call
LATEXMKV,notes,-pv
)
notes.preview
:
setup
$(
call
LATEXMKV,notes,-pvc
)
notes.clean
:
setup
$(
call
LATEXMKV,notes,-c
)
notes.distclean
:
setup
$(
call
LATEXMKV,notes,-C
)
# dynamic targets
# dynamic targets
%.build
:
setup
%.build
:
setup
...
@@ -73,7 +56,7 @@ notes.distclean: setup
...
@@ -73,7 +56,7 @@ notes.distclean: setup
setup
:
.FORCE | $(BUILDDIR)/
setup
:
.FORCE | $(BUILDDIR)/
.PHONY
:
all presentation handout notes
view preview
clean distclean .FORCE
.PHONY
:
all presentation handout notes clean distclean .FORCE
.EXPORT_ALL_VARIABLES
:
.EXPORT_ALL_VARIABLES
:
TEXINPUTS
:=
:.:
$(TEXDIRS)
TEXINPUTS
:=
:.:
$(TEXDIRS)
...
...
build/demo-handout.pdf
View file @
ee0fab1e
No preview for this file type
build/demo-notes.pdf
View file @
ee0fab1e
No preview for this file type
build/demo-presentation.pdf
View file @
ee0fab1e
No preview for this file type
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment