Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

NMAKE command execution - possible??

Options
  • 26-11-2004 2:23pm
    #1
    Registered Users Posts: 7,276 ✭✭✭


    Howye,
    trying to get nmake to behave a bit like a shell script... want to do something along these lines:

    $ListOfFiles = `dir SomeDirectory`

    for ($i in $ListOfFiles) do
    SomethingWith $i
    done

    Anyone know if it's possible????

    Cheers
    Kenmc


Comments

  • Registered Users Posts: 6,508 ✭✭✭daymobrew


    I doubt you can do this in nmake (Microsoft command line make)
    Docs at:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcug98/html/_asug_overview.3a_.nmake_reference.asp

    I assume that the pseudo code block you list is a subset of the makefile, otherwise I would suggest just writing a shell script.
    Maybe you could have a rule which would invoke the shell script e.g.

    file.exe: file.c shell.out
    cc file.c
    shell.sh

    clean:
    rm shell.out

    Then in shell.sh you create shell.out to satisfy the dependency.
    Of course how you get makefile to use the info that shell.sh retrieved is another thing that I have no idea about.


Advertisement