Having Trouble with m4 Input (m4 version 1.4.13)

Tom Browder <[email protected]>
Newsgroups gmane.comp.gnu.m4.general
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.