[Top][All Lists]

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

Re: Portable $addprefix

From: Kip Warner
Subject: Re: Portable $addprefix
Date: Fri, 01 Sep 2017 17:34:59 -0700

On Mon, 2017-08-28 at 11:03 -0700, Quinn Grier wrote:
> A portable way to do this is to do the work in and
> transfer
> it to the Makefile with AC_SUBST. For example, with an empty
> and the following
>       AC_INIT([Example], [1.0])
>       AM_INIT_AUTOMAKE([foreign])
>       m4_define([m_files_only], [])
>       files_only='m_files_only'
>       files_with_path='m4_map_args_w(m_files_only, [dir/], [], [ ])'
>       AC_SUBST([files_only])
>       AC_SUBST([files_with_path])
>       AC_CONFIG_FILES([Makefile])
>       AC_OUTPUT
> The desired macros will appear in the resulting Makefile:
>       files_only =
>       files_with_path = dir/ dir/ dir/

Hey Quinn. This would have worked perfectly, except automake bails when
I run autoreconf:

    autoreconf: running: automake --add-missing --copy --no-force error: 'parser_clobbered_source_full_paths' includes 
configure substitution     '@parser    _clobbered_source_full_paths@' and is referred to from 'nodist_narayan_designer_SOURCES'; configure substitutions are not allowed in _SOURCES 
    autoreconf: automake failed with exit status: 1

This is likely because as the message says, I am attempting to use the
substitution within a *_SOURCES variable.

Is this a dead end or is there a workaround? Assume a reference within
a _SOURCES variable is probably necessary.

Kip Warner | Senior Software Engineer
OpenPGP signed/encrypted mail preferred

Attachment: signature.asc
Description: This is a digitally signed message part

reply via email to

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