logmanager/Makefile

33 lines
831 B
Makefile
Raw Permalink Normal View History

2012-07-11 11:53:25 +02:00
logmanager.tar: logmanager logarchiver logcompressor logcleaner Makefile lmtab.example README.md
2012-07-11 11:53:25 +02:00
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 < $< > $@
2012-07-11 13:33:59 +02:00
testdir:
mkdir $@
testdir/.lmtab: testdir
echo ./ \*.log 60 > $@.tmp
2012-07-11 13:33:59 +02:00
mv $@.tmp $@
testdir/.prepare: testdir testdir/.lmtab
touch $</aaaaaaaaaaaaa.log
2012-07-30 12:02:42 +02:00
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
2012-07-11 13:33:59 +02:00
touch $</no_log
touch $</no.log.txt
touch $@
2012-07-30 12:02:42 +02:00
.PHONY: testdir/.prepare
2012-07-11 13:33:59 +02:00
test: testdir/.prepare testdir/.lmtab
cd testdir ; env -i HOME="$$HOME" ../logmanager -nc .lmtab
cd testdir ; env -i HOME="$$HOME" ../logmanager -Nc .lmtab
cd testdir ; env -i HOME="$$HOME" ../logmanager -c .lmtab