parameter replacement in make during rule execution
[email protected] Thu, 9 Oct 2014 19:19:56 -0700 (PDT)
| Newsgroups | gmane.comp.gnu.utils |
|---|---|
| Message-ID | <[email protected]> |
Hi, I have a makefile which generates a tcl file when a certain target is made: DO_SIM: [many echo commands] >> sim.tcl for option in $(OPTIONS); do \ echo -n "$(if $(findstring =3D,$$option),$$option,$$option=3D) " >> sim.t= cl; \ done; [more echo command] >> sim.tcl my problem is with the for loop shown. OPTIONS variable has various fields = in it. Some fields have a '=3D' in them ie. FOO=3D512 and some don't. Becau= se I have a broken tool which gets confused by variables which don't have a= n equal sign in them I am trying to go through them and convert "FOO=3D512 = BAR" into "FOO=3D512 BAR=3D". The trouble is that the findstring never find= s anything and I get "FOO=3D512=3D BAR=3D". When I replace the whole findst= ring command with 1, I get the then case of the 'if' but no amount trial ma= de findstring work. Any ideas what my problem is or how to do what I need d= ifferently? Thanks. By the way, I am running make under cygwin and my make version is 4.0.2 if = that makes a difference.