Mkaefile problem

This is a discussion on Mkaefile problem within the C++ Programming forums, part of the General Programming Boards category; Dear experts i have some problem with the makefile, which i have written for my program which does only this ...

  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    99

    Mkaefile problem

    Dear experts i have some problem with the makefile,

    which i have written for my program which does only this in windows,
    Code:
    main :
    	
    	
    		C:\name\myname\abcl\Debug\abc -l2 abc.at
    	
    all : main
    	echo "Hello "
    	echo ${make}
    	 C:\MinGW\bin\make main
    So this is the kind of the file abc.at which runs on abc.exe there

    this is working but in my given directory structure it should search for the .at file and have to execute each one of them,

    how to do this i tried using find command but failed as it is showing some error like

    that of find command in windows so how to achieve this in windows.

  2. #2
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,048
    Well, if you wrote your program to accept multiple .at files then you could just use
    Code:
    		C:\name\myname\abcl\Debug\abc -l2 *.at
    Incidentally, make does have a concept of the current working directory, so it's very likely that either this
    Code:
    		Debug\abc -l2 *.at
    or this
    Code:
    		abc -l2 *.at
    would work as well. I really don't like absolute path names in things like build systems.

    On the other hand, if your program can only handle one .at file at once, it's a bit tricker. I imagine a site like this would have what you're looking for: How can I perform a batch action on a list of files from the command line?

    And of course in Linux it's just so simple . . .
    Code:
    for file in *.at; do ./abc -l2 $file; done
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help understanding a problem
    By dnguyen1022 in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2009, 05:21 PM
  2. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  3. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 09:38 AM
  4. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 03:51 PM
  5. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 07:54 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21