Follow-up Comment #4, bug #62162 (project make):

Thanks, _$$(percent)_ trick makes the job done. 

However what is happening is still obscure. For example, here _patsubst_ does
everything correctly


lib1_SRCS := main.c try.c test.c
lib2_SRCS := lib.c api.c

.SECONDEXPANSION:
lib1 lib2: $$(patsubst %.c,%.o,$$($$@_SRCS))


and _lib1_  depends on main.o, try.o and test.o.

Reworking it in static pattern rule fashion results in prerequisites main.c,
try.c and test.c for _lib1_, i.e. patsubst does nothing.


lib1_SRCS := main.c try.c test.c
lib2_SRCS := lib.c api.c

.SECONDEXPANSION:
lib1 lib2: lib% : $$(patsubst %.c,%.o,$$(lib$$*_SRCS))


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?62162>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/


Reply via email to