diff options
author | Robert Alessi <alessi@robertalessi.net> | 2018-09-30 08:18:58 +0200 |
---|---|---|
committer | Robert Alessi <alessi@robertalessi.net> | 2018-09-30 08:18:58 +0200 |
commit | a5f9622898b3a296858ec78a5321fe12d9e76f38 (patch) | |
tree | 42cba6d185750df0f3494f11367deaeb745895bd | |
parent | 589e08742446243a14c2cec8db4a0d036b8df288 (diff) | |
download | courses-a5f9622898b3a296858ec78a5321fe12d9e76f38.tar.gz |
improved makefile
-rw-r--r-- | makefile | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,3 +1,6 @@ | |||
1 | exts := md png sh bib tex | ||
2 | findopts := $(foreach ext,$(exts),-or -iname "*.$(ext)") | ||
3 | |||
1 | all: pdf | 4 | all: pdf |
2 | 5 | ||
3 | pdf: clean | 6 | pdf: clean |
@@ -12,7 +15,7 @@ pdf: clean | |||
12 | clean: | 15 | clean: |
13 | rm -rf .backup | 16 | rm -rf .backup |
14 | find -iname "*~" | xargs rm -rf | 17 | find -iname "*~" | xargs rm -rf |
15 | find ./* -type f | grep 'makefile\|\.md$$\|\.png$$\|\.sh$$\|\.bib$$\|\.tex$$' > ls-R | 18 | find ./* -type f -iname "makefile" $(findopts) > ls-R |
16 | rsync -avPr --files-from=ls-R . .backup | 19 | rsync -avPr --files-from=ls-R . .backup |
17 | rm -rf * | 20 | rm -rf * |
18 | cp -p -r .backup/* . | 21 | cp -p -r .backup/* . |