2012-07-11 11:53:25 +02:00
|
|
|
|
2012-07-18 16:29:29 +02:00
|
|
|
logmanager.tar: logmanager logarchiver logcompressor logcleaner Makefile lmtab.example
|
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
|
2012-07-18 16:29:29 +02:00
|
|
|
echo ./ \*.log 60 > $@.tmp
|
2012-07-11 13:33:59 +02:00
|
|
|
mv $@.tmp $@
|
|
|
|
|
|
|
|
testdir/.prepare: testdir testdir/.lmtab
|
2012-07-18 16:29:29 +02:00
|
|
|
touch $</aaaaaaaaaaaaa.log
|
2012-07-11 13:33:59 +02:00
|
|
|
for f in `seq 1 10` ; do touch $</logfile$$f.log || exit 1 ; done
|
|
|
|
touch $</no_log
|
|
|
|
touch $</no.log.txt
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
test: testdir/.prepare testdir/.lmtab
|
2012-07-18 16:29:29 +02:00
|
|
|
cd testdir ; ../logmanager -nc .lmtab
|
|
|
|
cd testdir ; ../logmanager -Nc .lmtab
|
|
|
|
cd testdir ; ../logmanager -c .lmtab
|