[comp.sys.hp] need help with a imake / cpp problem on a hp 720

mh@roger.imsd.contel.com (Mike Hoegeman) (06/21/91)

I have some x software which i want to compile on a an hp 720 with
HP-UX 8.x on it. when i run imake on it though it mangles the resulting
Makefile output. I use the same imake and config files on a sun (by
swapping hp.cf with sun.cf) files and it works fine. I suspect that it
is cpp doing the mangling. all the text is there it is just formatted
incorrectly there are spaces at the start of lines when there should
not be and there are spaces at the start of lines that should start
with a tab.

this is an example of the mangling..

 all::
 line_1_of_stuff
 line_2_of_stuff

it should be...

all::
	line_1_of_stuff
	line_2_of_stuff

Does anybody know what the problem might be???

-mike hoegeman

mh@awds.imsd.contel.com

harry@hpcvlx.cv.hp.com. (Harry Phinney) (06/22/91)

Mike Hoegeman writes:
> I have some x software which i want to compile on a an hp 720 with
> HP-UX 8.x on it. when i run imake on it though it mangles the resulting
> Makefile output. 

I can't guarantee that it'll solve your problem, but you are welcome to
try using:

hpcvaaz.cv.hp.com:~ftp/pub/imake.700

This is an imake executable which seems to work for us.

Harry Phinney   harry@hp-pcd.cv.hp.com

piet@cs.ruu.nl (Piet van Oostrum) (06/29/91)

>>>>> mh@roger.imsd.contel.com (Mike Hoegeman) (MH) writes:

MH> I have some x software which i want to compile on a an hp 720 with
MH> HP-UX 8.x on it. when i run imake on it though it mangles the resulting
MH> Makefile output. I use the same imake and config files on a sun (by
MH> swapping hp.cf with sun.cf) files and it works fine. I suspect that it
MH> is cpp doing the mangling. all the text is there it is just formatted
MH> incorrectly there are spaces at the start of lines when there should
MH> not be and there are spaces at the start of lines that should start
MH> with a tab.

cpp deletes tab characters.

Your imake.c should have something like this in it:


/*
 * It is known that we need this kludge on the following machines:
 *
 * 	sun, hpux, macII, CRAY, att
 *
 * The latter group all happen to be SYSV as well.
 */

#if defined(sun) || defined(SYSV) || defined(hpux)
#define REDUCED_TO_ASCII_SPACE
#endif
#ifdef REDUCED_TO_ASCII_SPACE
int	InRule = FALSE;
#endif

/*
 * Some versions of cpp reduce all tabs in macro expansion to a single
 * space.  In addition, the escaped newline may be replaced with a
 * space instead of being deleted.  Blech.
 */
#ifndef REDUCED_TO_ASCII_SPACE
#define KludgeOutputLine(arg)
#define KludgeResetRule()
#endif
-- 
Piet* van Oostrum, Dept of Computer Science, Utrecht University,
Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands.
Telephone: +31 30 531806   Uucp:   uunet!mcsun!ruuinf!piet
Telefax:   +31 30 513791   Internet:  piet@cs.ruu.nl   (*`Pete')