2011-03-12 03:39:59 +01:00
|
|
|
|
2011-06-14 12:59:46 +02:00
|
|
|
# $Id: Makefile,v 1.72 2011/05/09 00:11:00 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:45:06 +01:00
|
|
|
@echo "make tests_win32_dev # run test2.bat 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:06 +01:00
|
|
|
mkdir -p $(DESTDIR)/usr/bin
|
2011-03-12 03:45:04 +01:00
|
|
|
install imapsync $(DESTDIR)/usr/bin/imapsync
|
2011-03-12 03:44:57 +01:00
|
|
|
chmod 755 $(DESTDIR)/usr/bin/imapsync
|
2011-03-12 03:45:06 +01:00
|
|
|
mkdir -p $(DESTDIR)/usr/share/man/man1
|
|
|
|
install imapsync.1 $(DESTDIR)/usr/share/man/man1/imapsync.1
|
|
|
|
chmod 644 $(DESTDIR)/usr/share/man/man1/imapsync.1
|
2011-03-12 03:39:59 +01:00
|
|
|
|
2011-03-12 03:45:06 +01:00
|
|
|
.PHONY: cidone ci
|
2011-03-12 03:44:29 +01:00
|
|
|
|
2011-03-12 03:45:06 +01:00
|
|
|
ci: 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
|
2011-04-24 23:19:36 +02:00
|
|
|
CMD_PERL='perl -I./Mail-IMAPClient-3.28/lib' /usr/bin/time sh tests.sh locallocal 1>/dev/null
|
2011-03-12 03:45:04 +01:00
|
|
|
|
|
|
|
testv:
|
2011-06-14 12:59:46 +02:00
|
|
|
sh -x tests.sh
|
|
|
|
|
|
|
|
testv3:
|
|
|
|
CMD_PERL='perl -I./Mail-IMAPClient-3.28/lib' sh -x tests.sh
|
2011-03-12 03:45:04 +01:00
|
|
|
|
|
|
|
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
|
2011-04-24 23:19:36 +02:00
|
|
|
CMD_PERL='perl -I./Mail-IMAPClient-3.28/lib' /usr/bin/time sh tests.sh 1>/dev/null
|
2011-03-12 03:45:04 +01:00
|
|
|
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:06 +01:00
|
|
|
.dosify_bat: build_exe.bat test_exe.bat test.bat test2.bat
|
|
|
|
unix2dos build_exe.bat test.bat test_exe.bat test2.bat
|
2011-03-12 03:45:00 +01:00
|
|
|
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:06 +01:00
|
|
|
tests_win32_dev: dosify_bat
|
|
|
|
scp imapsync test2.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
|
|
|
|
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test2.bat'
|
|
|
|
|
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`" && \
|
2011-04-24 23:19:36 +02:00
|
|
|
pp -o imapsync_elf_x86.bin -I Mail-IMAPClient-3.28/lib \
|
2011-03-12 03:45:04 +01:00
|
|
|
-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`" && \
|
2011-04-24 23:19:36 +02:00
|
|
|
pp -o imapsync_elf_x86.bin -I Mail-IMAPClient-3.28/lib \
|
2011-03-12 03:45:04 +01:00
|
|
|
-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`" && \
|
2011-04-24 23:19:36 +02:00
|
|
|
pp -o imapsync_elf_x86.bin -I Mail-IMAPClient-3.28/lib \
|
2011-03-12 03:45:04 +01:00
|
|
|
-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
|
|
|
|
|
2011-04-24 23:19:36 +02:00
|
|
|
tarball: cidone all imapsync.exe
|
2011-03-12 03:45:04 +01:00
|
|
|
echo making tarball $(DIST_FILE)
|
|
|
|
mkdir -p dist
|
|
|
|
mkdir -p ../prepa_dist/$(DIST_NAME)
|
2011-06-14 12:59:46 +02:00
|
|
|
rsync -aCv --delete --omit-dir-times --exclude dist/ --exclude imapsync.exe ./ ../prepa_dist/$(DIST_NAME)/
|
|
|
|
#rsync -av ./imapsync.exe ../prepa_dist/$(DIST_NAME)/
|
2011-03-12 03:45:04 +01:00
|
|
|
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)
|
|
|
|
|
2011-03-12 03:45:06 +01:00
|
|
|
ks:
|
2011-06-14 12:59:46 +02:00
|
|
|
rsync -avz --delete . imapsync@ks.lamiral.info:public_html/imapsync
|
2011-03-12 03:45:06 +01:00
|
|
|
{ cd /g/var/paypal_reply/ &&\
|
|
|
|
rsync -av url_exe url_release url_source imapsync@ks.lamiral.info:/g/var/paypal_reply/ \
|
|
|
|
; }
|
2011-03-12 03:45:04 +01:00
|
|
|
|
2011-04-24 23:19:36 +02:00
|
|
|
|
|
|
|
PUBLIC_FILES = ./ChangeLog ./COPYING ./CREDITS ./FAQ \
|
|
|
|
./index.shtml ./INSTALL ./TIME \
|
|
|
|
./logo_imapsync.png ./logo_imapsync_s.png \
|
|
|
|
./paypal.shtml ./paypal_return.shtml ./paypal_return_support.shtml \
|
|
|
|
./README ./style.css ./TODO ./VERSION ./VERSION_EXE
|
|
|
|
|
|
|
|
upload_ks:
|
|
|
|
rsync -lptvHz $(PUBLIC_FILES) \
|
|
|
|
root@ks.lamiral.info:/var/www/imapsync/
|
|
|
|
rsync -lptvHz ./dist/index.shtml \
|
|
|
|
root@ks.lamiral.info:/var/www/imapsync/dist/
|
|
|
|
|
2011-03-12 03:45:04 +01:00
|
|
|
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/
|
2011-04-24 23:19:36 +02:00
|
|
|
rsync -avH $(PUBLIC_FILES) \
|
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-04-24 23:19:36 +02:00
|
|
|
upload_index: index.shtml
|
|
|
|
validate --verbose index.shtml
|
|
|
|
rcsdiff index.shtml
|
|
|
|
rsync -avH index.shtml \
|
|
|
|
../../public_html/www.linux-france.org/html/prj/imapsync/
|
|
|
|
sh $(HOME)/memo/lfo-rsync
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
niouze_lfo :
|
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
|