Operating System - HP-UX
1752808 Members
5787 Online
108789 Solutions
New Discussion юеВ

Bad character > (octal 76)

 
rajeshmsr
Advisor

Bad character > (octal 76)

During Sun Solaris to HP Unix migraiton, when i build using Makefile (attached), I got the following error.
Bad character > (octal 76), line 48Make: . Stop.

Kindly suggest a solution.
12 REPLIES 12
Steven Schweda
Honored Contributor

Re: Bad character > (octal 76)

> [...] Sun Solaris [...]

uname -a

> [...] HP Unix [...]

uname -a

> [...] Makefile (attached) [...]

grep '^include' Makefile

You didn't provide a test case which anyone
else could run.

Have you tried using GNU "make"?

http://www.gnu.org/software/make/
Dennis Handly
Acclaimed Contributor

Re: Bad character > (octal 76)

There is nothing obvious on line 48 that has a ">". But it seems that ">" comes from line 46:
LIBS:sh = find . -type d ! \( -name . -o -name .. \) -print 2>/dev/null | grep -v "^\.$" | cut -d '/' -f 2 | grep -v "^libind$" | sort -u

This syntax isn't recognized.

As Steve suggests, you need to use gmake.
rajeshmsr
Advisor

Re: Bad character > (octal 76)

Thanks Steven/Dennis for pointing out the error.

Unfortunately, it seems that we cant use gmake.

Is it possible to do this without gmake?

Note:We are using the make of the "C compilation system".

Thanks.
Steven Schweda
Honored Contributor

Re: Bad character > (octal 76)

> Is it possible to do this without gmake?

Sure. Just rearrange your whole build system
to move those commands out of the "make" file
and into shell scripts.

> Unfortunately, it seems that we cant use
> gmake.

Why not? Too easy? (Ask the person who made
that decision if _he_ would like to do the
work.)

> Note:We are using the make of the "C
> compilation system".

You may think that that conveys some useful
information, but it doesn't.
Dennis Handly
Acclaimed Contributor

Re: Bad character > (octal 76)

>it seems that we can't use gmake.

Then your port just got lots harder. :-(

>We are using the make of the "C compilation system".

Did you mean the primitive HP-UX make(1)?
rajeshmsr
Advisor

Re: Bad character > (octal 76)

>Did you mean the primitive HP-UX make(1)?

Yes. I assume the one at /usr/ccs/bin is the primitive HP-UX make that you are referring.
James R. Ferguson
Acclaimed Contributor

Re: Bad character > (octal 76)

HI:

Yes, as already noted, the HP-UX provided 'make' is a rudimentary one compare to the GNU 'gmake'. Hence, either use 'gmake' or re-make [ no pun intended ] the makefile to accommodate the less robust HP-UX 'make'.

> Unfortunately, it seems that we cant use gmake.

That would seem to be a capricious management decision. If that's correct, ask what "they" want you to spend your time doing to get around the problem.

Regards!

...JRF...
rajeshmsr
Advisor

Re: Bad character > (octal 76)

Thanks everyone for your suggestions.

Replacing

LIBS:sh = find . -type d ! \( -name . -o -name .. \) -print 2>/dev/null | grep -v "^\.$" | cut -d '/' -f 2 | grep -v "^libind$" | sort -u

with

LIBS = `find . -type d ! \( -name . -o -name .. \) -print 2>/dev/null | grep -v "^\.$" | cut -d '/' -f 2 | grep -v "^libind$" | sort -u`

solves the issue.
Dennis Handly
Acclaimed Contributor

Re: Bad character > (octal 76)

A better solution would be to use the real shell's $() vs ``:
LIBS = $$(find . -type d ! \( -name . -o -name .. \) -print 2> /dev/null | grep -v "^\.$" | cut -d '/' -f 2 | grep -v "^libind$" | sort -u)