Thread: Makefile for similar targets

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Apr 2006
    Posts
    2,149
    I'd rather use copy-paste then that. Seems too much to add one just for this.
    It is too clear and so it is hard to see.
    A dunce once searched for fire with a lighted lantern.
    Had he known what fire was,
    He could have cooked his rice much sooner.

  2. #2
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Code:
    all_tests.mk: test1.mir test2.mir test3.mir
        generate_test_rules.sh $^ > $@
    
    -include all_tests.mk
    Then write script generate_test_rules.sh which takes .mir filenames on command line and prints make rules for those tests to stdout. To add a test .mir, add its name to the deps for all_tests.mk target
    Last edited by brewbuck; 11-25-2011 at 03:00 PM.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Date in mm-dd or similar
    By Muscovy in forum C++ Programming
    Replies: 12
    Last Post: 07-18-2009, 06:22 PM
  2. difference makefile makefile.am makefile.in
    By Bargi in forum Linux Programming
    Replies: 7
    Last Post: 10-28-2007, 02:08 PM
  3. Something similar to novell
    By frozt in forum Windows Programming
    Replies: 0
    Last Post: 06-09-2006, 12:04 PM
  4. make incorrectly remaking targets
    By jarro_2783 in forum C Programming
    Replies: 4
    Last Post: 05-26-2006, 12:10 AM
  5. Umm...Inheritance or something similar?
    By Callith in forum C++ Programming
    Replies: 5
    Last Post: 11-27-2004, 10:41 AM