aboutsummaryrefslogtreecommitdiffstats
path: root/admin/nt
diff options
context:
space:
mode:
authorJason Rumney2005-02-15 22:07:53 +0000
committerJason Rumney2005-02-15 22:07:53 +0000
commit8d4eb135e8a6b020a28ac4154573b578eada3d15 (patch)
treef6af6a98d7b3ade32365c3d726d7621bf2b7a0e6 /admin/nt
parente25c1ca6183d24b9735c4c55d80e4717c36924c4 (diff)
downloademacs-8d4eb135e8a6b020a28ac4154573b578eada3d15.tar.gz
emacs-8d4eb135e8a6b020a28ac4154573b578eada3d15.zip
Do not rely on non-standard behaviour of tar --exclude.
Diffstat (limited to 'admin/nt')
-rwxr-xr-xadmin/nt/makedist.bat251
1 files changed, 127 insertions, 124 deletions
diff --git a/admin/nt/makedist.bat b/admin/nt/makedist.bat
index feb6799080f..d48e6736004 100755
--- a/admin/nt/makedist.bat
+++ b/admin/nt/makedist.bat
@@ -1,127 +1,130 @@
1@echo off 1@echo off
2 2
3rem This batch file doesn't work with Cygwin tar because #files# 3rem Beware broken ports of tar. Recent cygwin versions work well, older
4rem has DOS line endings, which Cygwin tar misinterprets. 4rem cygwin versions and the current MSys port have problems with DOS
5rem I use the version of tar from 5rem line ends when reading file names from a file. Other ports have their
6rem ftp://ftp.gnu.org/gnu/windows/emacs/utilities/i386/tar-1.11.2a.exe 6rem own problems too.
7rem renamed as wtar.exe. 7set TAR=tar
8set TAR=wtar 8
9 9rem Make a copy of current Emacs source
10rem Make a copy of current Emacs source 10if (%3) == () goto usage
11if (%3) == () goto usage 11if not (%4) == () goto %4
12if not (%4) == () goto %4 12if not (%4) == (src) goto :lisp
13if not (%4) == (src) goto :lisp 13
14 14:src
15:src 15
16 16echo Create full source distribution, excluding leim
17echo Create full source distribution, excluding leim 17%TAR% --exclude leim --exclude _marker --exclude DOC --exclude DOC-X --exclude TAGS --exclude bin --exclude obj --exclude obj-spd --exclude oo --exclude oo-spd --exclude *~ --exclude *.rej -cvf - emacs-%1 | gzip -9 > %2-src.tar.gz
18%TAR% --exclude leim --exclude _marker --exclude DOC --exclude DOC-X --exclude TAGS --exclude bin --exclude obj --exclude obj-spd --exclude oo --exclude oo-spd --exclude *~ --exclude *.rej -cvf - emacs-%1 | gzip -9 > %2-src.tar.gz 18if not (%4) == () goto end
19if not (%4) == () goto end 19
20 20:lisp
21:lisp 21echo Create limited elisp source distribution
22echo Create limited elisp source distribution 22%TAR% --exclude *.rej --exclude *.elc --exclude *~ -cvf - emacs-%1/lisp | gzip -9 > %2-lisp.tar.gz
23%TAR% --exclude *.rej --exclude *.elc --exclude *~ -cvf - emacs-%1/lisp | gzip -9 > %2-lisp.tar.gz 23if not (%4) == () goto end
24if not (%4) == () goto end 24
25 25:bin
26:bin 26
27 27set eld=emacs-%1/lisp
28set eld=emacs-%1/lisp 28
29 29rem Keep this list in sync with the DONTCOMPILE list in lisp/makefile.w32-in
30rem Keep this list in sync with the DONTCOMPILE list in lisp/Makefile.in 30
31 31set elfiles=%eld%/cus-load.el %eld%/cus-start.el %eld%/emacs-lisp/cl-specs.el %eld%/eshell/esh-maint.el %eld%/eshell/esh-groups.el %eld%/finder-inf.el %eld%/forms-d2.el %eld%/forms-pass.el %eld%/generic-x.el %eld%/international/latin-1.el %eld%/international/latin-2.el %eld%/international/latin-3.el %eld%/international/latin-4.el %eld%/international/latin-5.el %eld%/international/latin-8.el %eld%/international/latin-9.el %eld%/international/mule-conf.el %eld%/loaddefs.el %eld%/loadup.el %eld%/mail/blessmail.el %eld%/patcomp.el %eld%/paths.el %eld%/play/bruce.el %eld%/subdirs.el %eld%/version.el
32set elfiles=%eld%/cus-load.el %eld%/cus-start.el %eld%/emacs-lisp/cl-specs.el %eld%/eshell/esh-maint.el %eld%/eshell/esh-groups.el %eld%/finder-inf.el %eld%/forms-d2.el %eld%/forms-pass.el %eld%/generic-x.el %eld%/international/latin-1.el %eld%/international/latin-2.el %eld%/international/latin-3.el %eld%/international/latin-4.el %eld%/international/latin-5.el %eld%/international/latin-8.el %eld%/international/latin-9.el %eld%/international/mule-conf.el %eld%/loaddefs.el %eld%/loadup.el %eld%/mail/blessmail.el %eld%/patcomp.el %eld%/paths.el %eld%/play/bruce.el %eld%/subdirs.el %eld%/version.el 32
33 33set fns_el=
34set fns_el= 34for %%f in (emacs-%1/bin/fns*) do set fns_el=%fns_el% emacs-%1/bin/%%f
35for %%f in (emacs-%1/bin/fns*) do set fns_el=%fns_el% emacs-%1/bin/%%f 35
36 36echo Create bin distribution
37echo Create bin distribution 37copy %3\README.W32 emacs-%1\README.W32
38copy %3\README.W32 emacs-%1\README.W32 38
39 39del #files# #elfiles#
40del #files# 40for %%f in (emacs-%1/BUGS emacs-%1/README emacs-%1/README.W32) do echo %%f>>#files#
41for %%f in (emacs-%1/BUGS emacs-%1/README emacs-%1/README.W32) do echo %%f>>#files# 41for %%f in (emacs-%1/bin/fns*) do echo emacs-%1/bin/%%f>>#elfiles#
42for %%f in (emacs-%1/bin/fns*) do echo emacs-%1/bin/%%f>>#files# 42for %%f in (emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp) do echo %%f>>#files#
43for %%f in (emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp %elfiles%) do echo %%f>>#files# 43for %%f in (emacs-%1/lock emacs-%1/site-lisp) do echo %%f>>#files#
44for %%f in (%eld%/term/*.el) do echo %eld%/term/%%f>>#files# 44for %%f in (%elfiles% emacs-%1/site-lisp/subdirs.el) do echo %%f>>#elfiles#
45for %%f in (emacs-%1/lock emacs-%1/site-lisp emacs-%1/site-lisp/subdirs.el) do echo %%f>>#files# 45for %%f in (%eld%/term/*.el) do echo %eld%/term/%%f>>#elfiles#
46%TAR% --exclude temacs.exe --exclude emacs.mdp --exclude *.pdb --exclude *.opt --exclude *.el --exclude *~ -T #files# -cvf - | gzip -9 > %2-bin-i386.tar.gz 46
47del emacs-%1\README.W32 47%TAR% --exclude temacs.exe --exclude emacs.mdp --exclude *.pdb --exclude *.opt --exclude "*.el" --exclude "*~" -T #files# -cvf %2-bin-i386.tar
48del #files# 48%TAR% -T #elfiles# -rvf %2-bin-i386.tar
49if not (%4) == () goto end 49gzip -9 %2-bin-i386.tar
50 50del emacs-%1\README.W32
51:fullbin 51rem del #files# #elfiles#
52 52if not (%4) == () goto end
53echo Create full bin distribution 53
54copy %3\README.W32 emacs-%1\README.W32 54:fullbin
55 55
56%TAR% --exclude temacs.exe --exclude emacs.mdp --exclude *.pdb --exclude *.opt --exclude *~ -cvf - emacs-%1/BUGS emacs-%1/README emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp emacs-%1/lock emacs-%1/site-lisp | gzip -9 > %2-fullbin-i386.tar.gz 56echo Create full bin distribution
57del emacs-%1\README.W32 57copy %3\README.W32 emacs-%1\README.W32
58if not (%4) == () goto end 58
59 59%TAR% --exclude temacs.exe --exclude emacs.mdp --exclude *.pdb --exclude *.opt --exclude *~ -cvf - emacs-%1/BUGS emacs-%1/README emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp emacs-%1/lock emacs-%1/site-lisp | gzip -9 > %2-fullbin-i386.tar.gz
60:leim 60del emacs-%1\README.W32
61 61if not (%4) == () goto end
62echo Create archive with precompiled leim files 62
63%TAR% -cvf - emacs-%1/leim/leim-list.el emacs-%1/leim/quail emacs-%1/leim/ja-dic | gzip -9 > %2-leim.tar.gz 63:leim
64if not (%4) == () goto end 64
65 65echo Create archive with precompiled leim files
66:undumped 66%TAR% -cvf - emacs-%1/leim/leim-list.el emacs-%1/leim/quail emacs-%1/leim/ja-dic | gzip -9 > %2-leim.tar.gz
67 67if not (%4) == () goto end
68echo Create archive with extra files needed for redumping emacs 68
69copy %3\README-UNDUMP.W32 emacs-%1\README-UNDUMP.W32 69:undumped
70copy %3\dump.bat emacs-%1\bin 70
71if exist emacs-%1\src\obj-spd\i386\temacs.exe copy emacs-%1\src\obj-spd\i386\temacs.exe emacs-%1\bin 71echo Create archive with extra files needed for redumping emacs
72if exist emacs-%1\src\oo-spd\i386\temacs.exe copy emacs-%1\src\oo-spd\i386\temacs.exe emacs-%1\bin 72copy %3\README-UNDUMP.W32 emacs-%1\README-UNDUMP.W32
73%TAR% -cvf - emacs-%1/README-UNDUMP.W32 emacs-%1/bin/dump.bat emacs-%1/bin/temacs.exe | gzip -9 > %2-undumped-i386.tar.gz 73copy %3\dump.bat emacs-%1\bin
74del emacs-%1\bin\temacs.exe 74if exist emacs-%1\src\obj-spd\i386\temacs.exe copy emacs-%1\src\obj-spd\i386\temacs.exe emacs-%1\bin
75del emacs-%1\bin\dump.bat 75if exist emacs-%1\src\oo-spd\i386\temacs.exe copy emacs-%1\src\oo-spd\i386\temacs.exe emacs-%1\bin
76del emacs-%1\README-UNDUMP.W32 76%TAR% -cvf - emacs-%1/README-UNDUMP.W32 emacs-%1/bin/dump.bat emacs-%1/bin/temacs.exe | gzip -9 > %2-undumped-i386.tar.gz
77if not (%4) == () goto end 77del emacs-%1\bin\temacs.exe
78 78del emacs-%1\bin\dump.bat
79:barebin 79del emacs-%1\README-UNDUMP.W32
80 80if not (%4) == () goto end
81echo Create archive with just the basic binaries and generated files 81
82echo (the user needs to unpack the full source distribution for 82:barebin
83echo everything else) 83
84copy %3\README.W32 emacs-%1\README.W32 84echo Create archive with just the basic binaries and generated files
85%TAR% -cvf - emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc/DOC emacs-%1/etc/DOC-X | gzip -9 > %2-barebin-i386.tar.gz 85echo (the user needs to unpack the full source distribution for
86del emacs-%1\README.W32 86echo everything else)
87if not (%4) == () goto end 87copy %3\README.W32 emacs-%1\README.W32
88 88%TAR% -cvf - emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc/DOC emacs-%1/etc/DOC-X | gzip -9 > %2-barebin-i386.tar.gz
89goto end 89del emacs-%1\README.W32
90 90if not (%4) == () goto end
91rem Only do this if explicitly requested 91
92:zipfiles 92goto end
93 93
94echo Create zip files for bin and lisp archives 94rem Only do this if explicitly requested
95mkdir distrib 95:zipfiles
96cd distrib 96
97gunzip -c ..\%2-bin-i386.tar.gz | %TAR% xf - 97echo Create zip files for bin and lisp archives
98rem Need to split emacs.exe into fragments because it is too big now 98mkdir distrib
99rem to fit on a floppy even by itself. 99cd distrib
100copy %3\stitch.bat %2\bin 100gunzip -c ..\%2-bin-i386.tar.gz | %TAR% xf -
101cd %2\bin 101rem Need to split emacs.exe into fragments because it is too big now
102split -b 1000000 emacs.exe emacs 102rem to fit on a floppy even by itself.
103del emacs.exe 103copy %3\stitch.bat %2\bin
104cd ..\.. 104cd %2\bin
105zip -rp9 em%5bin %2 105split -b 1000000 emacs.exe emacs
106rm -rf %2 106del emacs.exe
107zipsplit -n 1400000 -b .. em%5bin.zip 107cd ..\..
108del em%5bin.zip 108zip -rp9 em%5bin %2
109gunzip -c ..\%2-lisp.tar.gz | %TAR% xf - 109rm -rf %2
110zip -rp9 em%5lis %2 110zipsplit -n 1400000 -b .. em%5bin.zip
111rm -rf %2 111del em%5bin.zip
112zipsplit -n 1400000 -b .. em%5lis.zip 112gunzip -c ..\%2-lisp.tar.gz | %TAR% xf -
113del em%5lis.zip 113zip -rp9 em%5lis %2
114cd .. 114rm -rf %2
115 115zipsplit -n 1400000 -b .. em%5lis.zip
116goto end 116del em%5lis.zip
117 117cd ..
118:usage 118
119echo Generate source and binary distributions of emacs. 119goto end
120echo Usage: %0 emacs-version dist-basename distfiles [lisp,bin,undumped,barebin] 120
121echo (e.g., %0 19.34 emacs-19.34.5 d:\andrewi\distfiles) 121:usage
122echo Or: %0 emacs-version dist-basename distfiles "zipfiles" short-version 122echo Generate source and binary distributions of emacs.
123echo (e.g., %0 20.6 emacs-20.6 d:\andrewi\distfiles zipfiles 206) 123echo Usage: %0 emacs-version dist-basename distfiles [lisp,bin,undumped,barebin]
124:end 124echo (e.g., %0 19.34 emacs-19.34.5 d:\andrewi\distfiles)
125echo Or: %0 emacs-version dist-basename distfiles "zipfiles" short-version
126echo (e.g., %0 20.6 emacs-20.6 d:\andrewi\distfiles zipfiles 206)
127:end
125 128
126goto skipArchTag 129goto skipArchTag
127 arch-tag: 6e2ddd92-c1c9-4992-b6b5-207aaab72f68 130 arch-tag: 6e2ddd92-c1c9-4992-b6b5-207aaab72f68