Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 06 May 1999 10:10:58 +0800
From:      Peter Wemm <peter@netplex.com.au>
To:        Zhihui Zhang <zzhang@cs.binghamton.edu>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: What is define(...)dnl in a .m4 file 
Message-ID:  <19990506021105.74C221F69@spinner.netplex.com.au>
In-Reply-To: Your message of "Wed, 05 May 1999 21:36:38 -0400." <Pine.GSO.3.96.990505213113.11828C-100000@sol.cs.binghamton.edu> 

next in thread | previous in thread | raw e-mail | index | archive | help
Zhihui Zhang wrote:
> 
> I find in the file boot1.m4 under /usr/src/sys/boot the following line:
> 
> define(_bp_,0x6)dnl
> define(_bx_,0x7)dnl
> define(o16,`.byte 0x66')dnl
> define(addbr1,`.byte 0x0; .byte 0x40 | ($1 << 0x3) | $3; .byte $2')dnl 
> 
> I assume boot1.m4 is an assembly file but I can not find any information
> on define(...)dnl in the GNU Assembler manual (info files).
> 
> Please tell me how a .m4 file is used and what does "define" mean exactly. 

This is probably better served as a RTFM, see m4(1).

However, define in m4 is a little like #define in cpp, and dnl is 'delete
through to newline'.  define() in m4 is masked out leaving a blank line
where the define() was, so the dnl is used to "eat" the newline that causes
the blank in the first place.  This is also an issue with the sendmail .mc
files.

For the C compiler, a blank line is irrelevant, but for human readable 
preprocessed files, such as /etc/sendmail.cf, all those blank lines do
add up.

Cheers,
-Peter



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990506021105.74C221F69>