Operating System - Linux
1752805 Members
5708 Online
108789 Solutions
New Discussion юеВ

Imake/make migrating 11iv1 to 11iv2

 
SOLVED
Go to solution
yazgoo
Frequent Advisor

Imake/make migrating 11iv1 to 11iv2

Hello everyone,
I'm trying to compile a code from 11iv1 to v2.
It uses Imake then make in a configure file
------------configure--------------------------
-------------------
#!/bin/csh
unsetenv IMAKEINCLUDE
set SYSTEM=hppa11.00-hp-hpux
echo "Configuring for " $SYSTEM
imake -DConfig=$SYSTEM -T "IBSImake.tmpl" -I./config -I/bin/imake
/bin/make -r Makefiles
------------------------------------------------------------------
Here's the output
Make: Must be a separator on rules line 16. Stop.
I have a look at the makefile
--------------makefile--------------------------------------------
15. CPU
16. SYSTEM = $(CPU)
17. else
------------------------------------------------------------------
Yazgoo
13 REPLIES 13
Dennis Handly
Acclaimed Contributor

Re: Imake/make migrating 11iv1 to 11iv2

You need to provide more lines of your makefile. But from that "else", you need gmake to support "if", "else" and "endif" in your makefiles.
yazgoo
Frequent Advisor

Re: Imake/make migrating 11iv1 to 11iv2

there's a if before the else,
and it works under 11.11 .
for my makefile, here's the begining :
--------------makefile--------------------------------------------------------------------
ifdef CPU
SYSTEM = $(CPU)
else

SYSTEM = hppa11.23-hp-hpux

endif

# 140

ifeq ($(SYSTEM),sun4)

OSNAME = SunOS 5.3
OSMAJOR = 5
OSMINOR = 3

PRIVATEC++INCLUDES = +I"/extern/CenterLine/clc++/sparc-sunos4/incl"
MOTIFROOT = /usr/local/lib/motif/lib

MOTIFINCLUDES = -I$(MOTIFROOT)
MOTIFLDPATH = -L$(MOTIFROOT)/Xm \
-L$(MOTIFROOT)/Xt \
-L$(MOTIFROOT)/X
MOTIFLIBRARIES = -lXm -lXt -lX11
MRMLDPATH = -L$(MOTIFROOT)/Mrm
MRMLIBRARIES = -lMrm

STDCC = gcc
STDC++ = gcc

OTHERCC = gcc
OTHERC++ = CC

endif
#...other systems
-------------/makefile--------------------------------------------------------------------
if I set SYSTEM to hppa11.23-hp-hpux in configure, I have the same result,
and hppa11.23-hp-hpux isn't in the list.
hppa11.00-hp-hpux is listed.
Yazgoo
Dennis Handly
Acclaimed Contributor

Re: Imake/make migrating 11iv1 to 11iv2

>there's a if before the else, and it works under 11.11.

HP's make doesn't support "if". You must have have used gmake, possibly in /usr/local/bin/make?
yazgoo
Frequent Advisor

Re: Imake/make migrating 11iv1 to 11iv2

Sorry, I meant a 'ifdef'.
The code I showed works on HP 11.11.
Yazgoo
yazgoo
Frequent Advisor

Re: Imake/make migrating 11iv1 to 11iv2

hum...you're right...
I used the system make, which wasn't GNU make
Now that I use it, I got a new error :
> make: getcwd: : No such file or directory
> make: *** No rule to make target `Makefiles'. Stop.
And Makefiles is a target which exists.
Yazgoo
Dennis Handly
Acclaimed Contributor

Re: Imake/make migrating 11iv1 to 11iv2

> make: getcwd: : No such file or directory

Is getcwd a target or a command? What is the line in question that has it?
yazgoo
Frequent Advisor

Re: Imake/make migrating 11iv1 to 11iv2

getcwd isn't in the Makefile.
make: getcwd: : No such file or directory
It comes from make bin.
getcwd is a c function which returns a char * similar to the result of pwd.
I think make verifies the inode exits before using it with getcwd, and doesn't find it.
Which means some dependencies aren't where they should.
I've tried changing some paths, but there are many.
I may install gmake, Imake.

Thanks
Yazgoo
Dennis Handly
Acclaimed Contributor
Solution

Re: Imake/make migrating 11iv1 to 11iv2

getcwd isn't in the Makefile.
make: getcwd: : No such file or directory
It comes from make bin.

Which make were you using when you got this error?

>getcwd is a C function

Yes, I know what getcwd(3) does. I found it strange that make(1) would mention it, so I assumed it was from your makefile.

For getcwd(3) to get that errno, it would imply that the directory path back to the mount point was broken. I would expect that to be a one time problem, not continual. What does "/usr/bin/pwd" show?
yazgoo
Frequent Advisor

Re: Imake/make migrating 11iv1 to 11iv2

It shows the current path. ^^
Yazgoo