Ye-Jun's profileGuo's 点点滴滴Blog Tools Help

Blog


    July 21

    Makefile

    对Makefile也算是几经研究了,虽然每次都自我感觉极好到快目中无人,不过总也忘记的很快。
     
    不经意在一个角落发现一张草稿纸,记录着比较容易迷糊的三个目标,只是当时随意用省略号写的,神到,语法未到,不过差不多精髓在了
     
    多目标:
    1 2 : ...
        ...
    <===>
    1 : ...
        ...
    2 : ...
        ...
     
    多规则目标:
    1 : ...
    1 : ...
       ...
    1 : ...
    (似乎应该是两个冒号的,可能草稿纸上写错了)
     
    静态目标:
    1 2 : <%pattern> : f(%pattern)m
         .... $*
    <===>
    1 : f(pattern(1))m
       ... pattern(1)
    2 : f(pattern(2)m
       ... pattern(2)
     
    还有一个替换的妙用,印象中似乎是
    $(AA:=bb) <===> $(AA)bb
    其妙处是当AA为空时,这个式子也是空
     
    另外,还可以巧妙的完成多种配置下的auto generate 和 build,略。
    实在是被ORCA养刁了眼,看linux下那些project中的makefile就是不舒服啊
     

    Comments (8)

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    X.Y. Lwrote:
    中高级研究啊,牛
    Oct. 13
    卜卜 萝wrote:
    有字天书..........
    July 27
    zyzwrote:
    太牛了,仰慕。。。
    July 22
    最后一句话强烈同感
    July 22
    SAMAwrote:
    楼主已经沉浸在自己的小世界里出不来了
    July 22
    shiqi yangwrote:
    我们现在改用scons了,也摆脱了Linux的语法,hoho
    July 22
    Weina Gewrote:
    zan
    ym
    July 22
    weiweiwrote:
    天书@@
    July 22

    Trackbacks

    The trackback URL for this entry is:
    http://unknown-error.spaces.live.com/blog/cns!9B12A9BDE11A3428!511.trak
    Weblogs that reference this entry
    • None