Commit | Line | Data |
---|---|---|
f466241d EZ |
1 | @echo off\r |
2 | \r | |
e73c5b91 AI |
3 | rem This batch file doesn't work with Cygwin tar because #files#\r |
4 | rem has DOS line endings, which Cygwin tar misinterprets.\r | |
5 | rem I use the version of tar from\r | |
6 | rem ftp://ftp.gnu.org/gnu/windows/emacs/utilities/i386/tar-1.11.2a.exe\r | |
7 | rem renamed as wtar.exe.\r | |
f466241d EZ |
8 | set TAR=wtar\r |
9 | \r | |
10 | rem Make a copy of current Emacs source\r | |
11 | if (%3) == () goto usage\r | |
12 | if not (%4) == () goto %4\r | |
13 | if not (%4) == (src) goto :lisp\r | |
14 | \r | |
15 | :src\r | |
16 | \r | |
17 | echo Create full source distribution, excluding leim\r | |
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\r | |
19 | if not (%4) == () goto end\r | |
20 | \r | |
21 | :lisp\r | |
22 | echo Create limited elisp source distribution\r | |
23 | %TAR% --exclude *.rej --exclude *.elc --exclude *~ -cvf - emacs-%1/lisp | gzip -9 > %2-lisp.tar.gz\r | |
24 | if not (%4) == () goto end\r | |
25 | \r | |
26 | :bin\r | |
27 | \r | |
28 | set eld=emacs-%1/lisp\r | |
29 | \r | |
30 | rem Keep this list in sync with the DONTCOMPILE list in lisp/Makefile.in\r | |
31 | \r | |
38b81d74 | 32 | set 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\r |
f466241d | 33 | \r |
f466241d EZ |
34 | set fns_el=\r |
35 | for %%f in (emacs-%1/bin/fns*) do set fns_el=%fns_el% emacs-%1/bin/%%f\r | |
36 | \r | |
37 | echo Create bin distribution\r | |
38 | copy %3\README.W32 emacs-%1\README.W32\r | |
39 | \r | |
f466241d | 40 | del #files#\r |
e73c5b91 | 41 | for %%f in (emacs-%1/BUGS emacs-%1/README emacs-%1/README.W32) do echo %%f>>#files#\r |
f466241d EZ |
42 | for %%f in (emacs-%1/bin/fns*) do echo emacs-%1/bin/%%f>>#files#\r |
43 | for %%f in (emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp %elfiles%) do echo %%f>>#files#\r | |
44 | for %%f in (%eld%/term/*.el) do echo %eld%/term/%%f>>#files#\r | |
45 | for %%f in (emacs-%1/lock emacs-%1/site-lisp emacs-%1/site-lisp/subdirs.el) do echo %%f>>#files#\r | |
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\r | |
47 | del emacs-%1\README.W32\r | |
48 | del #files#\r | |
49 | if not (%4) == () goto end\r | |
50 | \r | |
51 | :fullbin\r | |
52 | \r | |
53 | echo Create full bin distribution\r | |
54 | copy %3\README.W32 emacs-%1\README.W32\r | |
55 | \r | |
461a1459 | 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\r |
f466241d EZ |
57 | del emacs-%1\README.W32\r |
58 | if not (%4) == () goto end\r | |
59 | \r | |
60 | :leim\r | |
61 | \r | |
62 | echo Create archive with precompiled leim files\r | |
63 | %TAR% -cvf - emacs-%1/leim/leim-list.el emacs-%1/leim/quail emacs-%1/leim/ja-dic | gzip -9 > %2-leim.tar.gz\r | |
64 | if not (%4) == () goto end\r | |
65 | \r | |
66 | :undumped\r | |
67 | \r | |
68 | echo Create archive with extra files needed for redumping emacs\r | |
69 | copy %3\README-UNDUMP.W32 emacs-%1\README-UNDUMP.W32\r | |
70 | copy %3\dump.bat emacs-%1\bin\r | |
71 | if exist emacs-%1\src\obj-spd\i386\temacs.exe copy emacs-%1\src\obj-spd\i386\temacs.exe emacs-%1\bin\r | |
72 | if exist emacs-%1\src\oo-spd\i386\temacs.exe copy emacs-%1\src\oo-spd\i386\temacs.exe emacs-%1\bin\r | |
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\r | |
74 | del emacs-%1\bin\temacs.exe\r | |
75 | del emacs-%1\bin\dump.bat\r | |
76 | del emacs-%1\README-UNDUMP.W32\r | |
77 | if not (%4) == () goto end\r | |
78 | \r | |
79 | :barebin\r | |
80 | \r | |
81 | echo Create archive with just the basic binaries and generated files\r | |
82 | echo (the user needs to unpack the full source distribution for\r | |
83 | echo everything else)\r | |
84 | copy %3\README.W32 emacs-%1\README.W32\r | |
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\r | |
86 | del emacs-%1\README.W32\r | |
87 | if not (%4) == () goto end\r | |
88 | \r | |
89 | goto end\r | |
90 | \r | |
91 | rem Only do this if explicitly requested\r | |
92 | :zipfiles\r | |
93 | \r | |
94 | echo Create zip files for bin and lisp archives\r | |
95 | mkdir distrib\r | |
96 | cd distrib\r | |
97 | gunzip -c ..\%2-bin-i386.tar.gz | %TAR% xf -\r | |
d64f2d06 AI |
98 | rem Need to split emacs.exe into fragments because it is too big now\r |
99 | rem to fit on a floppy even by itself.\r | |
100 | copy %3\stitch.bat %2\bin\r | |
101 | cd %2\bin\r | |
102 | split -b 1000000 emacs.exe emacs\r | |
103 | del emacs.exe\r | |
104 | cd ..\..\r | |
105 | zip -rp9 em%5bin %2\r | |
f466241d | 106 | rm -rf %2\r |
d64f2d06 AI |
107 | zipsplit -n 1400000 -b .. em%5bin.zip\r |
108 | del em%5bin.zip\r | |
f466241d | 109 | gunzip -c ..\%2-lisp.tar.gz | %TAR% xf -\r |
d64f2d06 | 110 | zip -rp9 em%5lis %2\r |
f466241d | 111 | rm -rf %2\r |
d64f2d06 AI |
112 | zipsplit -n 1400000 -b .. em%5lis.zip\r |
113 | del em%5lis.zip\r | |
f466241d EZ |
114 | cd ..\r |
115 | \r | |
116 | goto end\r | |
117 | \r | |
118 | :usage\r | |
119 | echo Generate source and binary distributions of emacs.\r | |
120 | echo Usage: %0 emacs-version dist-basename distfiles [lisp,bin,undumped,barebin]\r | |
121 | echo (e.g., %0 19.34 emacs-19.34.5 d:\andrewi\distfiles)\r | |
122 | echo Or: %0 emacs-version dist-basename distfiles "zipfiles" short-version\r | |
123 | echo (e.g., %0 20.6 emacs-20.6 d:\andrewi\distfiles zipfiles 206)\r | |
124 | :end\r | |
6b61353c KH |
125 | |
126 | goto skipArchTag | |
127 | arch-tag: 6e2ddd92-c1c9-4992-b6b5-207aaab72f68 | |
128 | :skipArchTag |