mirror of
https://github.com/mirror/make.git
synced 2025-03-13 19:30:41 +08:00
Fix the MS-Windows build: now guile.c must always be compiled in.
* 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.
This commit is contained in:
parent
9c28d5125d
commit
309768aff1
@ -30,7 +30,6 @@ copy config.h.W32 config.h
|
|||||||
rem Guile configuration
|
rem Guile configuration
|
||||||
set GUILECFLAGS=
|
set GUILECFLAGS=
|
||||||
set GUILELIBS=
|
set GUILELIBS=
|
||||||
set GUILESRC=
|
|
||||||
set NOGUILE=
|
set NOGUILE=
|
||||||
set OPT=-O2
|
set OPT=-O2
|
||||||
set COMPILER=
|
set COMPILER=
|
||||||
@ -79,7 +78,6 @@ GoTo GuileDone
|
|||||||
echo "pkg-config not found, building without Guile"
|
echo "pkg-config not found, building without Guile"
|
||||||
:GuileDone
|
:GuileDone
|
||||||
if not "%GUILECFLAGS%" == "" echo "Guile found, building with Guile"
|
if not "%GUILECFLAGS%" == "" echo "Guile found, building with Guile"
|
||||||
if not "%GUILECFLAGS%" == "" set GUILESRC=guile.c
|
|
||||||
if not "%GUILECFLAGS%" == "" set GUILECFLAGS=%GUILECFLAGS% -DHAVE_GUILE
|
if not "%GUILECFLAGS%" == "" set GUILECFLAGS=%GUILECFLAGS% -DHAVE_GUILE
|
||||||
if "%COMPILER%" == "gcc" if "%OPT%" == "-O0" echo "Building without compiler optimizations"
|
if "%COMPILER%" == "gcc" if "%OPT%" == "-O0" echo "Building without compiler optimizations"
|
||||||
cd w32\subproc
|
cd w32\subproc
|
||||||
@ -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
|
echo WinDebug\fnmatch.obj >>link.dbg
|
||||||
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
|
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
|
||||||
echo WinDebug\pathstuff.obj >>link.dbg
|
echo WinDebug\pathstuff.obj >>link.dbg
|
||||||
if "%GUILESRC%" == "" GoTo LinkDbg
|
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
|
||||||
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
|
|
||||||
echo WinDebug\guile.obj >>link.dbg
|
echo WinDebug\guile.obj >>link.dbg
|
||||||
:LinkDbg
|
:LinkDbg
|
||||||
echo off
|
echo off
|
||||||
@ -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
|
echo WinRel\fnmatch.obj >>link.rel
|
||||||
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
|
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
|
||||||
echo WinRel\pathstuff.obj >>link.rel
|
echo WinRel\pathstuff.obj >>link.rel
|
||||||
if "%GUILESRC%" == "" GoTo LinkRel
|
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
|
||||||
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
|
|
||||||
echo WinRel\guile.obj >>link.rel
|
echo WinRel\guile.obj >>link.rel
|
||||||
:LinkRel
|
:LinkRel
|
||||||
echo off
|
echo off
|
||||||
@ -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
|
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c ./glob/fnmatch.c -o fnmatch.o
|
||||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c ./w32/pathstuff.c -o pathstuff.o
|
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c ./w32/pathstuff.c -o pathstuff.o
|
||||||
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
|
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
|
||||||
@echo off
|
|
||||||
set GUILEOBJ=
|
|
||||||
if "%GUILESRC%" == "" GoTo LinkGCC
|
|
||||||
set GUILEOBJ=guile.o
|
|
||||||
echo on
|
|
||||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% %GUILECFLAGS% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c guile.c
|
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% %GUILECFLAGS% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c guile.c
|
||||||
:LinkGCC
|
:LinkGCC
|
||||||
@echo off
|
@echo off
|
||||||
Rem The version NN of libgnumake-NN.dll.a should be bumped whenever
|
Rem The version NN of libgnumake-NN.dll.a should be bumped whenever
|
||||||
Rem the API changes in binary-incompatible manner.
|
Rem the API changes in binary-incompatible manner.
|
||||||
@echo on
|
@echo on
|
||||||
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
|
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
|
||||||
@GoTo BuildEnd
|
@GoTo BuildEnd
|
||||||
:Usage
|
:Usage
|
||||||
echo Usage: %0 [options] [gcc]
|
echo Usage: %0 [options] [gcc]
|
||||||
@ -310,8 +301,6 @@ echo. --without-guile Do not compile Guile support even if found
|
|||||||
echo. --help Display these instructions and exit
|
echo. --help Display these instructions and exit
|
||||||
:BuildEnd
|
:BuildEnd
|
||||||
@echo off
|
@echo off
|
||||||
set GUILEOBJ=
|
|
||||||
set GUILESRC=
|
|
||||||
set GUILELIBS=
|
set GUILELIBS=
|
||||||
set GUILECFLAGS=
|
set GUILECFLAGS=
|
||||||
set PKGMSC=
|
set PKGMSC=
|
||||||
|
@ -512,9 +512,7 @@ const char *strcache_add_len (const char *str, unsigned int len);
|
|||||||
int strcache_setbufsize (unsigned int size);
|
int strcache_setbufsize (unsigned int size);
|
||||||
|
|
||||||
/* Guile support */
|
/* Guile support */
|
||||||
#ifdef HAVE_GUILE
|
|
||||||
int guile_gmake_setup (const gmk_floc *flocp);
|
int guile_gmake_setup (const gmk_floc *flocp);
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Loadable object support. Sets to the strcached name of the loaded file. */
|
/* Loadable object support. Sets to the strcached name of the loaded file. */
|
||||||
typedef int (*load_func_t)(const gmk_floc *flocp);
|
typedef int (*load_func_t)(const gmk_floc *flocp);
|
||||||
|
Loading…
Reference in New Issue
Block a user