summaryrefslogtreecommitdiff
path: root/nt/configure.bat
diff options
context:
space:
mode:
authorChristoph Scholtes <cschol2112@gmail.com>2010-07-24 15:35:31 +0200
committerJuanma Barranquero <lekktu@gmail.com>2010-07-24 15:35:31 +0200
commite3aef5c688f5c4a471f92494c0b2599574140658 (patch)
tree91c8c77a8961c818b85b9537e816b0befd996d1f /nt/configure.bat
parentc4cc8b9a23253c12c5cee0be1363343fe019bf20 (diff)
downloademacs-e3aef5c688f5c4a471f92494c0b2599574140658.tar.gz
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.
Diffstat (limited to 'nt/configure.bat')
-rwxr-xr-xnt/configure.bat58
1 files changed, 56 insertions, 2 deletions
diff --git a/nt/configure.bat b/nt/configure.bat
index 705d4e92717..c7bfad35189 100755
--- a/nt/configure.bat
+++ b/nt/configure.bat
@@ -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
@@ -234,6 +238,16 @@ 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
echo Checking for 'cp'...
@@ -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