title: Makefile process several files
body: <p>I want to parse several json files, get their contents, prepend/append some text and save the new string in another file. Currently I have this which works for a single file:</p>
  
  <pre><code>#set variables for shared libs
  SHAREDFILE=$(SERVERPATH)/xx/mod/supervisor/cfg/prod/config.json
  JSONCONF = `cat "$(SHAREDFILE)"`
  
  share:
      @echo "Sharing node-client code in ${PROJECT}.- ENV $(ENV)..."
      @echo "parseConfig($(JSONCONF));" &gt; $(CLIENTPATH)/public/js/shared/config.json
  </code></pre>
  
  <p>Since from what i understand variables can only be set outside rules how would i go about doing this for a list of files?</p>
  
  <p>Update: the files to be copied can be in separate directories but they should all be copied to the same target directory.</p>