Commit e3aef5c6 authored by Christoph Scholtes's avatar Christoph Scholtes Committed by Juanma Barranquero

New make target for Windows platform: make dist (bug#6602)

* admin/admin.el: Write version number to nt/makefile.w32-in.
* admin/nt/makedist.bat: Remove; replaced with `zipdist.bat'
  in the nt/ directory.
* admin/nt/README.W32: Relocate to nt/ directory.
* etc/NEWS: Document new --distfiles configure.bat option and
  `dist' make target on Windows.
* nt/INSTALL: Document new dist target and add section about
  creating binary distributions.
* nt/configure.bat: New parameter `--distfiles'.
* nt/makefile.w32-in: Add version number, new target `dist'.
  Add new target `install-shortcuts'.
* nt/zipdist.bat: New file; create zipped binary distribution,
  replaces admin/nt/makedist.bat.
parent c4cc8b9a
2010-07-24 Christoph Scholtes <cschol2112@gmail.com>
* admin.el: Write version number to nt/makefile.w32-in.
* nt/makedist.bat: Remove; replaced with `zipdist.bat'
in the nt/ directory.
* nt/README.W32: Relocate to nt/ directory.
2010-07-11 Andreas Schwab <schwab@linux-m68k.org>
* CPP-DEFINES (HAVE_INDEX, HAVE_RINDEX): Remove.
......
......@@ -95,6 +95,9 @@ Root must be the root of an Emacs source tree."
(set-version-in-file root "lib-src/makefile.w32-in" version
(rx (and "VERSION" (0+ space) "=" (0+ space)
(submatch (1+ (in "0-9."))))))
(set-version-in-file root "nt/makefile.w32-in" version
(rx (and "VERSION" (0+ space) "=" (0+ space)
(submatch (1+ (in "0-9."))))))
;; nt/emacs.rc also contains the version number, but in an awkward
;; format. It must contain four components, separated by commas, and
;; in two places those commas are followed by space, in two other
......
@echo off
rem Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
rem Free Software Foundation, Inc.
rem Cannot use brackets in andrewi's email below because
rem older Windows shells will treat that as redirection.
rem Author: Andrew Innes andrewi@gnu.org
rem This file is part of GNU Emacs.
rem GNU Emacs is free software: you can redistribute it and/or modify
rem it under the terms of the GNU General Public License as published by
rem the Free Software Foundation, either version 3 of the License, or
rem (at your option) any later version.
rem GNU Emacs is distributed in the hope that it will be useful,
rem but WITHOUT ANY WARRANTY; without even the implied warranty of
rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
rem GNU General Public License for more details.
rem You should have received a copy of the GNU General Public License
rem along with GNU Emacs. If not, see http://www.gnu.org/licenses/.
if (%3) == () goto usage
if not (%4) == () goto %4
:bin
echo Create full bin distribution
copy %3\README.W32 emacs-%1\README.W32
rem Info-ZIP zip seems to be broken on Windows.
rem It always writes to zip.zip and treats the zipfile argument as one
rem of the files to go in it.
rem zip -9 -r %2-bin-i386 emacs-%1/BUGS emacs-%1/COPYING emacs-%1/README emacs-%1/README.W32 emacs-%1/INSTALL emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp emacs-%1/leim -x emacs.mdp *.pdb *.opt *~ CVS
7z a -tZIP -mx=9 -xr!emacs.mdp -xr!*.pdb -xr!*.opt -xr!*~ -xr!CVS -xr!.arch-inventory %2-bin-i386.zip emacs-%1/BUGS emacs-%1/COPYING emacs-%1/README emacs-%1/README.W32 emacs-%1/INSTALL emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp emacs-%1/leim emacs-%1/site-lisp
del emacs-%1\README.W32
if not (%4) == () goto end
:barebin
echo Create archive with just the basic binaries and generated files
echo (the user needs to unpack the full source distribution for
echo everything else)
copy %3\README.W32 emacs-%1\README.W32
rem Info-ZIP zip seems to be broken on Windows.
rem It always writes to zip.zip and treats the zipfile argument as one
rem of the files to go in it.
rem zip -9 -r %2-barebin-i386.zip emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc/DOC-X emacs-%1/COPYING
7z a -tZIP -mx=9 %2-barebin-i386.zip emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc/DOC-X emacs-%1/COPYING
del emacs-%1\README.W32
if not (%4) == () goto end
goto end
:usage
echo Generate source and binary distributions of emacs.
echo Usage: %0 emacs-version dist-basename distfiles [bin,barebin]
echo (e.g., %0 19.34 emacs-19.34.5 d:\andrewi\distfiles)
:end
goto skipArchTag
arch-tag: 6e2ddd92-c1c9-4992-b6b5-207aaab72f68
:skipArchTag
2010-07-24 Christoph Scholtes <cschol2112@gmail.com>
* NEWS: Document new --distfiles configure.bat option and
`dist' make target on Windows.
2010-07-20 Juanma Barranquero <lekktu@gmail.com>
* PROBLEMS: Add note about use of backslashes in Windows paths.
......
......@@ -432,6 +432,12 @@ displayed with a "spinning bar".
** New configure.bat option --enable-checking builds emacs with extra
runtime checks.
** New configure.bat option --distfiles to specify files to be
included in binary distribution
** New make target `dist' to create binary disttribution for Windows
platform
----------------------------------------------------------------------
This file is part of GNU Emacs.
......
2010-07-24 Christoph Scholtes <cschol2112@gmail.com>
New make target for Windows platform: make dist (bug#6602)
* INSTALL: Document new dist target and add section about
creating binary distributions.
* README.W32: Relocate from admin/nt/ directory.
* configure.bat: New parameter `--distfiles'.
* makefile.w32-in: Add version number, new target `dist'.
Add new target `install-shortcuts'.
* zipdist.bat: New file; create zipped binary distribution,
replaces admin/nt/makedist.bat.
2010-07-21 Juanma Barranquero <lekktu@gmail.com>
* INSTALL: Add note about backslashes in Windows paths.
......
......@@ -406,6 +406,9 @@
Removes the installed files in the bin subdirectory in addition to
the files removed by make cleanall.
make dist
Builds Emacs from the available sources and pre-compiled lisp files.
Packages Emacs binaries as full distribution and barebin distribution.
The following targets are intended only for use with the Bazaar sources.
......@@ -428,6 +431,32 @@
bootstrap to rebuild. Occasionally it may be necessary to run this
target after an update.
* Creating binary distributions
Binary distributions (full and barebin distributions) can be
automatically built and packaged from source tarballs or a bzr
checkout.
When building Emacs binary distributions, the --distfiles argument
to configure.bat specifies files to be included in the bin directory
of the binary distributions. This is intended for libraries that are
not built as part of Emacs, e.g. image libraries.
For example, specifying
--distfiles D:\distfiles\libXpm.dll
results in libXpm.dll being copied from D:\distfiles to the
bin directory before packaging starts.
Multiple files can be specified using multiple --distfiles arguments:
--distfiles D:\distfiles\libXpm.dll --distfiles C:\jpeglib\jpeg.dll
For packaging the binary distributions, the 'dist' make target uses
7-Zip (http://www.7-zip.org), which must be installed and available
on the Windows Path.
* Trouble-shooting
......
......@@ -90,6 +90,8 @@ set userldflags=
set doldflags=
set sep1=
set sep2=
set sep3=
set distfiles=
rem ----------------------------------------------------------------------
rem Handle arguments.
......@@ -112,6 +114,7 @@ if "%1" == "--without-gif" goto withoutgif
if "%1" == "--without-tiff" goto withouttiff
if "%1" == "--without-xpm" goto withoutxpm
if "%1" == "--with-svg" goto withsvg
if "%1" == "--distfiles" goto distfiles
if "%1" == "" goto checkutils
:usage
echo Usage: configure [options]
......@@ -132,6 +135,7 @@ echo. --without-gif do not use GIF library even if it is installed
echo. --without-tiff do not use TIFF library even if it is installed
echo. --without-xpm do not use XPM library even if it is installed
echo. --with-svg use the RSVG library (experimental)
echo. --distfiles path to files for make dist, e.g. libXpm.dll
goto end
rem ----------------------------------------------------------------------
:setprefix
......@@ -233,6 +237,16 @@ shift
set svgsupport=Y
goto again
rem ----------------------------------------------------------------------
:distfiles
set HAVE_DISTFILES=1
shift
set distfiles=%distfiles%%sep3%%1
set sep3= %nothing%
shift
goto again
rem ----------------------------------------------------------------------
rem Check that necessary utilities (cp and rm) are present.
:checkutils
......@@ -521,6 +535,35 @@ set HAVE_RSVG=1
:svgDone
rm -f junk.c junk.obj junk.err junk.out
rem Any distfiles provided for building distribution? If no, we're done.
if "(%HAVE_DISTFILES%)"=="()" goto :distFilesDone
rem Any arguments to --distfiles specified? If no, we're done.
if not "%distfiles%"=="" goto :checkDistFiles
set distFilesOk=0
echo No arguments specified for option --distfiles!
goto distfilesDone
:checkDistFiles
echo Checking for distfiles...
rem Check if all specified distfiles exist
set fileNotFound=
for %%d in (%distfiles%) do if not exist %%d set fileNotFound=%%d
if not "%fileNotFound%"=="" goto distFilesNotFound
set distFilesOK=1
echo ...all distfiles found.
goto :distFilesDone
:distFilesNotFound
set distFilesOk=0
echo ...%fileNotFound% not found.
set distfiles=
goto :distfilesDone
:distFilesDone
set fileNotFound=
rem ----------------------------------------------------------------------
:genmakefiles
echo Generating makefiles
......@@ -541,6 +584,7 @@ if (%enablechecking%) == (Y) echo ENABLECHECKS=1 >>config.settings
if (%profile%) == (Y) echo PROFILE=1 >>config.settings
if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings
if not "(%prefix%)" == "()" echo INSTALL_DIR=%prefix%>>config.settings
if not "(%distfiles%)" == "()" echo DIST_FILES=%distfiles%>>config.settings
rem We go thru docflags because usercflags could be "-DFOO=bar" -something
rem and the if command cannot cope with this
for %%v in (%usercflags%) do if not (%%v)==() set docflags=Y
......@@ -642,12 +686,19 @@ if (%tiffsupport%) == (N) goto checkgif
echo Install libtiff development files or use --without-tiff
:checkgif
if not "(%HAVE_GIF%)" == "()" goto donelibchecks
if (%gifsupport%) == (N) goto donelibchecks
if not "(%HAVE_GIF%)" == "()" goto checkdistfiles
if (%gifsupport%) == (N) goto checkdistfiles
set libsOK=0
echo GIF support is missing.
echo Install giflib or libungif development files or use --without-gif
:checkdistfiles
if "(%HAVE_DISTFILES%)" == "()" goto donelibchecks
if (%distFilesOk%) == (1) goto donelibchecks
echo.
echo Files specified with option --distfiles could not be found.
echo Fix these issues before running make dist
:donelibchecks
if (%libsOK%) == (1) goto success
echo.
......@@ -680,6 +731,9 @@ set userldflags=
set doldflags=
set mingwflag=
set mf=
set distfiles=
set HAVE_DISTFILES=
set distFilesOk=
goto skipArchTag
arch-tag: 300d20a4-1675-4e75-b615-7ce1a8c5376c
......
......@@ -23,6 +23,8 @@
# FIXME: This file uses DOS EOLs. Convert to Unix after 22.1 is out
# (and remove or replace this comment).
VERSION = 24.0.50
TRES = $(BLD)/emacs.res
CLIENTRES = $(BLD)/emacsclient.res
......@@ -197,12 +199,15 @@ $(INSTALL_DIR)/bin: $(INSTALL_DIR)
#
# Build and install emacs in INSTALL_DIR
#
install: all $(INSTALL_DIR)/bin install-other-dirs-$(MAKETYPE)
.PHONY: install-bin install-shortcuts
install: install-bin install-shortcuts
install-bin: all $(INSTALL_DIR)/bin install-other-dirs-$(MAKETYPE)
- $(CP) $(BLD)/addpm.exe $(INSTALL_DIR)/bin
- $(CP) $(BLD)/ddeclient.exe $(INSTALL_DIR)/bin
- $(CP) $(BLD)/cmdproxy.exe $(INSTALL_DIR)/bin
- $(CP) $(BLD)/runemacs.exe $(INSTALL_DIR)/bin
- "$(INSTALL_DIR)/bin/addpm" -q
- $(DEL) ../same-dir.tst
- $(DEL) $(INSTALL_DIR)/same-dir.tst
echo SameDirTest > "$(INSTALL_DIR)/same-dir.tst"
......@@ -238,6 +243,14 @@ install-other-dirs-gmake:
$(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp install
$(MAKE) $(MFLAGS) $(XMFLAGS) -C ../leim install
install-shortcuts:
"$(INSTALL_DIR)/bin/addpm" -q
dist: install-bin
$(CP) $(DIST_FILES) $(INSTALL_DIR)/bin
$(CP) README.W32 $(INSTALL_DIR)
$(COMSPEC)$(ComSpec) /c $(ARGQUOTE)zipdist.bat $(INSTALL_DIR) $(VERSION)$(ARGQUOTE)
force-info:
# Note that doc/emacs/makefile knows how to
# put the info files in $(infodir),
......
@echo off
rem Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
rem Free Software Foundation, Inc.
rem Author: Christoph Scholtes cschol2112 at gmail.com
rem This file is part of GNU Emacs.
rem GNU Emacs is free software: you can redistribute it and/or modify
rem it under the terms of the GNU General Public License as published by
rem the Free Software Foundation, either version 3 of the License, or
rem (at your option) any later version.
rem GNU Emacs is distributed in the hope that it will be useful,
rem but WITHOUT ANY WARRANTY; without even the implied warranty of
rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
rem GNU General Public License for more details.
rem You should have received a copy of the GNU General Public License
rem along with GNU Emacs. If not, see http://www.gnu.org/licenses/.
SETLOCAL
rem arg 1: full path to Emacs root directory
set ARG_PATH="%~f1"
rem Path separator cannot be parsed correctly, substitute
set ARG_PATH=%ARG_PATH:\=;%
rem arg 2: Emacs version number
set EMACS_VER=%2
rem Parse out last directory from passed in full path (arg 1)
for /f "tokens=* delims=;" %%G in (%ARG_PATH%) do call :PARSE_PATH %%G
goto :EXIT
:PARSE_PATH
if "%1"=="" (
goto :ZIP_CHECK
)
set ROOT_DIR=%1
SHIFT
goto :PARSE_PATH
rem Check, if 7zip is installed and available on path
:ZIP_CHECK
7z
if %ERRORLEVEL% NEQ 0 goto :ZIP_ERROR
goto ZIP_DIST
:ZIP_ERROR
echo.
echo ERROR: Make sure 7zip is installed and available on the Windows Path!
goto EXIT
rem Build distributions
:ZIP_DIST
pushd ..\..
rem Build and verify full distribution
7z a -bd -tZIP -mx=9 -x!.bzrignore -x!.gitignore -xr!emacs.mdp -xr!*.pdb -xr!*.opt -xr!*~ -xr!CVS -xr!.arch-inventory emacs-%EMACS_VER%-bin-i386.zip %ROOT_DIR%/BUGS %ROOT_DIR%/COPYING %ROOT_DIR%/README %ROOT_DIR%/README.W32 %ROOT_DIR%/INSTALL %ROOT_DIR%/bin %ROOT_DIR%/etc %ROOT_DIR%/info %ROOT_DIR%/lisp %ROOT_DIR%/leim %ROOT_DIR%/site-lisp
7z t emacs-%EMACS_VER%-bin-i386.zip
rem Build and verify binary only distribution
7z a -bd -tZIP -mx=9 emacs-%EMACS_VER%-barebin-i386.zip %ROOT_DIR%/README.W32 %ROOT_DIR%/bin %ROOT_DIR%/etc/DOC-X %ROOT_DIR%/COPYING
7z t emacs-%EMACS_VER%-barebin-i386.zip
popd
goto EXIT
:EXIT
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment