In (info "(make) Wildcard Examples")

        Wildcard expansion does not happen when you define a variable.  Thus,
     if you write this:

          objects = *.o

     then the value of the variable 'objects' is the actual string '*.o'.
     However, if you use the value of 'objects' in a target or prerequisite,
     wildcard expansion will take place there.

OK, but do also mention "don't expect to also have variable expansion done at
the same time", else risk:

      make: *** No rule to make target
      '$HOME/.spamassassin-tree/etc/mail/spamassassin/*.pre', needed by
      'myconfdir/jidanni.pre'. Stop.

as seen with the commented out line in:

IT=$$HOME/.spamassassin-tree
#pre=$(IT)/etc/mail/spamassassin/*.pre
pre=/home/jidanni/.spamassassin-tree/etc/mail/spamassassin/*.pre
myconfdir/$J.pre: $(pre) myconfdir
        perl ... > $@

GNU Make 4.2.1

Wait, using $(HOME) fixes it.
So warn "don't also expect shell expansion at the same time as *
expansion" I suppose.

_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to