Skip to content

Commit

Permalink
Makefiles: using "wildcard" to find .tex files, moreover, using strin…
Browse files Browse the repository at this point in the history
…g manipulation to perform checks on the logfile of standalone tex files
  • Loading branch information
fmilthaler committed Jun 26, 2019
1 parent 2fc34dc commit cf50532
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 23 deletions.
2 changes: 1 addition & 1 deletion abstract/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include ../common.mk

TEXFILES=./*.tex
TEXFILES=$(wildcard *.tex)

.PHONY: texfiles $(TEXFILES)

Expand Down
2 changes: 1 addition & 1 deletion content/appendix/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include ../../common.mk

TEXFILES=./*.tex
TEXFILES=$(wildcard *.tex)

.PHONY: texfiles $(TEXFILES)

Expand Down
2 changes: 1 addition & 1 deletion content/conclusion/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include ../../common.mk

TEXFILES=./*.tex
TEXFILES=$(wildcard *.tex)

.PHONY: texfiles $(TEXFILES)

Expand Down
2 changes: 1 addition & 1 deletion content/introduction/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include ../../common.mk

TEXFILES=./*.tex
TEXFILES=$(wildcard *.tex)

.PHONY: texfiles $(TEXFILES)

Expand Down
2 changes: 1 addition & 1 deletion content/reschap1/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include ../../common.mk

TEXFILES=./*.tex
TEXFILES=$(wildcard *.tex)

.PHONY: texfiles $(TEXFILES)

Expand Down
9 changes: 3 additions & 6 deletions content/reschap1/images/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
include ../../../common.mk

TEXFILES=./1way_coupling_prescribed_rotation \
./fem_basis_function_linear_cg \
./fem_basis_function_constant_dg
# add more files if needed
TEXFILES=$(wildcard *.tex)

.PHONY: all
.PHONY: clean
Expand All @@ -14,8 +11,8 @@ all: texfiles
texfiles: $(TEXFILES)
$(TEXFILES):
@echo "running ${@}.tex"
${LATEX} ${LATEXOPT} ${@}.tex
if fgrep ${LATEXLABELCHG} ${@}.log; then make $@; fi
${LATEX} ${LATEXOPT} ${@}
if fgrep ${LATEXLABELCHG} ${@:.tex=.log}; then make $@; fi

clean:
-rm *.aux *.log *.pdf
Expand Down
2 changes: 1 addition & 1 deletion content/reschap2/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include ../../common.mk

TEXFILES=./*.tex
TEXFILES=$(wildcard *.tex)

.PHONY: texfiles $(TEXFILES)

Expand Down
7 changes: 3 additions & 4 deletions content/reschap2/images/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
include ../../../common.mk

TEXFILES=
# add more files if needed
TEXFILES=$(wildcard *.tex)

.PHONY: all
.PHONY: clean
Expand All @@ -12,8 +11,8 @@ all: texfiles
texfiles: $(TEXFILES)
$(TEXFILES):
@echo "running ${@}.tex"
${LATEX} ${LATEXOPT} ${@}.tex
if fgrep ${LATEXLABELCHG} ${@}.log; then make $@; fi
${LATEX} ${LATEXOPT} ${@}
if fgrep ${LATEXLABELCHG} ${@:.tex=.log}; then make $@; fi

clean:
-rm *.aux *.log *.pdf
Expand Down
2 changes: 1 addition & 1 deletion content/reschap3/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include ../../common.mk

TEXFILES=./*.tex
TEXFILES=$(wildcard *.tex)

.PHONY: texfiles $(TEXFILES)

Expand Down
7 changes: 3 additions & 4 deletions content/reschap3/images/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
include ../../../common.mk

TEXFILES=
# add more files if needed
TEXFILES=$(wildcard *.tex)

.PHONY: all
.PHONY: clean
Expand All @@ -12,8 +11,8 @@ all: texfiles
texfiles: $(TEXFILES)
$(TEXFILES):
@echo "running ${@}.tex"
${LATEX} ${LATEXOPT} ${@}.tex
if fgrep ${LATEXLABELCHG} ${@}.log; then make $@; fi
${LATEX} ${LATEXOPT} ${@}
if fgrep ${LATEXLABELCHG} ${@:.tex=.log}; then make $@; fi

clean:
-rm *.aux *.log *.pdf
Expand Down
2 changes: 1 addition & 1 deletion declaration/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include ../common.mk

TEXFILES=./*.tex
TEXFILES=$(wildcard *.tex)

.PHONY: texfiles $(TEXFILES)

Expand Down
2 changes: 1 addition & 1 deletion titlepage/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include ../common.mk

TEXFILES=./*.tex
TEXFILES=$(wildcard *.tex)

.PHONY: texfiles $(TEXFILES)

Expand Down

0 comments on commit cf50532

Please sign in to comment.