[PATCH util-macros] XORG_MANPAGE_SECTIONS: add MAN_SUBSTS automake variable

Gaetan Nadon memsize at videotron.ca
Tue May 25 19:43:23 PDT 2010


On Tue, 2010-05-25 at 12:49 -0700, Alan Coopersmith wrote:

> Gaetan Nadon wrote:
> > It will replace the 155 copies in package makefiles
> > 
> > Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
> > ---
> >  xorg-macros.m4.in |   17 +++++++++++++++++
> >  1 files changed, 17 insertions(+), 0 deletions(-)
> > 
> > diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in
> > index 5e89dd1..98e3307 100644
> > --- a/xorg-macros.m4.in
> > +++ b/xorg-macros.m4.in
> > @@ -105,6 +105,7 @@ AC_SUBST(RAWCPPFLAGS)
> >  # on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
> >  # Not sure if there's any better way than just hardcoding by OS name.
> >  # Override default settings by setting environment variables
> > +# Added MAN_SUBSTS in version 1.8
> >  
> >  AC_DEFUN([XORG_MANPAGE_SECTIONS],[
> >  AC_REQUIRE([AC_CANONICAL_HOST])
> > @@ -176,6 +177,22 @@ AC_SUBST([FILE_MAN_DIR])
> >  AC_SUBST([MISC_MAN_DIR])
> >  AC_SUBST([DRIVER_MAN_DIR])
> >  AC_SUBST([ADMIN_MAN_DIR])
> > +
> > +XORG_MAN_PAGE="X Version 11"
> > +MAN_SUBSTS="\
> > +	-e 's|__vendorversion__|\"$PACKAGE_STRING\" \"$XORG_MAN_PAGE\"|' \
> > +	-e 's|__xorgversion__|\"$PACKAGE_STRING\" \"$XORG_MAN_PAGE\"|' \
> > +	-e 's|__xservername__|Xorg|g' \
> > +	-e 's|__xconfigfile__|xorg.conf|g' \
> > +	-e 's|__projectroot__|$prefix|g' \
> > +	-e 's|__appmansuffix__|$APP_MAN_SUFFIX|g' \
> > +	-e 's|__drivermansuffix__|$DRIVER_MAN_SUFFIX|g' \
> > +	-e 's|__adminmansuffix__|$ADMIN_MAN_SUFFIX|g' \
> > +	-e 's|__libmansuffix__|$LIB_MAN_SUFFIX|g' \
> > +	-e 's|__miscmansuffix__|$MISC_MAN_SUFFIX|g' \
> > +	-e 's|__filemansuffix__|$FILE_MAN_SUFFIX|g'"
> > +AC_SUBST([MAN_SUBSTS])
> > +
> >  ]) # XORG_MANPAGE_SECTIONS
> >  
> >  # XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
> 
> The '' should make the $ expansion happen in the Makefile, right?
> Wouldn't it need to be $() for that case, with AC_SUBST([XORG_MAN_PAGE]) added?
> 

XORG_MAN_PAGE is not available in the Makefile. It looks like it is
expanded very early.

This is how it looks in configure:

        XORG_MAN_PAGE="X Version 11"
        MAN_SUBSTS="\
        	-e 's|__vendorversion__|\"$PACKAGE_STRING\" \"$XORG_MAN_PAGE\"|' \

This is how it looks In config.status:

        S["MAN_SUBSTS"]="	-e 's|__vendorversion__|\"xf86-input-mouse 1.5.0\" \"X Version 11\"|' 


This is how it gets expanded in Makefile:

        MAN_SUBSTS =  -e 's|__vendorversion__|"xf86-input-mouse 1.5.0" "X Version 11"|' 

My limited understanding is that there are several levels of expansions.
I know it works, but I cannot explain it and it does not mean it's
right. I'd like to find out before mass distribution.

Thanks

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100525/a8f67a05/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100525/a8f67a05/attachment-0001.pgp>


More information about the xorg-devel mailing list