rem Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\r
rem Boston, MA 02110-1301, USA.\r
\r
+set ZIP=zip\r
\r
-rem Beware broken ports of tar. Recent cygwin versions work well, older\r
-rem cygwin versions and the current MSys port have problems with DOS\r
-rem line ends when reading file names from a file. Other ports have their\r
-rem own problems too.\r
-set TAR=tar\r
-\r
-rem Make a copy of current Emacs source\r
if (%3) == () goto usage\r
if not (%4) == () goto %4\r
-if not (%4) == (src) goto :lisp\r
-\r
-:src\r
-\r
-echo Create full source distribution, excluding leim\r
-%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
-if not (%4) == () goto end\r
-\r
-:lisp\r
-echo Create limited elisp source distribution\r
-%TAR% --exclude *.rej --exclude *.elc --exclude *~ -cvf - emacs-%1/lisp | gzip -9 > %2-lisp.tar.gz\r
-if not (%4) == () goto end\r
\r
:bin\r
\r
-set eld=emacs-%1/lisp\r
-\r
-rem List of Lisp files that are not compiled and that should be\r
-rem included in the bin distribution.\r
-\r
-rem It would be better to generate this list automatically. It is the\r
-rem list of all .el files for which there is no corresponding .elc\r
-rem file, minus ldefs-boot.el. --lute\r
-\r
-set elfiles=%eld%/cus-load.el %eld%/emacs-lisp/cl-specs.el %eld%/eshell/esh-groups.el %eld%/eshell/esh-maint.el %eld%/finder-inf.el %eld%/forms-d2.el %eld%/forms-pass.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%/language/czech.el %eld%/language/devanagari.el %eld%/language/english.el %eld%/language/georgian.el %eld%/language/greek.el %eld%/language/hebrew.el %eld%/language/japanese.el %eld%/language/kannada.el %eld%/language/korean.el %eld%/language/lao.el %eld%/language/malayalam.el %eld%/language/misc-lang.el %eld%/language/romanian.el %eld%/language/slovak.el %eld%/language/tamil.el %eld%/language/thai.el %eld%/language/utf-8-lang.el %eld%/loaddefs.el %eld%/loadup.el %eld%/mail/blessmail.el %eld%/mh-e/mh-acros.el %eld%/mh-e/mh-gnus.el %eld%/mh-e/mh-loaddefs.el %eld%/obsolete/keyswap.el %eld%/patcomp.el %eld%/paths.el %eld%/play/bruce.el %eld%/subdirs.el %eld%/term/AT386.el %eld%/term/apollo.el %eld%/term/bobcat.el %eld%/term/internal.el %eld%/term/iris-ansi.el %eld%/term/linux.el %eld%/term/lk201.el %eld%/term/news.el %eld%/term/vt102.el %eld%/term/vt125.el %eld%/term/vt200.el %eld%/term/vt201.el %eld%/term/vt220.el %eld%/term/vt240.el %eld%/term/vt300.el %eld%/term/vt320.el %eld%/term/vt400.el %eld%/term/vt420.el %eld%/term/wyse50.el %eld%/version.el\r
-\r
-set fns_el=\r
-for %%f in (emacs-%1/bin/fns*) do set fns_el=%fns_el% emacs-%1/bin/%%f\r
-\r
-echo Create bin distribution\r
-copy %3\README.W32 emacs-%1\README.W32\r
-\r
-del #files# #elfiles#\r
-for %%f in (emacs-%1/BUGS emacs-%1/README emacs-%1/README.W32) do echo %%f>>#files#\r
-for %%f in (emacs-%1/bin/fns*) do echo emacs-%1/bin/%%f>>#elfiles#\r
-for %%f in (emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp) do echo %%f>>#files#\r
-for %%f in (emacs-%1/lock emacs-%1/site-lisp) do echo %%f>>#files#\r
-for %%f in (%elfiles% emacs-%1/site-lisp/subdirs.el) do echo %%f>>#elfiles#\r
-\r
-%TAR% --exclude temacs.exe --exclude emacs.mdp --exclude *.pdb --exclude *.opt --exclude "*.el" --exclude "*~" -T #files# -cvf %2-bin-i386.tar\r
-%TAR% -T #elfiles# -rvf %2-bin-i386.tar\r
-gzip -9 %2-bin-i386.tar\r
-del emacs-%1\README.W32\r
-rem del #files# #elfiles#\r
-if not (%4) == () goto end\r
-\r
-:fullbin\r
-\r
echo Create full bin distribution\r
copy %3\README.W32 emacs-%1\README.W32\r
\r
-%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
+%ZIP% -x emacs.mdp -x *.pdb -x *.opt -x *~ -x CVS -9 emacs-%1/BUGS emacs-%1/README emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp %2-bin-i386.zip\r
del emacs-%1\README.W32\r
if not (%4) == () goto end\r
\r
-:leim\r
-\r
-echo Create archive with precompiled leim files\r
-%TAR% -cvf - emacs-%1/leim/leim-list.el emacs-%1/leim/quail emacs-%1/leim/ja-dic | gzip -9 > %2-leim.tar.gz\r
-if not (%4) == () goto end\r
-\r
-:undumped\r
-\r
-echo Create archive with extra files needed for redumping emacs\r
-copy %3\README-UNDUMP.W32 emacs-%1\README-UNDUMP.W32\r
-copy %3\dump.bat emacs-%1\bin\r
-if exist emacs-%1\src\obj-spd\i386\temacs.exe copy emacs-%1\src\obj-spd\i386\temacs.exe emacs-%1\bin\r
-if exist emacs-%1\src\oo-spd\i386\temacs.exe copy emacs-%1\src\oo-spd\i386\temacs.exe emacs-%1\bin\r
-%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
-del emacs-%1\bin\temacs.exe\r
-del emacs-%1\bin\dump.bat\r
-del emacs-%1\README-UNDUMP.W32\r
-if not (%4) == () goto end\r
-\r
:barebin\r
\r
echo Create archive with just the basic binaries and generated files\r
echo (the user needs to unpack the full source distribution for\r
echo everything else)\r
copy %3\README.W32 emacs-%1\README.W32\r
-%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
+%ZIP% -9 emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc/DOC emacs-%1/etc/DOC-X %2-barebin-i386.zip\r
del emacs-%1\README.W32\r
if not (%4) == () goto end\r
\r
goto end\r
\r
-rem Only do this if explicitly requested\r
-:zipfiles\r
-\r
-echo Create zip files for bin and lisp archives\r
-mkdir distrib\r
-cd distrib\r
-gunzip -c ..\%2-bin-i386.tar.gz | %TAR% xf -\r
-rem Need to split emacs.exe into fragments because it is too big now\r
-rem to fit on a floppy even by itself.\r
-copy %3\stitch.bat %2\bin\r
-cd %2\bin\r
-split -b 1000000 emacs.exe emacs\r
-del emacs.exe\r
-cd ..\..\r
-zip -rp9 em%5bin %2\r
-rm -rf %2\r
-zipsplit -n 1400000 -b .. em%5bin.zip\r
-del em%5bin.zip\r
-gunzip -c ..\%2-lisp.tar.gz | %TAR% xf -\r
-zip -rp9 em%5lis %2\r
-rm -rf %2\r
-zipsplit -n 1400000 -b .. em%5lis.zip\r
-del em%5lis.zip\r
-cd ..\r
-\r
-goto end\r
-\r
:usage\r
echo Generate source and binary distributions of emacs.\r
-echo Usage: %0 emacs-version dist-basename distfiles [lisp,bin,undumped,barebin]\r
+echo Usage: %0 emacs-version dist-basename distfiles [bin,barebin]\r
echo (e.g., %0 19.34 emacs-19.34.5 d:\andrewi\distfiles)\r
-echo Or: %0 emacs-version dist-basename distfiles "zipfiles" short-version\r
-echo (e.g., %0 20.6 emacs-20.6 d:\andrewi\distfiles zipfiles 206)\r
:end\r
\r
goto skipArchTag\r