Operating System - HP-UX
1753618 Members
5935 Online
108797 Solutions
New Discussion

xmkmf inserting extra space in Makefile?

 
Matthew Crouse
Advisor

xmkmf inserting extra space in Makefile?

Hello,

Long time listener, first time caller, etc. I have a problem with xmkmf/imake that I've spent all day trying to figure out. This is on a 9000/780 system running HP-UX 10.20, btw. My setup is like this:

The Imakefile contains this:

#ifdef sunos
AllTarget ( $(HDRS)
libsnmp_db.SharedExtension
libsnmp.SharedExtension
libsnmp.a
)
#else
AllTarget ( $(HDRS)
libsnmp_db.SharedExtension
libsnmp.SharedExtension
libsnmp.a
libsnmp_db.a
)
#endif

Which, when run through xmkmf (just plain, no args) produces a Makefile with corresponding lines like this:

all:: $(HDRS)
libsnmp_db. sl
libsnmp. sl
libsnmp.a
libsnmp_db.a

libsnmp_db. sl :

(Note the extra spaces before the .sl extensions. These break make in a big way, because it thinks it's looking for a file called 'libsnmp_db.' and can't find it.)

SharedExtension is defined in hpnp.cf, which is included in /usr/lib/X11R6/imake/site.def like this:

#ifdef AfterVendorCF
/* LUCS-specific modifications below */
#include

Inside /usr/lib/X11R6/imake/hpnp.cf, SharedExtension is defined like this:

# ifndef SharedExtension
# define SharedExtension sl
# endif

Bear in mind that this isn't something I wrote, rather it is a project I inherited. Due to the nature of the project, I assume this has worked on other systems, but I can't seem to nail down the cause of this one. Does anybody have an idea where this extra space might be coming from? Thanks in advance.

Matt Crouse