1
0
mirror of https://github.com/imapsync/imapsync.git synced 2024-11-17 00:02:29 +01:00
imapsync/Makefile

661 lines
22 KiB
Makefile
Raw Normal View History

2011-03-12 03:39:59 +01:00
2017-09-23 23:54:48 +02:00
# $Id: Makefile,v 1.257 2017/09/11 11:11:18 gilles Exp gilles $
2011-03-12 03:39:59 +01:00
2016-01-22 17:52:28 +01:00
.PHONY: help usage all doc
2011-03-12 03:39:59 +01:00
help: usage
usage:
2011-03-12 03:44:57 +01:00
@echo " imapsync $(VERSION), You can do :"
2015-05-28 19:04:57 +02:00
@echo "make testp # it shows needed Perl modules from your distro or CPAN"
2011-03-12 03:44:47 +01:00
@echo "make install # as root"
2014-02-13 18:34:20 +01:00
@echo ""
@echo "All other goals are for the upstream developper"
2011-03-12 03:44:47 +01:00
@echo "make testf # run tests"
@echo "make testv # run tests verbosely"
2011-06-14 13:02:33 +02:00
@echo "make test_quick # few tests verbosely"
2015-05-28 19:04:57 +02:00
@echo "make W/test.bat # run --tests and W/test.bat on win32"
@echo "make W/test_tests.bat # run --tests on win32"
2017-09-23 23:54:48 +02:00
@echo "make W/test_testsdebug.bat # run --testsdebug on win32"
2014-11-19 23:16:16 +01:00
@echo "make W/test2.bat # run W/test2.bat on win32"
@echo "make W/test3.bat # run W/test3.bat on win32"
2015-08-04 03:44:40 +02:00
@echo "make W/test_reg.bat # run W/test_reg.bat on win32"
2016-09-19 17:17:24 +02:00
@echo "make W/test_exe.bat # run W/test_exe.bat on win32"
2017-09-23 23:54:48 +02:00
@echo "make W/test_exe_tests.bat # run W/test_exe_tests.bat on win32"
2014-11-19 23:16:16 +01:00
@echo "make W/test_exe_2.bat # run W/test_exe_2.bat on win32"
2015-12-03 18:16:32 +01:00
@echo "make examples/sync_loop_windows.bat # run examples/sync_loop_windows.bat on win32"
@echo "make win32_prereq # run W/install_modules.bat on win32"
@echo "make win32_update_ssl # run W/install_module_ssl.bat on win32"
2011-03-12 03:44:47 +01:00
@echo "make all "
2014-11-19 23:16:16 +01:00
@echo "make upload_tests # upload tests.sh"
2011-03-12 03:44:59 +01:00
@echo "make upload_index"
2016-09-19 17:17:24 +02:00
@echo "make upload_FAQ # upload FAQs and documentation"
2017-09-23 23:54:48 +02:00
@echo "make upload_X # upload online UI"
2016-09-19 17:17:24 +02:00
@echo "make upload_latest # upload latest imapsync and binaries (dev)"
2017-09-23 23:54:48 +02:00
@echo "make upload_cgi # upload latest imapsync"
2014-11-19 23:08:41 +01:00
@echo "make valid_index # check index.shtml for good syntax"
2011-09-25 22:31:48 +02:00
@echo "make upload_ks"
2011-03-12 03:45:00 +01:00
@echo "make imapsync.exe"
2016-09-19 17:17:24 +02:00
@echo "make bin # build mac & win & linux binaries"
@echo "make mac # build mac binary"
@echo "make win # build win binary"
@echo "make lin # build linux binary"
2012-04-17 00:26:18 +02:00
@echo "make publish"
2017-09-23 23:54:48 +02:00
@echo "make crit # run perlcritic on imapsync"
2015-05-28 19:04:57 +02:00
@echo "make prereq # Generates W/prereq.*"
2016-09-19 17:17:24 +02:00
@echo "make cl # Check links of index.shtml"
2017-09-23 23:54:48 +02:00
@echo "make cle # Check links of S/*.shtml"
@echo "make mactestsdebug # run ./imapsync --testsdebug on Mac"
@echo "make mactests # run ./imapsync --tests on Mac"
@echo "make ks2testsdebug # run ./imapsync --testsdebug on ks2"
@echo "make ks2tests # run ./imapsync --tests on ks2"
2011-03-12 03:45:00 +01:00
2013-05-21 00:04:57 +02:00
PREFIX ?= /usr
2011-03-12 03:44:57 +01:00
DIST_NAME=imapsync-$(VERSION)
DIST_FILE=$(DIST_NAME).tgz
DEB_FILE=$(DIST_NAME).deb
2012-04-17 00:26:18 +02:00
2014-05-30 03:56:21 +02:00
VERSION=$(shell perl -I$(IMAPClient) ./imapsync --version 2>/dev/null || cat VERSION)
2016-09-19 17:17:24 +02:00
VERSION_PREVIOUS=$(shell perl -I$(IMAPClient) ./dist/imapsync --version 2>/dev/null || echo ERROR)
2011-06-14 13:04:24 +02:00
VERSION_EXE=$(shell cat ./VERSION_EXE)
HELLO=$(shell date;uname -a)
2017-09-23 23:54:48 +02:00
IMAPClient_3xx=./W/Mail-IMAPClient-3.39/lib
2012-04-17 00:26:18 +02:00
IMAPClient=$(IMAPClient_3xx)
2011-06-14 13:04:24 +02:00
2015-08-04 03:44:40 +02:00
HOSTNAME = $(shell hostname -s)
ARCH = $(shell uname -m)
KERNEL = $(shell uname -s)
BIN_NAME = imapsync_bin_$(KERNEL)_$(ARCH)
2017-09-23 23:54:48 +02:00
DISTRO_NAME = $(shell lsb_release -i -s || echo Unknown)
DISTRO_RELEASE = $(shell lsb_release -r -s || echo 0.0)
DISTRO_CODE = $(shell lsb_release -c -s || echo Unknown)
DISTRO = $(DISTRO_NAME)_$(DISTRO_RELEASE)_$(DISTRO_CODE)
2015-08-04 03:44:40 +02:00
2011-06-14 13:04:24 +02:00
hello:
2015-08-04 03:44:40 +02:00
@echo "$(VERSION)"
@echo "$(IMAPClient)"
@echo "$(HOSTNAME)"
@echo "$(ARCH)"
@echo "$(KERNEL)"
@echo "$(BIN_NAME)"
2017-09-23 23:54:48 +02:00
@echo "$(DISTRO)"
2011-03-12 03:44:57 +01:00
2016-09-19 17:17:24 +02:00
all: doc VERSION biz prereq allcritic bin VERSION_EXE
2011-03-12 03:39:59 +01:00
testp :
2015-05-28 19:04:57 +02:00
sh INSTALL.d/prerequisites_imapsync
@perl -c imapsync || { echo; echo "Read the INSTALL file to solve Perl module dependencies!"; exit 1; }
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
2017-09-23 23:54:48 +02:00
pod2text --loose imapsync > README
2015-05-28 19:04:57 +02:00
2011-03-12 03:45:02 +01:00
VERSION: imapsync
2017-09-23 23:54:48 +02:00
rcsdiff imapsync
2012-09-03 02:08:57 +02:00
perl -I./$(IMAPClient) ./imapsync --version > ./VERSION
touch -r ./imapsync ./VERSION
2011-03-12 03:40:54 +01:00
2015-05-28 19:04:57 +02:00
VERSION_EXE: imapsync
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/imapsync.exe --version' > ./VERSION_EXE
dos2unix ./VERSION_EXE
touch -r ./imapsync ./VERSION_EXE
2016-01-22 17:52:28 +01:00
doc/GOOD_PRACTICES.html: doc/GOOD_PRACTICES.t2t
txt2tags -i doc/GOOD_PRACTICES.t2t -t html --toc -o doc/GOOD_PRACTICES.html
2017-09-23 23:54:48 +02:00
./W/tools/validate_html4 doc/GOOD_PRACTICES.html
./W/tools/validate doc/GOOD_PRACTICES.html
2011-03-12 03:45:02 +01:00
2016-01-22 17:52:28 +01:00
doc/TUTORIAL_Unix.html: doc/TUTORIAL_Unix.t2t
txt2tags -i doc/TUTORIAL_Unix.t2t -t html --toc -o doc/TUTORIAL_Unix.html
2017-09-23 23:54:48 +02:00
./W/tools/validate_html4 doc/TUTORIAL_Unix.html
./W/tools/validate doc/TUTORIAL_Unix.html
2013-09-26 23:59:52 +02:00
2017-09-23 23:54:48 +02:00
doc: README ChangeLog doc/TUTORIAL_Unix.html doc/GOOD_PRACTICES.html W/imapsync.1
2013-09-26 23:59:52 +02:00
2017-09-23 23:54:48 +02:00
.PHONY: clean clean_tilde clean_test doc clean_log clean_bak clean_permissions
2011-03-12 03:39:59 +01:00
2017-09-23 23:54:48 +02:00
clean: clean_tilde clean_man clean_log clean_bak clean_permissions
clean_permissions:
chmod a-x Makefile FAQ.d/FAQ.*.txt README_Windows.txt
chmod a-x INSTALL.d/INSTALL.*.txt
chmod a-x X/progress.html X/imapsync_form.html
chmod a-x S/*.shtml S/*.html
chmod a-x doc/*.t2t dist/*.txt
2011-03-12 03:39:59 +01:00
clean_test:
2013-04-22 21:50:50 +02:00
rm -f .test_3xx
2011-03-12 03:39:59 +01:00
clean_tilde:
2017-09-23 23:54:48 +02:00
rm -f *~ W/*~ FAQ.d/*~ S/*~ INSTALL.d/*~ examples/*~
2011-03-12 03:39:59 +01:00
2014-05-30 03:56:21 +02:00
clean_log:
rm -f LOG_imapsync/*.txt
rm -f examples/LOG_imapsync/*.txt
2016-01-22 17:52:28 +01:00
clean_bak:
2016-09-19 17:15:41 +02:00
rm -f index.shtml.bak ./S/style.css.bak
2016-01-22 17:52:28 +01:00
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
2015-05-28 19:04:57 +02:00
W/imapsync.1: imapsync
pod2man imapsync > W/imapsync.1
2011-03-12 03:44:29 +01:00
2015-05-28 19:04:57 +02:00
install: testp W/imapsync.1
mkdir -p $(DESTDIR)$(PREFIX)/bin
install imapsync $(DESTDIR)$(PREFIX)/bin/imapsync
chmod 755 $(DESTDIR)$(PREFIX)/bin/imapsync
mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1
2015-05-28 19:04:57 +02:00
install W/imapsync.1 $(DESTDIR)$(PREFIX)/share/man/man1/imapsync.1
chmod 644 $(DESTDIR)$(PREFIX)/share/man/man1/imapsync.1
2011-03-12 03:39:59 +01:00
2015-05-28 19:04:57 +02:00
2014-02-13 18:34:20 +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:
2016-09-19 17:17:24 +02:00
rcsdiff W/*.bat W/*.sh W/*.out W/*.txt W/*.htaccess
2016-01-22 17:52:28 +01:00
rcsdiff doc/*.t2t
2015-12-03 18:16:32 +01:00
rcsdiff INSTALL.d/*.txt INSTALL.d/prerequisites_imapsync
2016-09-19 17:15:41 +02:00
rcsdiff FAQ.d/*.txt
2015-12-03 18:16:32 +01:00
rcsdiff examples/*.sh examples/*.bat examples/*.txt
2016-01-22 17:52:28 +01:00
rcsdiff RCS/*
2017-09-23 23:54:48 +02:00
rcsdiff W/tools/backup_old_dist W/tools/gen_README_dist W/tools/validate_html4 W/tools/validate_xml_html5 W/tools/fix_email_for_exchange.py
rcsdiff S/*.txt S/*.shtml S/*.html
2011-03-12 03:39:59 +01:00
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
###############
2017-09-23 23:54:48 +02:00
.PHONY: prereq test tests unitests testp testf test3xx testv3 perlcritic allcritic crit compok dev
dev: test crit bin
docker:
ssh ks3 'cd docker/imapsync && . memo'
2016-09-19 17:17:24 +02:00
compok: W/.compok
W/.compok: imapsync
perl -c imapsync
touch W/.compok
2015-05-28 19:04:57 +02:00
2017-09-23 23:54:48 +02:00
prereq: W/prereq.scandeps.$(DISTRO).txt
2015-05-28 19:04:57 +02:00
2017-09-23 23:54:48 +02:00
W/prereq.scandeps.$(DISTRO).txt: INSTALL.d/prerequisites_imapsync imapsync
scandeps -c -x imapsync | tee W/prereq.scandeps.$(DISTRO).txt
rcsdiff W/prereq.scandeps.$(DISTRO).txt || { echo 'rcsdiff detected a diff' | ci -l W/prereq.scandeps.$(DISTRO).txt ; }
./INSTALL.d/prerequisites_imapsync | tee W/prereq.$(DISTRO).txt
2015-05-28 19:04:57 +02:00
2011-03-12 03:45:04 +01:00
2017-09-23 23:54:48 +02:00
crit: allcritic
2013-07-25 23:42:01 +02:00
2015-12-03 18:16:32 +01:00
perlcritic: W/perlcritic_3.out W/perlcritic_2.out
allcritic: W/perlcritic_4.out W/perlcritic_3.out W/perlcritic_2.out W/perlcritic_1.out
2013-07-25 23:42:01 +02:00
2016-09-19 17:17:24 +02:00
W/perlcritic_1.out: imapsync W/.compok
2017-09-23 23:54:48 +02:00
perlcritic --statistics -1 imapsync > W/perlcritic_1.out.tmp || :
mv W/perlcritic_1.out.tmp W/perlcritic_1.out
2015-12-03 18:16:32 +01:00
echo | ci -l W/perlcritic_1.out
2013-07-25 23:42:01 +02:00
2016-09-19 17:17:24 +02:00
W/perlcritic_2.out: imapsync W/.compok
2017-09-23 23:54:48 +02:00
perlcritic --statistics -2 imapsync > W/perlcritic_2.out.tmp || :
mv W/perlcritic_2.out.tmp W/perlcritic_2.out
2015-12-03 18:16:32 +01:00
echo | ci -l W/perlcritic_2.out
2013-07-25 23:42:01 +02:00
2016-09-19 17:17:24 +02:00
W/perlcritic_3.out: imapsync W/.compok
2017-09-23 23:54:48 +02:00
perlcritic --statistics -3 imapsync > W/perlcritic_3.out.tmp || :
mv W/perlcritic_3.out.tmp W/perlcritic_3.out
2015-12-03 18:16:32 +01:00
echo | ci -l W/perlcritic_3.out
2016-09-19 17:17:24 +02:00
W/perlcritic_4.out: imapsync W/.compok
2017-09-23 23:54:48 +02:00
perlcritic --statistics -4 imapsync > W/perlcritic_4.out.tmp || :
mv W/perlcritic_4.out.tmp W/perlcritic_4.out
2015-12-03 18:16:32 +01:00
echo | ci -l W/perlcritic_4.out
2011-03-12 03:45:04 +01:00
2013-04-22 21:50:50 +02:00
test_quick : test_quick_3xx
2011-03-12 03:45:04 +01:00
test_quick_3xx: imapsync tests.sh
2012-04-17 00:26:18 +02:00
CMD_PERL='perl -I./$(IMAPClient_3xx)' /usr/bin/time sh -x tests.sh locallocal
2011-03-12 03:45:04 +01:00
2012-12-29 01:43:39 +01:00
testv3: imapsync tests.sh
2012-11-27 23:32:36 +01:00
CMD_PERL='perl -I./$(IMAPClient_3xx)' /usr/bin/time sh tests.sh
2011-03-12 03:45:04 +01:00
2016-09-19 17:15:41 +02:00
2013-02-09 03:40:54 +01:00
testv: testv3
2012-11-27 23:32:36 +01:00
2013-02-09 03:40:54 +01:00
test: .test_3xx
2011-03-12 03:45:04 +01:00
tests: test
2017-09-23 23:54:48 +02:00
unitests:
perl -I./$(IMAPClient_3xx) ./imapsync --tests
2014-11-19 23:16:16 +01:00
# .test_3xx is created by tests.sh with success at all mandatory tests
2011-03-12 03:45:04 +01:00
.test_3xx: imapsync tests.sh
2012-04-17 00:26:18 +02:00
CMD_PERL='perl -I./$(IMAPClient_3xx)' /usr/bin/time sh tests.sh 1>/dev/null
2011-03-12 03:45:04 +01:00
testf: clean_test test
2011-03-12 03:39:59 +01:00
2014-11-19 23:16:16 +01:00
.PHONY: lfo upload_lfo dosify_bat public imapsync_cidone
2011-03-12 03:44:57 +01:00
2014-11-19 23:16:16 +01:00
dosify_bat:
2015-05-28 19:04:57 +02:00
unix2dos W/*.bat examples/*.bat
2011-03-12 03:45:00 +01:00
2011-03-12 03:45:02 +01:00
copy_win32:
scp imapsync Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
2015-05-28 19:04:57 +02:00
W/test.bat:
unix2dos W/test.bat
2012-09-03 02:08:57 +02:00
scp imapsync W/test.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
2016-09-19 17:17:24 +02:00
# ssh Admin@c 'perl C:/msys/1.0/home/Admin/imapsync/imapsync --testsdebug'
2011-03-12 03:45:04 +01:00
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'
2015-05-28 19:04:57 +02:00
W/test_tests.bat:
unix2dos W/test_tests.bat
scp imapsync W/test_tests.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_tests.bat'
2016-09-19 17:17:24 +02:00
./W/check_winerr test_tests.bat
W/test_testsdebug.bat:
unix2dos W/test_testsdebug.bat
scp imapsync W/test_testsdebug.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_testsdebug.bat'
./W/check_winerr test_testsdebug.bat
2015-05-28 19:04:57 +02:00
2015-12-03 18:16:32 +01:00
.PHONY: W/*.bat examples/*
2014-11-19 23:16:16 +01:00
2015-05-28 19:04:57 +02:00
2015-12-03 18:16:32 +01:00
examples/sync_loop_windows.bat:
unix2dos examples/sync_loop_windows.bat
scp imapsync examples/file.txt examples/sync_loop_windows.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/sync_loop_windows.bat --nodry --dry --nodry'
# ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/sync_loop_windows.bat '
2015-05-28 19:04:57 +02:00
2014-11-19 23:16:16 +01:00
W/test2.bat:
2015-05-28 19:04:57 +02:00
unix2dos W/test2.bat
2015-12-03 18:16:32 +01:00
scp imapsync W/test2.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
2011-03-12 03:45:06 +01:00
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test2.bat'
2015-08-04 03:44:40 +02:00
W/test3.bat:
2015-05-28 19:04:57 +02:00
unix2dos W/test3.bat
2013-07-06 00:26:28 +02:00
scp imapsync W/test3.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test3.bat'
2015-08-04 03:44:40 +02:00
W/test_reg.bat:
unix2dos W/test_reg.bat
scp imapsync W/test_reg.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_reg.bat'
2016-01-22 17:52:28 +01:00
W/test_xoauth2.bat:
unix2dos W/test_xoauth2.bat
scp imapsync W/test_xoauth2.bat /g/var/pass/imapsync-xoauth2-15f8456ad5b7_notasecret.p12 /fb/i/secret.xoauth2 Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_xoauth2.bat'
2014-11-19 23:16:16 +01:00
W/test_exe_2.bat:
2015-05-28 19:04:57 +02:00
unix2dos W/test_exe_2.bat
2014-11-19 23:16:16 +01:00
scp imapsync W/test_exe_2.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_exe_2.bat'
W/test3_gmail.bat:
2015-05-28 19:04:57 +02:00
unix2dos W/test3_gmail.bat
2014-11-19 23:16:16 +01:00
scp imapsync W/test3_gmail.bat /g/var/pass/secret.gilles_gmail Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test3_gmail.bat'
2016-09-19 17:17:24 +02:00
test_exe: W/test_exe.bat
W/test_exe.bat:
2015-05-28 19:04:57 +02:00
unix2dos W/test_exe.bat
2012-09-03 02:08:57 +02:00
scp W/test_exe.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
2015-12-03 18:16:32 +01:00
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_exe.bat'
2016-09-19 17:17:24 +02:00
./W/check_winerr test_exe.bat
2017-09-23 23:54:48 +02:00
W/test_exe_tests.bat:
unix2dos W/test_exe_tests.bat
scp W/test_exe_tests.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_exe_tests.bat'
./W/check_winerr test_exe_tests.bat
2016-09-19 17:17:24 +02:00
W/build_exe.bat:
unix2dos W/build_exe.bat
scp W/build_exe.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/build_exe.bat'
./W/check_winerr build_exe.bat
W/learn_func.bat:
unix2dos W/learn_func.bat
scp W/learn_func.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/learn_func.bat'
./W/check_winerr learn_func.bat
win32_prereq: W/install_modules.bat
2011-03-12 03:45:00 +01:00
2016-09-19 17:17:24 +02:00
W/install_modules.bat:
2015-08-04 03:44:40 +02:00
unix2dos W/install_modules.bat
scp W/install_modules.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
2015-12-03 18:16:32 +01:00
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/install_modules.bat'
2016-09-19 17:17:24 +02:00
./W/check_winerr install_modules.bat
2011-03-12 03:45:04 +01:00
2015-12-03 18:16:32 +01:00
win32_update_ssl:
scp W/install_module_ssl.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/install_module_ssl.bat'
W/install_module_one.bat:
unix2dos W/install_module_one.bat
scp W/install_module_one.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/install_module_one.bat'
2014-11-19 23:16:16 +01:00
2017-09-23 23:54:48 +02:00
W/uninstall_module_one.bat:
unix2dos W/uninstall_module_one.bat
scp W/uninstall_module_one.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/uninstall_module_one.bat'
2014-11-19 23:16:16 +01:00
imapsync.exe: imapsync
2011-03-12 03:45:04 +01:00
rcsdiff imapsync
ssh Admin@c 'perl -V'
2012-09-03 02:08:57 +02:00
(date "+%s"| tr "\n" " "; echo -n "BEGIN " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME
2015-12-03 18:16:32 +01:00
unix2dos W/build_exe.bat W/test_exe.bat W/install_modules.bat
2016-09-19 17:17:24 +02:00
scp imapsync W/build_exe.bat W/test_exe.bat W/install_modules.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'
2016-09-19 17:17:24 +02:00
./W/check_winerr build_exe.bat
2011-03-12 03:45:04 +01:00
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_exe.bat'
2016-09-19 17:17:24 +02:00
./W/check_winerr test_exe.bat
2015-12-03 18:16:32 +01:00
rm -f imapsync.exe
2011-03-12 03:45:00 +01:00
scp Admin@c:'C:/msys/1.0/home/Admin/imapsync/imapsync.exe' .
2012-09-03 02:08:57 +02:00
(date "+%s"| tr "\n" " "; echo -n "END " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME
2011-03-12 03:45:02 +01:00
2016-09-19 17:17:24 +02:00
exe: imapsync
2013-07-06 00:26:28 +02:00
(date "+%s"| tr "\n" " "; echo -n "BEGIN " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME
2016-09-19 17:17:24 +02:00
scp imapsync W/build_exe.bat W/install_modules.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
2013-07-06 00:26:28 +02:00
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/build_exe.bat'
2016-09-19 17:17:24 +02:00
./W/check_winerr build_exe.bat
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/imapsync.exe --justbanner'
2015-12-03 18:16:32 +01:00
rm -f imapsync.exe
2013-07-06 00:26:28 +02:00
scp Admin@c:'C:/msys/1.0/home/Admin/imapsync/imapsync.exe' .
(date "+%s"| tr "\n" " "; echo -n "END " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME
2015-05-28 19:04:57 +02:00
2016-09-19 17:17:24 +02:00
2014-05-30 03:56:21 +02:00
zip: dosify_bat
rm -rfv ../prepa_zip/imapsync_$(VERSION_EXE)/
2015-05-28 19:04:57 +02:00
mkdir -p ../prepa_zip/imapsync_$(VERSION_EXE)/FAQ.d/ ../prepa_zip/imapsync_$(VERSION_EXE)/Cook/
cp -av examples/imapsync_example.bat examples/sync_loop_windows.bat examples/file.txt ../prepa_zip/imapsync_$(VERSION_EXE)/
cp -av W/build_exe.bat W/install_modules.bat W/test_cook_exe.bat W/test_cook_src.bat imapsync ../prepa_zip/imapsync_$(VERSION_EXE)/Cook/
2017-09-23 23:54:48 +02:00
for f in README ; do cp -av $$f ../prepa_zip/imapsync_$(VERSION_EXE)/$$f.txt ; done
2015-05-28 19:04:57 +02:00
cp -av FAQ.d/*.txt ../prepa_zip/imapsync_$(VERSION_EXE)/FAQ.d/
2014-05-30 03:56:21 +02:00
cp -av imapsync.exe README_Windows.txt ../prepa_zip/imapsync_$(VERSION_EXE)/
unix2dos ../prepa_zip/imapsync_$(VERSION_EXE)/*.txt
cd ../prepa_zip/ && rm -f ./imapsync_$(VERSION_EXE).zip && zip -r ./imapsync_$(VERSION_EXE).zip ./imapsync_$(VERSION_EXE)/
scp ../prepa_zip/imapsync_$(VERSION_EXE).zip Admin@c:'C:/msys/1.0/home/Admin/'
2015-05-28 19:04:57 +02:00
cp ../prepa_zip/imapsync_$(VERSION_EXE).zip /fe/imapsync/
2013-07-06 00:26:28 +02:00
# C:\Users\mansour\Desktop\imapsync
2011-03-12 03:44:29 +01:00
2016-09-19 17:17:24 +02:00
.PHONY: mac bin win lin
2016-01-22 17:52:28 +01:00
mac: imapsync_bin_Darwin
2015-08-04 03:44:40 +02:00
2016-09-19 17:17:24 +02:00
imapsync_bin_Darwin: imapsync W/build_mac.sh INSTALL.d/prerequisites_imapsync
2011-03-12 03:45:04 +01:00
rcsdiff imapsync
2016-09-19 17:17:24 +02:00
rsync -p -e 'ssh -p 995' imapsync W/build_mac.sh INSTALL.d/prerequisites_imapsync gilleslamira@gate.polarhome.com:
2015-08-04 03:44:40 +02:00
ssh -p 995 gilleslamira@gate.polarhome.com 'sh build_mac.sh'
rsync -P -e 'ssh -p 995' gilleslamira@gate.polarhome.com:imapsync_bin_Darwin .
2017-09-23 23:54:48 +02:00
mactests:
rsync -p -e 'ssh -p 995' imapsync gilleslamira@gate.polarhome.com:
ssh -p 995 gilleslamira@gate.polarhome.com '. .bash_profile; perl imapsync --tests'
mactestsdebug:
rsync -p -e 'ssh -p 995' imapsync gilleslamira@gate.polarhome.com:
ssh -p 995 gilleslamira@gate.polarhome.com '. .bash_profile; perl imapsync --testsdebug --debug'
2016-09-19 17:17:24 +02:00
bin: lin mac win
lin: $(BIN_NAME)
win: imapsync.exe
2016-01-22 17:52:28 +01:00
2017-09-23 23:54:48 +02:00
2016-01-22 17:52:28 +01:00
$(BIN_NAME): imapsync
2015-08-04 03:44:40 +02:00
rcsdiff imapsync
{ pp -o $(BIN_NAME) -I $(IMAPClient_3xx) \
2017-09-23 23:54:48 +02:00
-M Mail::IMAPClient \
-M Net::SSLeay -M IO::Socket -M IO::Socket::INET6 -M IO::Socket::SSL \
2011-03-12 03:45:04 +01:00
-M Digest::MD5 -M Digest::HMAC_MD5 -M Term::ReadKey \
2017-09-23 23:54:48 +02:00
-M Authen::NTLM -M HTML::Entities -M JSON::WebToken \
2011-03-12 03:45:04 +01:00
imapsync ; \
} || :
2015-08-04 03:44:40 +02:00
./$(BIN_NAME)
2017-09-23 23:54:48 +02:00
./$(BIN_NAME) --tests
./$(BIN_NAME) --testslive
./$(BIN_NAME) --justbanner
2011-03-12 03:45:04 +01:00
2015-05-28 19:04:57 +02:00
lfo: upload_lfo
2011-03-12 03:45:04 +01:00
2016-01-22 17:52:28 +01:00
.PHONY: tarball
2011-03-12 03:45:04 +01:00
2017-09-23 23:54:48 +02:00
tarball:
2016-01-22 17:52:28 +01:00
echo making tarball ../prepa_dist/$(DIST_FILE)
2012-12-29 01:43:39 +01:00
rcsdiff RCS/*
cd W && rcsdiff RCS/*
cd examples && rcsdiff RCS/*
2011-03-12 03:45:04 +01:00
mkdir -p dist
mkdir -p ../prepa_dist/$(DIST_NAME)
2013-04-22 21:50:50 +02:00
rsync -aCvH --delete --omit-dir-times --exclude dist/ --exclude imapsync.exe ./ ../prepa_dist/$(DIST_NAME)/
2014-05-30 03:56:21 +02:00
cd ../prepa_dist && tar czfv $(DIST_FILE) $(DIST_NAME)
2011-03-12 03:45:04 +01:00
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-06-14 13:04:24 +02:00
2016-09-19 17:17:24 +02:00
2016-09-19 17:15:41 +02:00
DIST_PATH := ./dist/
2011-06-14 13:04:24 +02:00
2017-09-23 23:54:48 +02:00
dist: cidone test clean all perlcritic dist_prepa dist_zip README_dist
2014-05-30 03:56:21 +02:00
2016-09-19 17:15:41 +02:00
2014-05-30 03:56:21 +02:00
md5:
cd $(DIST_PATH)/ && md5sum *
sha:
cd $(DIST_PATH)/ && sha512sum *
2012-11-27 23:32:36 +01:00
2017-09-23 23:54:48 +02:00
.PHONY: moveoldrelease ks2testsdebug ks2tests README_dist
2012-11-27 23:32:36 +01:00
2016-09-19 17:17:24 +02:00
moveoldrelease:
2017-09-23 23:54:48 +02:00
./W/tools/backup_old_dist
2016-09-19 17:17:24 +02:00
dist_prepa: tarball moveoldrelease
2011-06-14 13:04:24 +02:00
ln -f ../prepa_dist/$(DIST_FILE) $(DIST_PATH)/
2011-07-11 23:24:12 +02:00
rcsdiff imapsync
2016-09-19 17:17:24 +02:00
cp -a ../prepa_dist/$(DIST_NAME)/imapsync $(DIST_PATH)/
2017-09-23 23:54:48 +02:00
cp -a ../prepa_dist/$(DIST_NAME)/imapsync_bin_Darwin $(DIST_PATH)/
2011-06-14 13:04:24 +02:00
#cd $(DIST_PATH)/ && md5sum $(DIST_FILE) > $(DIST_FILE).md5.txt
#cd $(DIST_PATH)/ && md5sum -c $(DIST_FILE).md5.txt
ls -l $(DIST_PATH)/
2014-05-30 03:56:21 +02:00
dist_zip: zip
cp -a ../prepa_zip/imapsync_$(VERSION_EXE).zip $(DIST_PATH)/
2017-09-23 23:54:48 +02:00
README_dist:
sh W/tools/gen_README_dist > $(DIST_PATH)/README.txt
unix2dos $(DIST_PATH)/README.txt
2011-06-14 13:04:24 +02:00
2015-12-03 18:16:32 +01:00
.PHONY: publish upload_ks ks valid_index biz
biz: S/imapsync_sold_by_country.txt
S/imapsync_sold_by_country.txt: imapsync
cd S/ && /g/bin/imapsync_by_country && echo | ci -l imapsync_sold_by_country.txt
2011-06-14 13:04:24 +02:00
2011-03-12 03:45:06 +01:00
ks:
2012-09-03 02:08:57 +02:00
rsync -avHz --delete --exclude imapsync.exe \
2013-12-30 03:03:13 +01:00
. gilles@ks.lamiral.info:public_html/imapsync/
2012-09-03 02:08:57 +02:00
ksa:
2012-11-27 23:32:36 +01:00
rsync -avHz --delete -P \
2013-12-30 03:03:13 +01:00
. gilles@ks.lamiral.info:public_html/imapsync/
2011-03-12 03:45:04 +01:00
2017-09-23 23:54:48 +02:00
ks3:
rsync -avHz --delete -P \
. gilles@ks3.lamiral.info:public_html/imapsync/
2014-11-19 23:16:16 +01:00
upload_tests: tests.sh
rsync -avHz --delete -P \
2016-01-22 17:52:28 +01:00
tests.sh \
2014-11-19 23:16:16 +01:00
gilles@ks.lamiral.info:public_html/imapsync/
2015-05-28 19:04:57 +02:00
2017-09-23 23:54:48 +02:00
ks2testsdebug:
rsync -aP imapsync gilles@ks.lamiral.info:public_html/imapsync/imapsync
ssh gilles@ks.lamiral.info 'public_html/imapsync/imapsync --testsdebug'
2015-05-28 19:04:57 +02:00
2017-09-23 23:54:48 +02:00
ks2tests:
rsync -aP imapsync gilles@ks.lamiral.info:public_html/imapsync/imapsync
ssh gilles@ks.lamiral.info 'public_html/imapsync/imapsync --tests'
2013-08-04 03:27:37 +02:00
2015-12-03 18:16:32 +01:00
publish: dist upload_ks ksa
2013-08-04 03:27:37 +02:00
echo Now ou can do make ml
2011-04-24 23:19:36 +02:00
2015-05-28 19:04:57 +02:00
PUBLIC = ./ChangeLog ./NOLIMIT ./LICENSE ./CREDITS ./FAQ \
2014-05-30 03:56:21 +02:00
./index.shtml ./INSTALL ./README_Windows.txt \
2015-05-28 19:04:57 +02:00
./VERSION ./VERSION_EXE ./imapsync \
2017-09-23 23:54:48 +02:00
./README ./TODO
2012-09-03 02:08:57 +02:00
2016-09-19 17:15:41 +02:00
2012-09-03 02:08:57 +02:00
2016-01-22 17:52:28 +01:00
PUBLIC_doc = ./doc/TUTORIAL_Unix.html ./doc/GOOD_PRACTICES.html
2012-09-03 02:08:57 +02:00
2016-09-19 17:15:41 +02:00
ml:
2015-08-04 03:44:40 +02:00
rcsdiff W/ml_announce.in
2012-09-12 03:50:53 +02:00
m4 -P W/ml_announce.in | mutt -H-
mailq
2011-04-24 23:19:36 +02:00
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/
2015-05-28 19:04:57 +02:00
#rsync -avHz $(PUBLIC) \
2012-09-03 02:08:57 +02:00
#/home/gilles/public_html/www.linux-france.org/html/prj/imapsync/
rsync -lptvHzP ./W/memo glamiral@linux-france.org:imapsync_stats/memo
rsync -lptvHzP ./W/lfo.htaccess \
2011-07-11 23:24:12 +02:00
/home/gilles/public_html/www.linux-france.org/html/prj/imapsync/.htaccess
2011-03-12 03:39:59 +01:00
sh ~/memo/lfo-rsync
2016-09-19 17:17:24 +02:00
valid_index: W/.valid.index.shtml
cl: ./W/checklink.txt
2014-11-19 23:08:41 +01:00
2016-09-19 17:17:24 +02:00
./W/checklink.txt: index.shtml
checklink -b -q http://lamiral.info/~gilles/imapsync/ |tee ./W/checklink.txt
2015-05-28 19:04:57 +02:00
2016-09-19 17:17:24 +02:00
cle: ./W/checklinkext.txt
./W/checklinkext.txt: S/news.shtml S/external.shtml S/imapservers.shtml S/template_xhtml1.shtml
2015-05-28 19:04:57 +02:00
checklink -b -q \
2016-09-19 17:17:24 +02:00
http://lamiral.info/~gilles/imapsync/S/template_xhtml1.shtml \
2015-05-28 19:04:57 +02:00
http://lamiral.info/~gilles/imapsync/S/news.shtml \
http://lamiral.info/~gilles/imapsync/S/external.shtml \
2016-09-19 17:17:24 +02:00
http://lamiral.info/~gilles/imapsync/S/imapservers.shtml \
| tee ./W/checklinkext.txt
W/.valid.index.shtml: index.shtml S/*.shtml
2016-01-22 17:52:28 +01:00
for f in index.shtml S/*.shtml; do echo tidy -q $$f; tidy -q $$f > /dev/null; done
2016-09-19 17:17:24 +02:00
./W/tools/validate_xml_html5 index.shtml S/*.shtml
touch W/.valid.index.shtml
.PHONY: upload_index upload_FAQ ci_imapsync upload_bin
2013-12-30 03:03:13 +01:00
2016-09-19 17:17:24 +02:00
upload_bin:
rsync -a imapsync.exe imapsync_bin_Darwin imapsync_bin_Linux_i686 imapsync ../imapsync_website/
rsync -aHvz --delete ../imapsync_website/ root@ks.lamiral.info:/var/www/imapsync/
2015-05-28 19:04:57 +02:00
2016-09-19 17:17:24 +02:00
upload_index: W/.valid.index.shtml
2017-09-23 23:54:48 +02:00
rcsdiff index.shtml S/style.css S/*.shtml FAQ.d/*.txt LICENSE CREDITS TODO examples/*.bat index.shtml INSTALL.d/*.txt
rsync -avH index.shtml FAQ INSTALL NOLIMIT LICENSE CREDITS TODO S/robots.txt S/favicon.ico ../imapsync_website/
rsync -aHv --delete ./W/ks.htaccess ../imapsync_website/.htaccess
rsync -aHv --delete S/ ../imapsync_website/S/
2016-01-22 17:52:28 +01:00
rsync -aHv --delete ./examples/ ../imapsync_website/examples/
rsync -aHv --delete ./INSTALL.d/ ../imapsync_website/INSTALL.d/
2015-05-28 19:04:57 +02:00
rsync -aHv --delete ./FAQ.d/ ../imapsync_website/FAQ.d/
2016-01-22 17:52:28 +01:00
rsync -avH --delete ./doc/ ../imapsync_website/doc/
2015-05-28 19:04:57 +02:00
rsync -aHvz --delete ../imapsync_website/ root@ks.lamiral.info:/var/www/imapsync/
2011-04-24 23:19:36 +02:00
2015-12-03 18:16:32 +01:00
2016-09-19 17:17:24 +02:00
ci_imapsync:
rcsdiff imapsync
2017-09-23 23:54:48 +02:00
upload_latest: unitests ci_imapsync bin
2016-09-19 17:17:24 +02:00
rsync -a imapsync imapsync_bin_Linux_i686 imapsync_bin_Darwin imapsync.exe ../imapsync_website/
rsync -aHvz --delete ../imapsync_website/ root@ks.lamiral.info:/var/www/imapsync/
2017-09-23 23:54:48 +02:00
upload_cgi: unitests ks2tests ci_imapsync
rsync -a imapsync ../imapsync_website/
rsync -aHvz --delete ../imapsync_website/ root@ks.lamiral.info:/var/www/imapsync/
upload_X:
./W/tools/validate_xml_html5 X/imapsync_form.html
rcsdiff X/imapsync_form.html
rsync -av --delete X/ ../imapsync_website/X/
rsync -aHvz --delete ../imapsync_website/ root@ks.lamiral.info:/var/www/imapsync/
2015-12-03 18:16:32 +01:00
upload_FAQ:
2017-09-23 23:54:48 +02:00
rcsdiff FAQ.d/*.txt LICENSE CREDITS TODO INSTALL.d/*.txt
rsync -avH FAQ INSTALL CREDITS TODO ../imapsync_website/
2016-01-22 17:52:28 +01:00
rsync -aHv --delete ./INSTALL.d/ ../imapsync_website/INSTALL.d/
rsync -aHv --delete ./FAQ.d/ ../imapsync_website/FAQ.d/
rsync -avH --delete ./doc/ ../imapsync_website/doc/
rsync -aHvz --delete ../imapsync_website/ root@ks.lamiral.info:/var/www/imapsync/
2015-12-03 18:16:32 +01:00
upload_ks: ci tarball
rsync -aHv $(PUBLIC) ../imapsync_website/
rsync -aHv --delete ./W/ks.htaccess ../imapsync_website/.htaccess
rsync -avH ./S/ ../imapsync_website/S/
rsync -aHv --delete ./dist/ ../imapsync_website/dist/
rsync -aHv --delete ./examples/ ../imapsync_website/examples/
rsync -aHv --delete ./INSTALL.d/ ../imapsync_website/INSTALL.d/
rsync -aHv --delete ./FAQ.d/ ../imapsync_website/FAQ.d/
2016-09-19 17:15:41 +02:00
rsync -avH --delete ./doc/ ../imapsync_website/doc/
2015-12-03 18:16:32 +01:00
rsync -aHvz --delete ../imapsync_website/ root@ks.lamiral.info:/var/www/imapsync/