Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing nmake with wildcards in the makefile
    text
    copied!<p>I am attempting to set up an nmake makefile to export our balsamiq mockup files to png files automatically, but I'm afraid I can't make heads nor tails of how to make a generic rule for doing so, without explicitly listing all the files I want exported.</p> <p><a href="http://www.balsamiq.com/blog/?p=231" rel="noreferrer">This page</a> details the command line syntax for exporting the files, and <a href="http://msdn.microsoft.com/en-us/library/ms925728.aspx" rel="noreferrer">this page</a> contains an example which looks like it contains a generic rule for .obj files to .exe files.</p> <p>The makefile I have tried so far looks like this:</p> <pre><code>.bmml.png: "C:\Program Files\Balsamiq Mockups\Balsamiq Mockups.exe" export $&lt; $@ </code></pre> <p>But this doesn't work.</p> <p>If I simply run nmake (with some outdated png files), nmake just does this:</p> <pre><code>[C:\Temp] :nmake Microsoft (R) Program Maintenance Utility Version 9.00.30729.01 Copyright (C) Microsoft Corporation. All rights reserved. [C:\Temp] : </code></pre> <p>If I ask it to build one specific file, it does this:</p> <pre><code>[C:\Temp] :nmake "TestFile.png" Microsoft (R) Program Maintenance Utility Version 9.00.30729.01 Copyright (C) Microsoft Corporation. All rights reserved. NMAKE : fatal error U1073: don't know how to make '"TestFile.png"' Stop. [C:\Temp] : </code></pre> <p>Any nmake gurus out there that can set me straight?</p> <p>An example makefile which simply makes .dat files from .txt files by copying them, to experiment with, looks like this:</p> <pre><code>.txt.dat: copy $&lt; $@ </code></pre> <p>this does nothing as well, so clearly I'm not understanding how such generic rules work. Do I need to specify a goal above that somehow lists the files I want?</p> <hr> <p><strong>Edit</strong>: In response to new answer:</p> <p>This makefile:</p> <pre><code>{}.txt{}.dat: copy $** $@ </code></pre> <p>with this file (test.dat)</p> <pre><code>1 2 3 </code></pre> <p>and this command:</p> <pre><code>NMAKE test.txt </code></pre> <p>Produces this error message:</p> <pre><code>[C:\] :nmake test.txt Microsoft (R) Program Maintenance Utility Version 9.00.30729.01 Copyright (C) Microsoft Corporation. All rights reserved. NMAKE : fatal error U1073: don't know how to make 'test.txt' Stop. </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload