Fix the MS-Windows build: now guile.c must always be compiled in.
authorEli Zaretskii <eliz@gnu.org>
Wed, 23 Oct 2013 16:28:38 +0000 (19:28 +0300)
committerEli Zaretskii <eliz@gnu.org>
Wed, 23 Oct 2013 16:28:38 +0000 (19:28 +0300)
* build_w32.bat: Always compile guile.c and link against guile.o.
  Reported by Alexey Pavlov <alexpux@gmail.com>.

* makeint.h (guile_gmake_setup): Define prototype unconditionally,
to avoid compiler warnings.

build_w32.bat
makeint.h

index 148dfac9c91b7c843eafb31a33ed50de6dd4dcb3..b9b82350983c652eb0f8d53fb11069b41eaa304b 100644 (file)
@@ -30,7 +30,6 @@ copy config.h.W32 config.h
 rem Guile configuration\r
 set GUILECFLAGS=\r
 set GUILELIBS=\r
-set GUILESRC=\r
 set NOGUILE=\r
 set OPT=-O2\r
 set COMPILER=\r
@@ -79,7 +78,6 @@ GoTo GuileDone
 echo "pkg-config not found, building without Guile"\r
 :GuileDone\r
 if not "%GUILECFLAGS%" == "" echo "Guile found, building with Guile"\r
-if not "%GUILECFLAGS%" == "" set GUILESRC=guile.c\r
 if not "%GUILECFLAGS%" == "" set GUILECFLAGS=%GUILECFLAGS% -DHAVE_GUILE\r
 if "%COMPILER%" == "gcc" if "%OPT%" == "-O0" echo "Building without compiler optimizations"\r
 cd w32\subproc\r
@@ -162,8 +160,7 @@ cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D
 echo WinDebug\fnmatch.obj >>link.dbg\r
 cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c  .\w32\pathstuff.c\r
 echo WinDebug\pathstuff.obj >>link.dbg\r
-if "%GUILESRC%" == "" GoTo LinkDbg\r
-cl.exe /nologo /MT /W4 /GX /Zi /YX /Od %GUILECFLAGS%% /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c guile.c\r
+cl.exe /nologo /MT /W4 /GX /Zi /YX /Od %GUILECFLAGS% /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c guile.c\r
 echo WinDebug\guile.obj >>link.dbg\r
 :LinkDbg\r
 echo off\r
@@ -241,8 +238,7 @@ cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIND
 echo WinRel\fnmatch.obj >>link.rel\r
 cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c  .\w32\pathstuff.c\r
 echo WinRel\pathstuff.obj >>link.rel\r
-if "%GUILESRC%" == "" GoTo LinkRel\r
-cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c guile.c\r
+cl.exe /nologo /MT /W4 /GX /YX /O2 %GUILECFLAGS% /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c guile.c\r
 echo WinRel\guile.obj >>link.rel\r
 :LinkRel\r
 echo off\r
@@ -288,18 +284,13 @@ gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32
 gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c ./glob/fnmatch.c -o fnmatch.o\r
 gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c ./w32/pathstuff.c -o pathstuff.o\r
 gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c ./w32/compat/posixfcn.c -o posixfcn.o\r
-@echo off\r
-set GUILEOBJ=\r
-if "%GUILESRC%" == "" GoTo LinkGCC\r
-set GUILEOBJ=guile.o\r
-echo on\r
 gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% %GUILECFLAGS% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c guile.c\r
 :LinkGCC\r
 @echo off\r
 Rem The version NN of libgnumake-NN.dll.a should be bumped whenever\r
 Rem the API changes in binary-incompatible manner.\r
 @echo on\r
-gcc -mthreads -gdwarf-2 -g3 -o gnumake.exe variable.o rule.o remote-stub.o commands.o file.o getloadavg.o default.o signame.o expand.o dir.o main.o getopt1.o %GUILEOBJ% job.o output.o read.o version.o getopt.o arscan.o remake.o misc.o hash.o strcache.o ar.o function.o vpath.o implicit.o loadapi.o load.o glob.o fnmatch.o pathstuff.o posixfcn.o w32_misc.o sub_proc.o w32err.o %GUILELIBS% -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -Wl,--out-implib=libgnumake-1.dll.a\r
+gcc -mthreads -gdwarf-2 -g3 -o gnumake.exe variable.o rule.o remote-stub.o commands.o file.o getloadavg.o default.o signame.o expand.o dir.o main.o getopt1.o guile.o job.o output.o read.o version.o getopt.o arscan.o remake.o misc.o hash.o strcache.o ar.o function.o vpath.o implicit.o loadapi.o load.o glob.o fnmatch.o pathstuff.o posixfcn.o w32_misc.o sub_proc.o w32err.o %GUILELIBS% -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -Wl,--out-implib=libgnumake-1.dll.a\r
 @GoTo BuildEnd\r
 :Usage\r
 echo Usage: %0 [options] [gcc]\r
@@ -310,8 +301,6 @@ echo.  --without-guile   Do not compile Guile support even if found
 echo.  --help            Display these instructions and exit\r
 :BuildEnd\r
 @echo off\r
-set GUILEOBJ=\r
-set GUILESRC=\r
 set GUILELIBS=\r
 set GUILECFLAGS=\r
 set PKGMSC=\r
index 15f2dd42bd9f3d12efdc1de81c6c98e2eaa3df33..77f51e019b7b4b9eaf684bcb8baaf6400c13d35c 100644 (file)
--- a/makeint.h
+++ b/makeint.h
@@ -512,9 +512,7 @@ const char *strcache_add_len (const char *str, unsigned int len);
 int strcache_setbufsize (unsigned int size);
 
 /* Guile support  */
-#ifdef HAVE_GUILE
 int guile_gmake_setup (const gmk_floc *flocp);
-#endif
 
 /* Loadable object support.  Sets to the strcached name of the loaded file.  */
 typedef int (*load_func_t)(const gmk_floc *flocp);