2

How could one make a wildcard dependency like boot/*.inc work in NMAKE?

PhantomR
  • 605
  • 4
  • 16

1 Answers1

2

This works for me, with VS 2017:

>type makefile
mytarget : boot\*.inc
        !@echo $?

>dir/b boot
one.inc
two.inc

>nmake
boot\one.inc
boot\two.inc

The on-line documentation for NMAKE provided by Microsoft is simply awful.

In contrast, the older 59-page PDF document entitled Chapter 16: Managing Projects with NMAKE is vastly superior. It appears to agree with the current online version (an errata would be nice!). But it is surprisingly hard to find via Google; three possible links are:

A good way to find them via certain search engines: "Mike Eddy" nmake MSGRIDA1.DOT filetype:pdf

0xC0000022L
  • 20,597
  • 9
  • 86
  • 152
Joseph Quinsey
  • 9,553
  • 10
  • 54
  • 77
  • 1
    Thank you very much for your help! :) Strange indeed, but I guess you've linked me some kind of rare jewel then ^_^. – PhantomR Jan 05 '19 at 18:59
  • 1
    BTW, _Chapter 16: Managing Projects with NMAKE_ does not include the [Batch-Mode Rules](https://learn.microsoft.com/en-us/cpp/build/batch-mode-rules?view=vs-2017) feature. – Joseph Quinsey Jan 23 '19 at 18:26
  • 1
    BTW, an aside in the answer states "an errata would be nice!". I am starting to include some _errata_ here in the comments. If we get enough comments, maybe we could copy them to a new question/answer. – Joseph Quinsey Feb 08 '19 at 03:25
  • 1
    BTW, Some nmake command line options are now different, There are some new runtime switches: `/G`, `/U`, and `/Y`. The obsolete `/M` switch is gone, and `/V` is also gone. – Joseph Quinsey Feb 08 '19 at 03:45
  • 1
    @JosephQuinsey several related documents can be found. The document with the file name `LMAETC16.DOC` seems to be _just_ chapter 16 and the project name is "Environment and Tools" its footer. But if you look for the template name (`MSGRIDA1.DOT`) and author by file type, you can find one `LMAETAPA.DOC` (an appendix) which discloses the slightly more revealing project name "MASM Environment and Tools". Looking for that template and author name also yields some other useful documentation. Thanks for pointing it out! – 0xC0000022L Jan 05 '23 at 10:20