# targets
srcs = $(wildcard *.java) Constants.java
objs = $(srcs:%.java=$(CLASSDIR)/%.class)# rules
all: $(objs)Constants.java : ../rc/AST_types.h genconst.pl
./genconst.pl ../rc/AST_types.h ../rc/mops_constants.h $@讲一下上面的Makefile内容的含义,谢谢!!   

解决方案 »

  1.   

    make all会执行$(srcs:%.java=$(CLASSDIR)/%.class)
    其中srcs=$(wildcard *.java) Constants.java
    其中Constants.java=../rc/AST_types.h genconst.pl
    ./genconst.pl ../rc/AST_types.h ../rc/mops_constants.h $@
      

  2.   

    谢谢, Constants.java文件并不存在,Constants.java是任何获得的?
      

  3.   

    谢谢, Constants.java文件并不存在,Constants.java是如何获得的?
      

  4.   

    May be it is difficlt to understand this file, But I hope you can help me if you can. Thanks
      

  5.   

    Why not use Ant or Maven?
      

  6.   

    特别是下面的,表达什么意思?all: $(objs)Constants.java : ../rc/AST_types.h genconst.pl
    ./genconst.pl ../rc/AST_types.h ../rc/mops_constants.h $@
      

  7.   

    anybody is like to answer simple question,and dislike to answer complex question. Why?
      

  8.   

    makefile是程序运行时需要先装载社么后装载社么的配置文件.
    里面的targets就是目标~还有Depends,就是运行这个之前先要依靠Depends社么文件.
    all: $(objs) 里面的$ 我是理解我取前面的objs的值(呵呵,和UNIX有点象).其实没必要去理解太多这些,你不可能自己写的
      

  9.   

    为了方便load build的脚本,src是指source code的目录,
    obj是build出的二进制文件的存放地all是指  可以build一种target,名字为all,例如命令:make all