aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Rumney2008-07-23 15:41:23 +0000
committerJason Rumney2008-07-23 15:41:23 +0000
commit75663c75e0b1f07539c0b296405f707edb30c7a2 (patch)
tree8de710a5515e7063f1d70edcc68e9b9660e3bade
parent4b1355037a72c74a0711193d8ef9555bdb728772 (diff)
downloademacs-75663c75e0b1f07539c0b296405f707edb30c7a2.tar.gz
emacs-75663c75e0b1f07539c0b296405f707edb30c7a2.zip
* configure.bat: New option --profile.
* gmake.defs: Set cflags and ldflags for profiling when specified.
-rw-r--r--nt/ChangeLog5
-rwxr-xr-xnt/configure.bat10
-rw-r--r--nt/gmake.defs13
3 files changed, 26 insertions, 2 deletions
diff --git a/nt/ChangeLog b/nt/ChangeLog
index 070e46939b8..583bb5d515a 100644
--- a/nt/ChangeLog
+++ b/nt/ChangeLog
@@ -1,3 +1,8 @@
12008-07-23 Jason Rumney <jasonr@gnu.org>
2
3 * configure.bat: New option --profile.
4 * gmake.defs: Set cflags and ldflags for profiling when specified.
5
12008-07-23 Dan Nicolaescu <dann@ics.uci.edu> 62008-07-23 Dan Nicolaescu <dann@ics.uci.edu>
2 7
3 * config.nt (C_SWITCH_SITE, LD_SWITCH_SITE): Do not undefine. 8 * config.nt (C_SWITCH_SITE, LD_SWITCH_SITE): Do not undefine.
diff --git a/nt/configure.bat b/nt/configure.bat
index 3dd9a7fcc24..f99f0b284f4 100755
--- a/nt/configure.bat
+++ b/nt/configure.bat
@@ -80,6 +80,7 @@ rem Default settings.
80set prefix= 80set prefix=
81set nodebug=N 81set nodebug=N
82set noopt=N 82set noopt=N
83set profile=N
83set nocygwin=N 84set nocygwin=N
84set COMPILER= 85set COMPILER=
85set usercflags= 86set usercflags=
@@ -99,6 +100,7 @@ if "%1" == "--with-gcc" goto withgcc
99if "%1" == "--with-msvc" goto withmsvc 100if "%1" == "--with-msvc" goto withmsvc
100if "%1" == "--no-debug" goto nodebug 101if "%1" == "--no-debug" goto nodebug
101if "%1" == "--no-opt" goto noopt 102if "%1" == "--no-opt" goto noopt
103if "%1" == "--profile" goto profile
102if "%1" == "--no-cygwin" goto nocygwin 104if "%1" == "--no-cygwin" goto nocygwin
103if "%1" == "--cflags" goto usercflags 105if "%1" == "--cflags" goto usercflags
104if "%1" == "--ldflags" goto userldflags 106if "%1" == "--ldflags" goto userldflags
@@ -116,6 +118,7 @@ echo. --with-gcc use GCC to compile Emacs
116echo. --with-msvc use MSVC to compile Emacs 118echo. --with-msvc use MSVC to compile Emacs
117echo. --no-debug exclude debug info from executables 119echo. --no-debug exclude debug info from executables
118echo. --no-opt disable optimization 120echo. --no-opt disable optimization
121echo. --profile enable profiling
119echo. --no-cygwin use -mno-cygwin option with GCC 122echo. --no-cygwin use -mno-cygwin option with GCC
120echo. --cflags FLAG pass FLAG to compiler 123echo. --cflags FLAG pass FLAG to compiler
121echo. --ldflags FLAG pass FLAG to compiler when linking 124echo. --ldflags FLAG pass FLAG to compiler when linking
@@ -152,6 +155,11 @@ set noopt=Y
152shift 155shift
153goto again 156goto again
154rem ---------------------------------------------------------------------- 157rem ----------------------------------------------------------------------
158:profile
159set profile=Y
160shift
161goto again
162rem ----------------------------------------------------------------------
155:nocygwin 163:nocygwin
156set nocygwin=Y 164set nocygwin=Y
157shift 165shift
@@ -492,6 +500,7 @@ if not "(%mf%)" == "()" echo MCPU_FLAG=%mf%>>config.settings
492if not "(%dbginfo%)" == "()" echo DEBUG_INFO=%dbginfo%>>config.settings 500if not "(%dbginfo%)" == "()" echo DEBUG_INFO=%dbginfo%>>config.settings
493if (%nodebug%) == (Y) echo NODEBUG=1 >>config.settings 501if (%nodebug%) == (Y) echo NODEBUG=1 >>config.settings
494if (%noopt%) == (Y) echo NOOPT=1 >>config.settings 502if (%noopt%) == (Y) echo NOOPT=1 >>config.settings
503if (%profile%) == (Y) echo PROFILE=1 >>config.settings
495if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings 504if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings
496if not "(%prefix%)" == "()" echo INSTALL_DIR=%prefix%>>config.settings 505if not "(%prefix%)" == "()" echo INSTALL_DIR=%prefix%>>config.settings
497rem We go thru docflags because usercflags could be "-DFOO=bar" -something 506rem We go thru docflags because usercflags could be "-DFOO=bar" -something
@@ -619,6 +628,7 @@ set $foo$=
619set prefix= 628set prefix=
620set nodebug= 629set nodebug=
621set noopt= 630set noopt=
631set profile=
622set nocygwin= 632set nocygwin=
623set COMPILER= 633set COMPILER=
624set MAKECMD= 634set MAKECMD=
diff --git a/nt/gmake.defs b/nt/gmake.defs
index 24c08595547..4959aa947ee 100644
--- a/nt/gmake.defs
+++ b/nt/gmake.defs
@@ -197,9 +197,18 @@ DEBUG_CFLAGS = -DEMACSDEBUG
197else 197else
198DEBUG_CFLAGS = 198DEBUG_CFLAGS =
199endif 199endif
200CFLAGS = -I. $(ARCH_CFLAGS) $(DEBUG_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS) 200CFLAGS = -I. $(ARCH_CFLAGS) $(DEBUG_CFLAGS) $(PROFILE_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS)
201EMACS_EXTRA_C_FLAGS = -DUSE_CRT_DLL=1 201EMACS_EXTRA_C_FLAGS = -DUSE_CRT_DLL=1
202 202
203ifdef PROFILE
204PROFILE_CFLAGS = -pg
205PROFILE_LDFLAGS = -pg
206else
207PROFILE_CFLAGS =
208PROFILE_LDFLAGS =
209endif
210
211
203# see comments in allocate_heap in w32heap.c before changing any of the 212# see comments in allocate_heap in w32heap.c before changing any of the
204# -stack, -heap, or -image-base settings. 213# -stack, -heap, or -image-base settings.
205TEMACS_EXTRA_LINK = -Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 $(SUBSYSTEM_CONSOLE) -Wl,-entry,__start -Wl,-Map,$(BLD)/temacs.map 214TEMACS_EXTRA_LINK = -Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 $(SUBSYSTEM_CONSOLE) -Wl,-entry,__start -Wl,-Map,$(BLD)/temacs.map
@@ -276,7 +285,7 @@ else
276ERROR Unknown architecture type "$(ARCH)". 285ERROR Unknown architecture type "$(ARCH)".
277endif 286endif
278 287
279LINK_FLAGS = $(ARCH_LDFLAGS) $(DEBUG_LINK) $(NOCYGWIN) $(USER_LDFLAGS) 288LINK_FLAGS = $(ARCH_LDFLAGS) $(DEBUG_LINK) $(PROFILE_LDFLAGS) $(NOCYGWIN) $(USER_LDFLAGS)
280 289
281export XMFLAGS 290export XMFLAGS
282 291