autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

new autotest macro: AT_DATA_UNQUOTED


From: Gary V. Vaughan
Subject: new autotest macro: AT_DATA_UNQUOTED
Date: Thu, 09 Oct 2003 12:26:43 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20030925 Thunderbird/0.3

I'd like to be able to do stuff like this:

    AT_DATA_UNQUOTED([configure.ac],
    [[AC_INIT
    AC_CONFIG_AUX_DIR([$top_srcdir/config])
    AC_OUTPUT
    ]])

Where $top_srcdir is expanded in the generated configure.ac, otherwise the tools that grep for AC_CONFIG_AUX_DIR (autopoint, libtoolize) complain about shell variables in the argument.

Here is the macro:

    # AT_DATA_UNQUOTED(FILE, CONTENTS)
    # -----------------------
    # Initialize an input data FILE with given CONTENTS, which should end with
    # an end of line.
    # This macro is not robust to shell variable and command substitutions
    # *on purpose*.  If you don't want shell substitions, use AT_DATA.
    # This macro is not robust to active symbols in CONTENTS *on purpose*.
    # If you don't want CONTENT to be evaluated, quote it twice.
    m4_define([AT_DATA_UNQUOTED],
    [cat >$1 <<_ATEOF
    $2[]_ATEOF
    ])

Is there a better way to achieve what I need? Or shall I write a ChangeLog and some texi docs and commit?

Cheers,
        Gary.
--
  ())_.  Gary V. Vaughan    gary@(lilith.warpmail.net|gnu.org)
  ( '/   Research Scientist http://www.oranda.demon.co.uk       ,_())____
  / )=   GNU Hacker         http://www.gnu.org/software/libtool  \'      `&
`(_~)_   Tech' Author       http://sources.redhat.com/autobook   =`---d__/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]