From 64ec980f0176d46d52a7cb4efbdb33883f3d154c Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 4 Apr 2011 21:19:23 +0200 Subject: [PATCH] Jeste nejaka vylepseni Makefilu pro posilani PDFek na server --- Makerules | 5 ++++- all/Makefile | 15 ++------------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/Makerules b/Makerules index 82e3eac..b521d4c 100644 --- a/Makerules +++ b/Makerules @@ -17,10 +17,13 @@ mostlyclean: clean:: mostlyclean rm -f *.ps *.pdf +UPDIR=vyuka/1011/ads1 + ifndef CUSTOM_UPLOAD upload:: make $P.pdf - rsync $P.pdf jabberwock:www/vyuka/1011/ads1/$P.pdf + rsync $P.pdf jabberwock:www/$(UPDIR)/$P.pdf + ssh jabberwock 'cd www && date "+%Y-%m-%d" >$(UPDIR)/$(P).stamp && make' endif .SECONDARY: diff --git a/all/Makefile b/all/Makefile index a6de6e7..449655b 100644 --- a/all/Makefile +++ b/all/Makefile @@ -1,9 +1,8 @@ P=ads -X:=$(shell for a in 1 2 3 4 5 6 7 8 9 10 11 12 13 ; do echo ../$$a-*/$$a-*.tex ; done) +X:=$(shell for a in 1 ; do echo ../$$a-*/$$a-*.tex ; done) %universe: all ChangeLog -CUSTOM_UPLOAD=1 include ../Makerules ads.dvi: ads.tex body.tex @@ -11,15 +10,5 @@ ads.dvi: ads.tex body.tex body.tex: $(X) preprocess ./preprocess $(X) >$@ -ChangeLog: - git-log -C --pretty=medium --since='4 weeks ago' --stat | grep -v '^---' >ChangeLog - clean:: - rm -f body.tex ChangeLog - -upload:: - make $P.ps $P-2in1.ps - scp -C $P.ps $P-2in1.ps jabberwock:www/vyuka/0607/ads1/ - ( cd .. && make clean ) - ( cd ../.. && tar czf - --exclude .git ads ) | ssh jabberwock 'cd www/vyuka/0607/ads1/ && cat >ads.tar.gz.new && mv ads.tar.gz.new ads.tar.gz' - make ChangeLog && cat ChangeLog | ssh jabberwock 'cd www/vyuka/0607/ads1 && cat >ChangeLog.new && mv ChangeLog.new ChangeLog' + rm -f body.tex -- 2.39.2