Thread: Mkaefile problem

  1. #1
    Registered User
    Join Date
    Nov 2007

    Mkaefile problem

    Dear experts i have some problem with the makefile,

    which i have written for my program which does only this in windows,
    main :
    		C:\name\myname\abcl\Debug\abc -l2
    all : main
    	echo "Hello "
    	echo ${make}
    	 C:\MinGW\bin\make main
    So this is the kind of the file 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
    Well, if you wrote your program to accept multiple .at files then you could just use
    		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
    		Debug\abc -l2 *.at
    or this
    		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 . . .
    for file in *.at; do ./abc -l2 $file; done

    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:

    My website:
    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, 04: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, 08:38 AM
  4. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  5. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM