3 rem Beware broken ports of tar. Recent cygwin versions work well, older
4 rem cygwin versions and the current MSys port have problems with DOS
5 rem line ends when reading file names from a file. Other ports have their
9 rem Make a copy of current Emacs source
10 if (%3) == () goto usage
11 if not (%4) == () goto %4
12 if not (%4) == (src) goto :lisp
16 echo 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 if not (%4) == () goto end
21 echo Create limited elisp source distribution
22 %TAR% --exclude *.rej --exclude *.elc --exclude *~ -cvf - emacs-%1/lisp | gzip -9 > %2-lisp.tar.gz
23 if not (%4) == () goto end
29 rem Keep this list in sync with the DONTCOMPILE list in lisp/makefile.w32-in
31 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
34 for %%f in (emacs-%1/bin/fns*) do set fns_el=%fns_el% emacs-%1/bin/%%f
36 echo Create bin distribution
37 copy %3\README.W32 emacs-%1\README.W32
40 for %%f in (emacs-%1/BUGS emacs-%1/README emacs-%1/README.W32) do echo %%f>>#files#
41 for %%f in (emacs-%1/bin/fns*) do echo emacs-%1/bin/%%f>>#elfiles#
42 for %%f in (emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp) do echo %%f>>#files#
43 for %%f in (emacs-%1/lock emacs-%1/site-lisp) do echo %%f>>#files#
44 for %%f in (%elfiles% emacs-%1/site-lisp/subdirs.el) do echo %%f>>#elfiles#
45 for %%f in (%eld%/term/*.el) do echo %eld%/term/%%f>>#elfiles#
47 %TAR% --exclude temacs.exe --exclude emacs.mdp --exclude *.pdb --exclude *.opt --exclude "*.el" --exclude "*~" -T #files# -cvf %2-bin-i386.tar
48 %TAR% -T #elfiles# -rvf %2-bin-i386.tar
49 gzip -9 %2-bin-i386.tar
50 del emacs-%1\README.W32
51 rem del #files# #elfiles#
52 if not (%4) == () goto end
56 echo Create full bin distribution
57 copy %3\README.W32 emacs-%1\README.W32
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 del emacs-%1\README.W32
61 if not (%4) == () goto end
65 echo Create archive with precompiled leim files
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 if not (%4) == () goto end
71 echo Create archive with extra files needed for redumping emacs
72 copy %3\README-UNDUMP.W32 emacs-%1\README-UNDUMP.W32
73 copy %3\dump.bat emacs-%1\bin
74 if exist emacs-%1\src\obj-spd\i386\temacs.exe copy emacs-%1\src\obj-spd\i386\temacs.exe emacs-%1\bin
75 if exist emacs-%1\src\oo-spd\i386\temacs.exe copy emacs-%1\src\oo-spd\i386\temacs.exe emacs-%1\bin
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
77 del emacs-%1\bin\temacs.exe
78 del emacs-%1\bin\dump.bat
79 del emacs-%1\README-UNDUMP.W32
80 if not (%4) == () goto end
84 echo Create archive with just the basic binaries and generated files
85 echo (the user needs to unpack the full source distribution for
87 copy %3\README.W32 emacs-%1\README.W32
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
89 del emacs-%1\README.W32
90 if not (%4) == () goto end
94 rem Only do this if explicitly requested
97 echo Create zip files for bin and lisp archives
100 gunzip -c ..\%2-bin-i386.tar.gz | %TAR% xf -
101 rem Need to split emacs.exe into fragments because it is too big now
102 rem to fit on a floppy even by itself.
103 copy %3\stitch.bat %2\bin
105 split -b 1000000 emacs.exe emacs
110 zipsplit -n 1400000 -b .. em%5bin.zip
112 gunzip -c ..\%2-lisp.tar.gz | %TAR% xf -
115 zipsplit -n 1400000 -b .. em%5lis.zip
122 echo Generate source and binary distributions of emacs.
123 echo Usage: %0 emacs-version dist-basename distfiles [lisp,bin,undumped,barebin]
124 echo (e.g., %0 19.34 emacs-19.34.5 d:\andrewi\distfiles)
125 echo Or: %0 emacs-version dist-basename distfiles "zipfiles" short-version
126 echo (e.g., %0 20.6 emacs-20.6 d:\andrewi\distfiles zipfiles 206)
130 arch-tag: 6e2ddd92-c1c9-4992-b6b5-207aaab72f68