diff --git a/communications-numeriques/tp1/Makefile b/communications-numeriques/tp1/Makefile index a595a49..ccf3860 100644 --- a/communications-numeriques/tp1/Makefile +++ b/communications-numeriques/tp1/Makefile @@ -1,13 +1,14 @@ +filename=$(shell basename $(shell pwd)) timestamp=$(shell date +%Y-%m-%d_%H:%M) -all: tp1 +all: snapshot -tp1: tp1.tex - @latexmk -pdf tp1.tex - @if ! cmp --silent build/tp1.pdf tp1_*.pdf; then \ - touch tp1_tmp.pdf; \ - rm tp1*.pdf; \ - cp build/tp1.pdf tp1_${timestamp}.pdf; \ +snapshot: main.tex + @latexmk -pdf main.tex + @if ! cmp --silent build/main.pdf ${filename}_*.pdf; then \ + touch ${filename}_tmp.pdf; \ + rm ${filename}*.pdf; \ + cp build/main.pdf ${filename}_${timestamp}.pdf; \ echo "Updated"; \ fi diff --git a/communications-numeriques/tp1/tp1.tex b/communications-numeriques/tp1/main.tex similarity index 100% rename from communications-numeriques/tp1/tp1.tex rename to communications-numeriques/tp1/main.tex