All Forums |
Register |
Login |
Search |
Subscriptions |
My Profile |
Inbox |
Tool Warehouse |
FAQs |
Resources |
Help |
Member List |
Address Book |
Logout |
|
|
Problem in executing a Makefile in Interix
|
Logged in as: Guest |
Users viewing this topic: none |
|
Login  |
|
|
Problem in executing a Makefile in Interix - Oct. 17, '05, 8:05:36 AM
|
|
|
swayamprakashbehera
Posts: 2
Joined: Jul. 14, '05,
Status: offline
|
Hi,
I'm new to Windows SFU. Our aim is to port a running Solaris application into Windows 2000/XP. I'm really impreseed with the kind of feedback I got about the use of Interix for this porting requirement. But, while trying to build my application in Windows I'm facing a problem in one of my Makefile. This Makefile is running fine without any error in Solaris, but giving me the following error:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ make all
: 17:29:11 10/17/05 ; cd /dev/fs/C/Swayam/Projects/Developement/splash/Base/db/Oracle8i/metadata/client ; Make all;
sh: syntax error: `if' unmatched
"makefile", line 22: warning: "if [ ! -d "/dev/fs/C/Swayam/Projects/Developement/splash/Base/vendor" -o ! -d "/dev/fs/C/Swayam/Projects/Developement/splash/Base/vendor/EnterpriseTrafficCache" ]" returned non-zero status
"makefile", line 37: Unassociated shell command "then echo 'load_client_config.sql' ; echo 'load_client_metadata.sql' ; fi ; if [ ! -d "${WORKING_HOME}/vendor" ] ; then echo 'load_client_metadata_core.sql' ; fi ; if [ -d "${WORKING_HOME}/vendor/EnterpriseTrafficCache" ] ; then echo 'load_sched_info_web.sql' ; else echo 'load_sched_info_core.sql' ; fi ;"
Fatal errors encountered -- cannot continue
: 17:29:12 10/17/05 ; PWD=/dev/fs/C/Swayam/Projects/Developement/splash/Base/db/Oracle8i/metadata/client : Done 1 ;
-rw-r--r-- sers 266 Oct 17 17:29 .makelog.1017-172911
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
And my makefile is:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
WSROOT=../../../..
include $(WSROOT)/etc/wsmkinclude.common
client_base:sh= \
if [ ! -d "${WORKING_HOME}/vendor" -o ! -d "${WORKING_HOME}/vendor/EnterpriseTrafficCache" ] ;\
then \
echo 'load_client_config.sql' ;\
echo 'load_client_metadata.sql' ;\
fi ;\
if [ ! -d "${WORKING_HOME}/vendor" ] ;\
then \
echo 'load_client_metadata_core.sql' ;\
fi ;\
if [ -d "${WORKING_HOME}/vendor/EnterpriseTrafficCache" ] ;\
then \
echo 'load_sched_info_web.sql' ;\
else \
echo 'load_sched_info_core.sql' ;\
fi ;
SQLSOURCE= jobType.sql \
client_feature_metadata.sql \
${client_base}
SQLTOUCH= $(SQLSOURCE:.sql=.o)
SQLDROP=
all: $(SQLTOUCH)
clean: drop
rm -f *.o
drop: $(SQLDROP)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If anybody has any solution to this, then pls help me.
All my thanks to those who are going to help me in resolving this issue.
Regards
Swayam
< Message edited by Rodney -- Oct. 18, '05, 1:16:13 AM >
|
|
|
RE: Problem in executing a Makefile in Interix - Oct. 17, '05, 3:48:12 PM
|
|
|
interix
Posts: 1
Joined: Jul. 27, '05,
Status: offline
|
Yep - an easy one for a change - you need to download gnu make from interop tools warehouse - use pkg_add is the easiest then execute gmake all
|
|
|
RE: Problem in executing a Makefile in Interix - Oct. 18, '05, 12:14:54 AM
|
|
|
swayamprakashbehera
Posts: 2
Joined: Jul. 14, '05,
Status: offline
|
Thanks for your suggession. As you said I've tried with gmake also. And this time I'm getting the following message:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ gmake all
Makefile:21: Malformed per-target variable definition
Memory fault
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
any further advice???
-Regards
Swayam
|
|
|
RE: Problem in executing a Makefile in Interix - Oct. 18, '05, 11:26:37 PM
|
|
|
markfunk
Posts: 629
Joined: Mar. 31, '03,
Status: offline
|
Neither gmake(3.80) or Interix make (/bin/make) will help you - as is.
Interix make does support the TARGET:sh=... syntax,
but there's a problem in that the shell only executes up to the first ';'
I haven't been able to find a fix around this "feature"/"bug".
And gmake doesn't support the TARGET:sh= ... syntax at all.
To use either /bin/make or gmake you have to change you Makefile.
The workarounds:
Interix make:
take the multiline shell commands and put it into another file
called "client_base.sh"
In the make file, use
client_base:sh= WORKING_HOME=${WORKING_HOME} ./client_base.sh
gmake:
Replace "client_base:sh= \"
with
client_base:= $(shell \
and add a ')' on the last line of the shell commands
Question:
- what version of gmake did you try ?
And where did you get it ? (from interopsystems tool warehouse ?)
I did not have any trouble with my Interix versions of gmake.
Notes:
- Microsoft has a solution guide for migrating UNIX makefiles to Windows.
It points out the diffs between gmake and Interix make and Solaris make.
I don't claim that this doc covers all the Solaris make features, but
it does some. (I didn't have a solaris system to play with at the time)
http://go.microsoft.com/fwlink/?LinkId=22228
|
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
|
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts |
|
|
|