autoconf
[Top][All Lists]
Advanced

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

Re: Define a complete rule via autoconf (quoting issue, AC_SUBST)


From: Steven R. Loomis
Subject: Re: Define a complete rule via autoconf (quoting issue, AC_SUBST)
Date: Mon, 27 Oct 2008 16:08:58 -0700
User-agent: Thunderbird 2.0.0.17 (Macintosh/20080914)

Daniel Leidert wrote:
Hi,

I want to place a rule in several Makefiles. So I thought about putting

@DESKTOP_DATA_RULE@

into every Makefile.am and define the rule via configure.ac. However, I
can't get it to work. The rule is:

$(desktop_DATA): $(desktop_in_files:.desktop.in=.desktop)
        @list='$<'; for p in $$list; do \
           if test -f "$$p" ; then \
               f=`echo "$$p" | sed 
's/.desktop$$//;$(transform);s/$$/.desktop/'`; \
               if ! test -f "$$f" ; then \
                   $(LN_S) "$$p" "$$f" ; \
                   echo "$(LN_S) '$$p' '$$f'" ; \
               fi ; \
           fi ; \
       done

How can I connect this with AC_SUBST? I get errors and warnings with
everything I do. So how do I have to quote/escape the rule/characters in
the rule to get the desired result? Is there maybe some m4 macro to get
a "verbatim" output?

Thanks and regards, Daniel


Daniel,
Unless this rule is dynamically calculated by configure, you might be better off putting it into a file and simply including it from several other makefiles.

-steven





reply via email to

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