add The makefile
This commit is contained in:
parent
71dc677ec0
commit
00e9c9b74e
1 changed files with 35 additions and 0 deletions
35
Makefile
Normal file
35
Makefile
Normal file
|
@ -0,0 +1,35 @@
|
|||
NAME = _letter
|
||||
TEX = $(NAME).tex
|
||||
FULLNAME = Lettre
|
||||
|
||||
DIRECTORIES = $(filter-out ".", $(shell find . -maxdepth 1 -type d -printf "\"%f\" "))
|
||||
TEMP_FILES = aux log tns fdb_latexmk fls synctex.gz pdf out
|
||||
TEMPLATE = Template
|
||||
|
||||
RM = rm -f
|
||||
CP = cp -r
|
||||
|
||||
all: build
|
||||
|
||||
clean:
|
||||
for dir in $(DIRECTORIES); do \
|
||||
cd "$$dir"; \
|
||||
$(RM) $(foreach i, $(TEMP_FILES), $(NAME).$(i)); \
|
||||
cd ..; \
|
||||
done;
|
||||
|
||||
clean-full:
|
||||
$(MAKE) clean
|
||||
$(RM) *.pdf
|
||||
|
||||
build:
|
||||
for dir in $(filter-out "$(TEMPLATE)", $(DIRECTORIES)); do \
|
||||
cd "$$dir"; \
|
||||
pdflatex $(TEX); \
|
||||
mv $(NAME).pdf "../$(FULLNAME)-$$dir.pdf"; \
|
||||
cd ..; \
|
||||
done;
|
||||
|
||||
new:
|
||||
@echo Nom du dossier ?
|
||||
@read line; echo $$line | xargs -i $(CP) '$(TEMPLATE)' {}/
|
Loading…
Reference in a new issue