2011-03-12 03:39:59 +01:00
|
|
|
|
2011-03-12 03:44:27 +01:00
|
|
|
# $Id: Makefile,v 1.11 2006/07/03 00:04:37 gilles Exp $
|
2011-03-12 03:39:59 +01:00
|
|
|
|
|
|
|
TARGET=imapsync
|
|
|
|
|
|
|
|
.PHONY: help usage all
|
|
|
|
|
|
|
|
help: usage
|
|
|
|
|
|
|
|
usage:
|
|
|
|
@echo " $(TARGET) $(VERSION), You can do :"
|
|
|
|
@echo make install # as root
|
|
|
|
@echo make testf # run tests
|
|
|
|
@echo make testv # run tests verbosely
|
|
|
|
@echo make all
|
|
|
|
|
2011-03-12 03:43:45 +01:00
|
|
|
all: ChangeLog README VERSION
|
2011-03-12 03:39:59 +01:00
|
|
|
|
|
|
|
.PHONY: test testp testf
|
|
|
|
|
|
|
|
.test: $(TARGET) tests.sh
|
2011-03-12 03:44:22 +01:00
|
|
|
nice -40 sh tests.sh 1>/dev/null
|
2011-03-12 03:39:59 +01:00
|
|
|
touch .test
|
|
|
|
|
|
|
|
testv:
|
2011-03-12 03:44:22 +01:00
|
|
|
nice -40 sh -x tests.sh
|
2011-03-12 03:39:59 +01:00
|
|
|
|
|
|
|
test: .test
|
|
|
|
|
|
|
|
testf: clean_test test
|
|
|
|
|
|
|
|
testp :
|
|
|
|
perl -c $(TARGET)
|
|
|
|
|
|
|
|
ChangeLog: $(TARGET)
|
|
|
|
rlog $(TARGET) > ChangeLog
|
|
|
|
|
|
|
|
README: $(TARGET)
|
|
|
|
perldoc -t $(TARGET) > README
|
|
|
|
|
2011-03-12 03:40:54 +01:00
|
|
|
VERSION: $(TARGET) Makefile
|
|
|
|
./$(TARGET) --version > VERSION
|
|
|
|
|
2011-03-12 03:39:59 +01:00
|
|
|
.PHONY: clean clean_tilde clean_test
|
|
|
|
|
|
|
|
clean: clean_tilde clean_test
|
|
|
|
|
|
|
|
clean_test:
|
|
|
|
rm -f .test
|
|
|
|
|
|
|
|
clean_tilde:
|
|
|
|
rm -f *~
|
|
|
|
|
|
|
|
.PHONY: install dist
|
|
|
|
|
|
|
|
install: testp
|
2011-03-12 03:44:13 +01:00
|
|
|
cp $(TARGET) $(DESTDIR)/usr/bin/$(TARGET)
|
|
|
|
chmod 755 $(DESTDIR)/usr/bin/$(TARGET)
|
2011-03-12 03:39:59 +01:00
|
|
|
|
|
|
|
DIST_NAME=$(TARGET)-$(VERSION)
|
|
|
|
DIST_FILE=$(DIST_NAME).tgz
|
2011-03-12 03:44:13 +01:00
|
|
|
DEB_FILE=$(DIST_NAME).deb
|
2011-03-12 03:39:59 +01:00
|
|
|
VERSION=$(shell ./$(TARGET) --version)
|
|
|
|
|
2011-03-12 03:43:45 +01:00
|
|
|
dist: cidone test clean clean_dist all INSTALL
|
2011-03-12 03:39:59 +01:00
|
|
|
echo making tarball $(DIST_FILE)
|
|
|
|
mkdir -p dist
|
|
|
|
mkdir -p ../prepa_dist/$(DIST_NAME)
|
|
|
|
rsync -aCv --delete ./ ../prepa_dist/$(DIST_NAME)
|
|
|
|
cd ../prepa_dist && tar czfv $(DIST_FILE) $(DIST_NAME)
|
|
|
|
cp -f ../prepa_dist/$(DIST_FILE) dist/
|
2011-03-12 03:44:27 +01:00
|
|
|
cd dist && md5sum $(DIST_FILE) > md5.txt
|
|
|
|
cd dist && md5sum -c md5.txt
|
2011-03-12 03:39:59 +01:00
|
|
|
|
|
|
|
|
2011-03-12 03:44:13 +01:00
|
|
|
deb:
|
|
|
|
echo making debball $(DEB_FILE)
|
|
|
|
mkdir -p ../prepa_deb
|
|
|
|
cd ../prepa_deb && tar xzvf ../prepa_dist/$(DIST_FILE) &&\
|
|
|
|
cd ../prepa_dist/$(DIST_NAME)
|
|
|
|
|
2011-03-12 03:39:59 +01:00
|
|
|
.PHONY: cidone clean_dist
|
|
|
|
|
|
|
|
cidone:
|
|
|
|
rcsdiff RCS/*
|
|
|
|
|
|
|
|
clean_dist:
|
|
|
|
rm -f dist/*
|
|
|
|
|
|
|
|
# Local goals
|
|
|
|
|
2011-03-12 03:43:54 +01:00
|
|
|
.PHONY: lfo niouze
|
2011-03-12 03:39:59 +01:00
|
|
|
|
2011-03-12 03:43:54 +01:00
|
|
|
lfo: dist niouze
|
2011-03-12 03:39:59 +01:00
|
|
|
rsync -av --delete . \
|
|
|
|
/home/gilles/public_html/www.linux-france.org/html/prj/$(TARGET)/
|
|
|
|
sh ~/memo/lfo-rsync
|
|
|
|
|
2011-03-12 03:43:43 +01:00
|
|
|
|
2011-03-12 03:43:54 +01:00
|
|
|
niouze: VERSION
|
|
|
|
. memo && lfo_announce
|
2011-03-12 03:44:21 +01:00
|
|
|
. memo && fm_announce
|