Calling flex from a makefile

前端 未结 4 1276
醉酒成梦
醉酒成梦 2021-01-28 10:39

I would like to call flex to build a .l file, then call gcc to build everything.

I tryed:

comp:
    lex scanner.l   \\
    gcc -o a.out main.c hash.c -I.         


        
4条回答
  •  走了就别回头了
    2021-01-28 11:05

    Remove the backslash, or add a semicolon (;) before it.
    As it is now, the two commands are added together on one line, and executed as one long command.

提交回复
热议问题