zoukankan      html  css  js  c++  java
  • missing seperator error when [make all]

    https://stackoverflow.com/questions/16931770/makefile4-missing-separator-stop

    makefile has a very stupid relation with tabs , all actions of every rule are identified by tabs ...... and No 4 spaces dont make a tab , only a tab makes a tab...

    to check i use the command cat -e -t -v  makefile_name

    it shows the presence of tabs with ^I and line endings with $ both are vital to ensure that dependencies end properly and tabs mark the action for the rules so that they are easily identifiable to the make utility.....

    example :

    Kaizen ~/so_test $ cat -e -t -v  mk.t
    all:ll$      ## here the $ is end of line ...                   
    $
    ll:ll.c   $
    ^Igcc  -c  -Wall -Werror -02 c.c ll.c  -o  ll  $@  $<$ 
    ## the ^I above means a tab was there before the action part, so this lines ok .
     $
    clean :$
       rm -fr ll$
    ## see here there is no ^I which means , tab is not present .... 
    ## in this case you need to open the file again and edit/ensure a tab 
    ## starts the action part
    321 down vote accepted

    makefile has a very stupid relation with tabs , all actions of every rule are identified by tabs ...... and No 4 spaces dont make a tab , only a tab makes a tab...

    to check i use the command cat -e -t -v makefile_name

    it shows the presence of tabs with ^I and line endings with $ both are vital to ensure that dependencies end properly and tabs mark the action for the rules so that they are easily identifiable to the make utility.....

    example :

  • 相关阅读:
    HDU 1106 排序
    strtok函数()
    HDU 2187汶川地震
    HDU 1716 排列2
    Rightmost Digit
    Text Reverse
    快速幂
    插入排序的一个应用-调整负数在前,正数在后,原来相对位置不变
    cuda 5.0配置vs2008+Visual Assist X +安装问题解决
    vc 热键、组合键的用法
  • 原文地址:https://www.cnblogs.com/johnsonshu/p/7453525.html
Copyright © 2011-2022 走看看