configure.mk bugs
by Brad Schick · in Torque Game Engine · 10/13/2001 (3:05 pm) · 4 replies
Nice to see the CVS server running. I've been waiting for CVS before downloading. I compiled everything with the VC6 GUI and it worked perfectly.
But when I tried the make file approach I ran into several issues. The first is that configure.mk has problems on Win32. They are:
-The line below does not work as expected
@echo ifeq \"$(BUILD)\" \"DEBUG\" >> mk/conf.mk
-I had to add platform specific quotes to fix the problem, not sure if this is the best approach.
-Spaces before line endings causes repeated calls to configure.mk to expand names "out" becomes "out " etc.
Below is a patch (from "cvs diff") with all of my changes. Most of the changes are subtle, like removing a space at the end of a line or before >>. I tested the changes on Win32 and Linux and they work on both.
I am now chasing down another problem with compiling the 'lib' directory.
-Brad
===================================================================
RCS file: /cvs/torque/torque/mk/configure.mk,v
retrieving revision 1.8
diff -r1.8 configure.mk
5a6
> QUOTE='
10c11
< CONFIG_STATUS=VALID
---
> CONFIG_STATUS=VALID
16a18,21
> ifeq ($(OS), WIN32)
> QUOTE=
> endif
>
62,64c67,69
< @echo OS=$(OS) > mk/conf.mk
< @echo COMPILER=$(COMPILER) >> mk/conf.mk
< @echo BUILD=$(BUILD) >> mk/conf.mk
---
> @echo OS=$(OS)> mk/conf.mk
> @echo COMPILER=$(COMPILER)>> mk/conf.mk
> @echo BUILD=$(BUILD)>> mk/conf.mk
66,70c71,75
< @echo ifeq \"$(BUILD)\" \"DEBUG\" >> mk/conf.mk
< @echo BUILD_SUFFIX:=_DEBUG >> mk/conf.mk
< @echo else >> mk/conf.mk
< @echo BUILD_SUFFIX:= >> mk/conf.mk
< @echo endif >> mk/conf.mk
---
> @echo $(QUOTE)ifeq ($$(BUILD), DEBUG)$(QUOTE)>> mk/conf.mk
> @echo BUILD_SUFFIX:=_DEBUG>> mk/conf.mk
> @echo else>> mk/conf.mk
> @echo BUILD_SUFFIX:=>> mk/conf.mk
> @echo endif>> mk/conf.mk
72,73c77,78
< @echo CONFIG_STATUS=$(CONFIG_STATUS) >> mk/conf.mk
< @echo DIR.OBJ=$(DIR.OBJ) >> mk/conf.mk
---
> @echo CONFIG_STATUS=$(CONFIG_STATUS)>> mk/conf.mk
> @echo DIR.OBJ=$(DIR.OBJ)>> mk/conf.mk
75,77c80,82
< @echo ifndef COMPILER_OPTIONS >> mk/conf.mk
< @echo DIR.OBJ:=$(DIR.OBJ).$(COMPILER).$(BUILD) >> mk/conf.mk
< @echo endif >> mk/conf.mk
---
> @echo ifndef COMPILER_OPTIONS>> mk/conf.mk
> @echo DIR.OBJ:=$(DIR.OBJ).$(COMPILER).$(BUILD)>> mk/conf.mk
> @echo endif>> mk/conf.mk
But when I tried the make file approach I ran into several issues. The first is that configure.mk has problems on Win32. They are:
-The line below does not work as expected
@echo ifeq \"$(BUILD)\" \"DEBUG\" >> mk/conf.mk
-I had to add platform specific quotes to fix the problem, not sure if this is the best approach.
-Spaces before line endings causes repeated calls to configure.mk to expand names "out" becomes "out " etc.
Below is a patch (from "cvs diff") with all of my changes. Most of the changes are subtle, like removing a space at the end of a line or before >>. I tested the changes on Win32 and Linux and they work on both.
I am now chasing down another problem with compiling the 'lib' directory.
-Brad
===================================================================
RCS file: /cvs/torque/torque/mk/configure.mk,v
retrieving revision 1.8
diff -r1.8 configure.mk
5a6
> QUOTE='
10c11
< CONFIG_STATUS=VALID
---
> CONFIG_STATUS=VALID
16a18,21
> ifeq ($(OS), WIN32)
> QUOTE=
> endif
>
62,64c67,69
< @echo OS=$(OS) > mk/conf.mk
< @echo COMPILER=$(COMPILER) >> mk/conf.mk
< @echo BUILD=$(BUILD) >> mk/conf.mk
---
> @echo OS=$(OS)> mk/conf.mk
> @echo COMPILER=$(COMPILER)>> mk/conf.mk
> @echo BUILD=$(BUILD)>> mk/conf.mk
66,70c71,75
< @echo ifeq \"$(BUILD)\" \"DEBUG\" >> mk/conf.mk
< @echo BUILD_SUFFIX:=_DEBUG >> mk/conf.mk
< @echo else >> mk/conf.mk
< @echo BUILD_SUFFIX:= >> mk/conf.mk
< @echo endif >> mk/conf.mk
---
> @echo $(QUOTE)ifeq ($$(BUILD), DEBUG)$(QUOTE)>> mk/conf.mk
> @echo BUILD_SUFFIX:=_DEBUG>> mk/conf.mk
> @echo else>> mk/conf.mk
> @echo BUILD_SUFFIX:=>> mk/conf.mk
> @echo endif>> mk/conf.mk
72,73c77,78
< @echo CONFIG_STATUS=$(CONFIG_STATUS) >> mk/conf.mk
< @echo DIR.OBJ=$(DIR.OBJ) >> mk/conf.mk
---
> @echo CONFIG_STATUS=$(CONFIG_STATUS)>> mk/conf.mk
> @echo DIR.OBJ=$(DIR.OBJ)>> mk/conf.mk
75,77c80,82
< @echo ifndef COMPILER_OPTIONS >> mk/conf.mk
< @echo DIR.OBJ:=$(DIR.OBJ).$(COMPILER).$(BUILD) >> mk/conf.mk
< @echo endif >> mk/conf.mk
---
> @echo ifndef COMPILER_OPTIONS>> mk/conf.mk
> @echo DIR.OBJ:=$(DIR.OBJ).$(COMPILER).$(BUILD)>> mk/conf.mk
> @echo endif>> mk/conf.mk
About the author
#2
I used the Win32 GNU tools the install docs pointed to. I may not have been clear about the problems. They only occur when you run configure.mk mulitiple times without manually deleting conf.mk between runs.
Also the line I noted in the original post does not even work on Linux. If you look at conf.mk you will find it produces the following text which I am sure is not correct.
ifeq "DEBUG" "DEBUG"
On Linux I have GNU Make version 3.79.1
10/13/2001 (5:12 pm)
GNU Make version 3.78.1I used the Win32 GNU tools the install docs pointed to. I may not have been clear about the problems. They only occur when you run configure.mk mulitiple times without manually deleting conf.mk between runs.
Also the line I noted in the original post does not even work on Linux. If you look at conf.mk you will find it produces the following text which I am sure is not correct.
ifeq "DEBUG" "DEBUG"
On Linux I have GNU Make version 3.79.1
#3
--Rick
10/14/2001 (11:22 am)
What version of windows are you using? 95/98/SE/ME/NT/XP/2000 and service pack #?--Rick
Torque Owner Tim Gift