I am trying to use m4 (version 1.4.13) to generate a C header file and
am approaching it cautiously because my experience with m4 has not
been comforting.

My initial m4 input file has these lines:

=====>
divert(-1)
define(`hashdef', `#define')dnl
define(`Min', include(`conf/MINOR'))
divert(0)dnl
hashdef __PROGVER_MINOR__ Min
<====

When I execute "m4 <m4 input file>" I get:

====>
#define __PROGVER_MINOR__ Min
<====

Notice 'Min is not expanded.  If I change the last line of my input file to

====>
hashdef __PROGVER_MINOR__
Min
<====

I get

====>
#define __PROGVER_MINOR__
17
<====

>From all I have read about m4 it seems to me that the 'Min' token
should be evaluated in place in the first example but apparently isn't
recognized.

Is the '#' stopping it?  If so, how can I get the line I want.

Thanks.

Regards,

-Tom

Thomas M. Browder, Jr.
Niceville, Florida
USA

Reply via email to