Notices
Results 1 to 2 of 2

Thread: Makefile Question

  1. #1 Makefile Question 
    Forum Freshman holysword's Avatar
    Join Date
    Apr 2008
    Posts
    41
    Hi there!
    I have to write a makefile, but I confess that I don't know a lot about it.

    I need to do something like this:
    Code:
    if exist "foo.mod" in "directory"
       continue the rule
    else
       cd "directory" && make
       continue the rule
    endif
    Can someone give me a clue?


    "Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium"
    Yeshua Ha Mashiach
    Reply With Quote  
     

  2.  
     

  3. #2  
    Forum Freshman holysword's Avatar
    Join Date
    Apr 2008
    Posts
    41
    This solves the problem:

    Code:
    problem.mod: 
       @if [ ! -e ${obj_dir}/problem.mod ] ; then \ 
       echo 'test1' ; else echo 'test2' ;  fi


    "Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium"
    Yeshua Ha Mashiach
    Reply With Quote  
     

Bookmarks
Bookmarks
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •