Follow-up Comment #2, bug #21716 (project make):

The change in behavior is listed in the 3.81 NEWS file.  To quote:

* WARNING: Backward-incompatibility!
  GNU make now implements a generic "second expansion"
  feature on the prerequisites of both explicit and implicit
  (pattern) rules.  In order to enable this feature, the
  special target '.SECONDEXPANSION' must be defined before
  the first target which takes advantage of it.  If this
  feature is enabled then after all rules have been parsed
  the prerequisites are expanded again, this time with all
  the automatic variables in scope.  This means that in
  addition to using standard SysV $$@ in prerequisites
  lists, you can also use complex functions such as
  $$(notdir $$@) etc.  This behavior applies to implicit
  rules, as well, where the second expansion occurs when
  the rule is matched.  However, this means that when
  .SECONDEXPANSION' is enabled you must double-quote any
  "$" in your filenames; instead of "foo: boo$$bar" you
  now must write "foo: foo$$$$bar".  Note that the SysV
  $$@ etc. feature, which used to be available by default,
  is now ONLY available when the .SECONDEXPANSION target
  is defined.  If your makefiles take advantage of this
  SysV feature you will need to update them.


So, add the line
   .SECONDEXPANSION:
to the makefile somewhere before any uses of $$(@F), etc.  With that, the
makefile will work with both 3.80 and 3.81.

Philip Guenther


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?21716>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



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

Reply via email to