2011-03-12 03:39:59 +01:00
|
|
|
|
2011-03-12 03:45:04 +01:00
|
|
|
# $Id: Makefile,v 1.57 2011/01/12 00:59:12 gilles Exp gilles $
|
2011-03-12 03:39:59 +01:00
|
|
|
|
|
|
|
.PHONY: help usage all
|
|
|
|
|
|
|
|
help: usage
|
|
|
|
|
|
|
|
usage:
|
2011-03-12 03:44:57 +01:00
|
|
|
@echo " imapsync $(VERSION), You can do :"
|
2011-03-12 03:44:47 +01:00
|
|
|
@echo "make install # as root"
|
|
|
|
@echo "make testf # run tests"
|
|
|
|
@echo "make testv # run tests verbosely"
|
2011-03-12 03:44:51 +01:00
|
|
|
@echo "make test3xx # run tests with (last) Mail-IMAPClient-3.xy"
|
2011-03-12 03:44:47 +01:00
|
|
|
@echo "make test229 # run tests with Mail-IMAPClient-2.2.9"
|
2011-03-12 03:45:04 +01:00
|
|
|
@echo "make tests_win32 # run tests on win32"
|
2011-03-12 03:44:47 +01:00
|
|
|
@echo "make all "
|
2011-03-12 03:44:59 +01:00
|
|
|
@echo "make upload_index"
|
2011-03-12 03:45:00 +01:00
|
|
|
@echo "make imapsync.exe"
|
2011-03-12 03:45:04 +01:00
|
|
|
@echo "make imapsync_elf_x86.bin"
|
2011-03-12 03:45:00 +01:00
|
|
|
|
2011-03-12 03:39:59 +01:00
|
|
|
|
2011-03-12 03:44:57 +01:00
|
|
|
DIST_NAME=imapsync-$(VERSION)
|
|
|
|
DIST_FILE=$(DIST_NAME).tgz
|
|
|
|
DEB_FILE=$(DIST_NAME).deb
|
|
|
|
VERSION=$(shell perl -I./Mail-IMAPClient-2.2.9 ./imapsync --version)
|
|
|
|
|
|
|
|
|
2011-03-12 03:45:04 +01:00
|
|
|
all: ChangeLog README VERSION
|
2011-03-12 03:39:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
testp :
|
2011-03-12 03:44:57 +01:00
|
|
|
perl -c imapsync
|
2011-03-12 03:39:59 +01:00
|
|
|
|
2011-03-12 03:44:57 +01:00
|
|
|
ChangeLog: imapsync
|
|
|
|
rlog imapsync > ChangeLog
|
2011-03-12 03:39:59 +01:00
|
|
|
|
2011-03-12 03:44:57 +01:00
|
|
|
README: imapsync
|
|
|
|
perldoc -t imapsync > README
|
2011-03-12 03:39:59 +01:00
|
|
|
|
2011-03-12 03:45:02 +01:00
|
|
|
VERSION: imapsync
|
2011-03-12 03:44:57 +01:00
|
|
|
perl -I./Mail-IMAPClient-2.2.9 ./imapsync --version > VERSION
|
2011-03-12 03:40:54 +01:00
|
|
|
|
2011-03-12 03:45:02 +01:00
|
|
|
|
2011-03-12 03:39:59 +01:00
|
|
|
.PHONY: clean clean_tilde clean_test
|
|
|
|
|
2011-03-12 03:44:47 +01:00
|
|
|
clean: clean_tilde clean_man
|
2011-03-12 03:39:59 +01:00
|
|
|
|
|
|
|
clean_test:
|
2011-03-12 03:44:48 +01:00
|
|
|
rm -f .test .test_3xx .test_229
|
2011-03-12 03:39:59 +01:00
|
|
|
|
|
|
|
clean_tilde:
|
|
|
|
rm -f *~
|
|
|
|
|
2011-03-12 03:44:29 +01:00
|
|
|
.PHONY: install dist man
|
2011-03-12 03:39:59 +01:00
|
|
|
|
2011-03-12 03:44:57 +01:00
|
|
|
man: imapsync.1
|
2011-03-12 03:44:29 +01:00
|
|
|
|
|
|
|
clean_man:
|
2011-03-12 03:44:57 +01:00
|
|
|
rm -f imapsync.1
|
2011-03-12 03:44:29 +01:00
|
|
|
|
2011-03-12 03:44:57 +01:00
|
|
|
imapsync.1: imapsync
|
|
|
|
pod2man imapsync > imapsync.1
|
2011-03-12 03:44:29 +01:00
|
|
|
|
2011-03-12 03:44:57 +01:00
|
|
|
install: testp imapsync.1
|
2011-03-12 03:45:04 +01:00
|
|
|
install imapsync $(DESTDIR)/usr/bin/imapsync
|
|
|
|
install imapsync.1 $(DESTDIR)/usr/share/man/man1/imapsync.1
|
2011-03-12 03:44:57 +01:00
|
|
|
chmod 755 $(DESTDIR)/usr/bin/imapsync
|
2011-03-12 03:39:59 +01:00
|
|
|
|
2011-03-12 03:44:29 +01:00
|
|
|
|
2011-03-12 03:44:13 +01:00
|
|
|
deb:
|
|
|
|
echo making debball $(DEB_FILE)
|
|
|
|
mkdir -p ../prepa_deb
|
2011-03-12 03:44:48 +01:00
|
|
|
cd ../prepa_deb && tar xzvf ../prepa_dist/$(DIST_FILE) &&\
|
2011-03-12 03:44:13 +01:00
|
|
|
cd ../prepa_dist/$(DIST_NAME)
|
|
|
|
|
2011-03-12 03:45:04 +01:00
|
|
|
.PHONY: cidone
|
2011-03-12 03:39:59 +01:00
|
|
|
|
|
|
|
cidone:
|
|
|
|
rcsdiff RCS/*
|
|
|
|
|
2011-03-12 03:45:04 +01:00
|
|
|
###############
|
2011-03-12 03:39:59 +01:00
|
|
|
# Local goals
|
2011-03-12 03:45:04 +01:00
|
|
|
###############
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: test tests testp testf test3xx
|
|
|
|
|
|
|
|
test_quick : test_quick_229 test_quick_3xx
|
|
|
|
|
|
|
|
test_quick_229: imapsync tests.sh
|
|
|
|
CMD_PERL='perl -I./Mail-IMAPClient-2.2.9' /usr/bin/time sh tests.sh locallocal 1>/dev/null
|
|
|
|
|
|
|
|
test_quick_3xx: imapsync tests.sh
|
|
|
|
CMD_PERL='perl -I./Mail-IMAPClient-3.25/lib' /usr/bin/time sh tests.sh locallocal 1>/dev/null
|
|
|
|
|
|
|
|
testv:
|
|
|
|
nice -40 sh -x tests.sh
|
|
|
|
|
|
|
|
test: .test_229 .test_3xx
|
|
|
|
|
|
|
|
tests: test
|
|
|
|
|
|
|
|
test3xx: .test_3xx
|
|
|
|
|
|
|
|
test229: .test_229
|
|
|
|
|
|
|
|
.test_229: imapsync tests.sh
|
|
|
|
CMD_PERL='perl -I./Mail-IMAPClient-2.2.9' /usr/bin/time sh tests.sh 1>/dev/null
|
|
|
|
touch .test_229
|
|
|
|
|
|
|
|
.test_3xx: imapsync tests.sh
|
|
|
|
CMD_PERL='perl -I./Mail-IMAPClient-3.25/lib' /usr/bin/time sh tests.sh 1>/dev/null
|
|
|
|
touch .test_3xx
|
|
|
|
|
|
|
|
testf: clean_test test
|
2011-03-12 03:39:59 +01:00
|
|
|
|
2011-03-12 03:45:04 +01:00
|
|
|
.PHONY: lfo upload_lfo niouze_lfo niouze_fm public imapsync_cidone
|
2011-03-12 03:44:57 +01:00
|
|
|
|
2011-03-12 03:45:02 +01:00
|
|
|
upload_index: index.shtml
|
|
|
|
rcsdiff index.shtml
|
2011-03-12 03:44:57 +01:00
|
|
|
rsync -avH index.shtml \
|
2011-03-12 03:45:02 +01:00
|
|
|
../../public_html/www.linux-france.org/html/prj/imapsync/
|
|
|
|
sh $(HOME)/memo/lfo-rsync
|
2011-03-12 03:44:57 +01:00
|
|
|
|
2011-03-12 03:45:00 +01:00
|
|
|
.dosify_bat: build_exe.bat test_exe.bat test.bat
|
|
|
|
unix2dos build_exe.bat test.bat test_exe.bat
|
|
|
|
touch .dosify_bat
|
|
|
|
|
|
|
|
dosify_bat: .dosify_bat
|
|
|
|
|
2011-03-12 03:45:02 +01:00
|
|
|
copy_win32:
|
|
|
|
scp imapsync Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
|
|
|
|
|
|
|
|
tests_win32: dosify_bat
|
|
|
|
scp imapsync test.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
|
2011-03-12 03:45:04 +01:00
|
|
|
# ssh Admin@c 'perl C:/msys/1.0/home/Admin/imapsync/imapsync --tests_debug'
|
|
|
|
ssh Admin@c 'perl C:/msys/1.0/home/Admin/imapsync/imapsync --tests'
|
|
|
|
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test.bat'
|
2011-03-12 03:45:02 +01:00
|
|
|
# ssh Admin@c 'tasklist /FI "PID eq 0"'
|
|
|
|
# ssh Admin@c 'tasklist /NH /FO CSV'
|
|
|
|
|
2011-03-12 03:45:00 +01:00
|
|
|
test_imapsync_exe: dosify_bat
|
|
|
|
scp test_exe.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
|
|
|
|
time ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_exe.bat'
|
|
|
|
|
2011-03-12 03:45:04 +01:00
|
|
|
|
|
|
|
imapsync.exe: imapsync build_exe.bat test_exe.bat .dosify_bat
|
|
|
|
rcsdiff imapsync
|
|
|
|
ssh Admin@c 'perl -V'
|
2011-03-12 03:45:02 +01:00
|
|
|
(date "+%s"| tr "\n" " "; echo -n "BEGIN " $(VERSION) ": "; date) >> .BUILD_EXE_TIME
|
2011-03-12 03:45:00 +01:00
|
|
|
scp imapsync build_exe.bat test_exe.bat \
|
|
|
|
Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
|
2011-03-12 03:45:04 +01:00
|
|
|
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/build_exe.bat'
|
|
|
|
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_exe.bat'
|
2011-03-12 03:45:00 +01:00
|
|
|
scp Admin@c:'C:/msys/1.0/home/Admin/imapsync/imapsync.exe' .
|
2011-03-12 03:45:02 +01:00
|
|
|
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/imapsync.exe --version' > VERSION_EXE
|
2011-03-12 03:45:02 +01:00
|
|
|
(date "+%s"| tr "\n" " "; echo -n "END " $(VERSION) ": "; date) >> .BUILD_EXE_TIME
|
|
|
|
|
2011-03-12 03:44:29 +01:00
|
|
|
|
2011-03-12 03:45:04 +01:00
|
|
|
# vadrouille or petite
|
|
|
|
imapsync_elf_x86.bin: imapsync
|
|
|
|
rcsdiff imapsync
|
|
|
|
{ test 'vadrouille' = "`hostname`" && \
|
|
|
|
pp -o imapsync_elf_x86.bin -I Mail-IMAPClient-3.25/lib \
|
|
|
|
-M Mail::IMAPClient -M IO::Socket -M IO::Socket::SSL \
|
|
|
|
-M Digest::MD5 -M Digest::HMAC_MD5 -M Term::ReadKey \
|
|
|
|
-M Authen::NTLM \
|
|
|
|
imapsync ; \
|
|
|
|
} || :
|
|
|
|
{ test 'petite' = "`hostname`" && \
|
|
|
|
pp -o imapsync_elf_x86.bin -I Mail-IMAPClient-3.25/lib \
|
|
|
|
-M Mail::IMAPClient -M IO::Socket -M IO::Socket::SSL \
|
|
|
|
-M Digest::MD5 -M Digest::HMAC_MD5 -M Term::ReadKey \
|
|
|
|
-M Authen::NTLM \
|
|
|
|
-M Tie::Hash::NamedCapture \
|
|
|
|
-a '/usr/lib/perl/5.10.0/auto/POSIX/SigAction;auto/POSIX/SigAction' \
|
|
|
|
imapsync ; \
|
|
|
|
} || :
|
|
|
|
{ test 'ks200821.kimsufi.com' = "`hostname`" && \
|
|
|
|
pp -o imapsync_elf_x86.bin -I Mail-IMAPClient-3.25/lib \
|
|
|
|
-M Mail::IMAPClient -M IO::Socket -M IO::Socket::SSL \
|
|
|
|
-M Digest::MD5 -M Digest::HMAC_MD5 -M Term::ReadKey \
|
|
|
|
-M Authen::NTLM \
|
|
|
|
-M Tie::Hash::NamedCapture \
|
|
|
|
-a '/usr/lib/perl/5.10.1/auto/POSIX/SigAction;auto/POSIX/SigAction' \
|
|
|
|
imapsync ; \
|
|
|
|
} || :
|
|
|
|
./imapsync_elf_x86.bin
|
|
|
|
|
|
|
|
|
|
|
|
lfo: cidone niouze_lfo upload_lfo
|
|
|
|
|
|
|
|
dist: cidone test clean all INSTALL tarball
|
|
|
|
|
|
|
|
tarball: cidone all imapsync_elf_x86.bin imapsync.exe
|
|
|
|
echo making tarball $(DIST_FILE)
|
|
|
|
mkdir -p dist
|
|
|
|
mkdir -p ../prepa_dist/$(DIST_NAME)
|
|
|
|
rsync -aCv --delete --omit-dir-times --exclude dist/ ./ ../prepa_dist/$(DIST_NAME)/
|
|
|
|
rsync -av ./imapsync.exe ../prepa_dist/$(DIST_NAME)/
|
|
|
|
cd ../prepa_dist && (tar czfv $(DIST_FILE) $(DIST_NAME) || tar czfv $(DIST_FILE) $(DIST_NAME))
|
|
|
|
#ln -f ../prepa_dist/$(DIST_FILE) dist/
|
|
|
|
cd ../prepa_dist && md5sum $(DIST_FILE) > $(DIST_FILE).md5.txt
|
|
|
|
cd ../prepa_dist && md5sum -c $(DIST_FILE).md5.txt
|
|
|
|
ls -l ../prepa_dist/$(DIST_FILE)
|
|
|
|
|
|
|
|
|
|
|
|
upload_lfo:
|
|
|
|
#rm -rf /home/gilles/public_html/www.linux-france.org/html/prj/imapsync/
|
|
|
|
#rm -rf /home/gilles/public_html/www.linux-france.org/ftp/prj/imapsync/
|
|
|
|
rsync -avH ./ChangeLog ./COPYING ./CREDITS ./FAQ \
|
|
|
|
./index.shtml ./INSTALL \
|
|
|
|
./logo_imapsync.png ./logo_imapsync_s.png \
|
|
|
|
./paypal.shtml ./README ./style.css ./TODO ./VERSION ./VERSION_EXE \
|
2011-03-12 03:44:57 +01:00
|
|
|
/home/gilles/public_html/www.linux-france.org/html/prj/imapsync/
|
2011-03-12 03:45:04 +01:00
|
|
|
rsync -avH ./dist/index.shtml \
|
|
|
|
/home/gilles/public_html/www.linux-france.org/html/prj/imapsync/dist/
|
2011-03-12 03:39:59 +01:00
|
|
|
sh ~/memo/lfo-rsync
|
|
|
|
|
2011-03-12 03:44:32 +01:00
|
|
|
niouze_lfo : VERSION
|
2011-03-12 03:45:04 +01:00
|
|
|
echo "CORRECT ME: . ./memo && lfo_announce"
|
2011-03-12 03:44:32 +01:00
|
|
|
|
2011-03-12 03:44:50 +01:00
|
|
|
niouze_fm: VERSION
|
2011-03-12 03:45:02 +01:00
|
|
|
. ./memo && fm_announce
|
2011-03-12 03:44:29 +01:00
|
|
|
|
|
|
|
|
2011-03-12 03:44:50 +01:00
|
|
|
public: niouze_fm
|