logmanager/Makefile
2012-07-30 12:02:42 +02:00

33 lines
768 B
Makefile

logmanager.tar: logmanager logarchiver logcompressor logcleaner Makefile lmtab.example README.md
pax -w -s '!^!logmanager/!' -f $@ -- $^
%.tar.gz: %.tar
gzip -c < $< > $@
%.tar.lzma: %.tar
lzma -c < $< > $@
%.tar.xz: %.tar
xz -c < $< > $@
%.tar.bz2: %.tar
bzip2 -c < $< > $@
testdir:
mkdir $@
testdir/.lmtab: testdir
echo ./ \*.log 60 > $@.tmp
mv $@.tmp $@
testdir/.prepare: testdir testdir/.lmtab
touch $</aaaaaaaaaaaaa.log
for f in 1 2 3 4 5 6 7 8 9 10 ; do touch $</"logfile-$$f-`date +%Y%m%d%H%M%S`.log" || exit 1 ; done
touch $</no_log
touch $</no.log.txt
touch $@
.PHONY: testdir/.prepare
test: testdir/.prepare testdir/.lmtab
cd testdir ; ../logmanager -nc .lmtab
cd testdir ; ../logmanager -Nc .lmtab
cd testdir ; ../logmanager -c .lmtab