LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 2789|回复: 7

make的出现‘install’ is up to date ,是怎么回事

[复制链接]
发表于 2005-12-4 13:40:32 | 显示全部楼层 |阅读模式
RT
对原代码编译,出错
大家帮个忙哦!
发表于 2005-12-4 15:32:28 | 显示全部楼层
把install加入.PHONY目标
参看info make
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-12-4 15:43:45 | 显示全部楼层
能说具体点吗?
回复 支持 反对

使用道具 举报

发表于 2005-12-4 16:25:40 | 显示全部楼层
.PHONY : clean
     clean :
             rm edit $(objects)
类似这样
info make里说的明明白白
不会用info,可以在里面按ctrl - h
上下翻页是delete和空格
回复 支持 反对

使用道具 举报

发表于 2005-12-7 15:54:27 | 显示全部楼层
.PHONY意思是伪目标,没有依赖文件,执行下面的命令就行了。
回复 支持 反对

使用道具 举报

发表于 2005-12-7 17:36:43 | 显示全部楼层
其实不是

默认情况下makefile的target都是真实存在的文件
只要文件存在,并且依赖条件没有更新过,那么就会出现"xxx is up to date“

.PHONY是告诉make这个target不对应于真实的文件
所以在上例中直接结果就是不管有没有clean这个文件存在都会执行rm
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-12-8 08:19:03 | 显示全部楼层
哦,大概明白!
不过好像我。/configure的时候出错了。
# ls
MANIFEST          atac-tutorial.ps  atac_cpp          atactm.1          config.guess      configure.in      portable.h
README            atac.1            atac_i            atacysis          config.log        install           tools
README-TOO        atac.lsm          ataclib.1         changes           config.sub        install.sh        tutorial
Version           atacCC.1          atacmin.1         confdefs.h        config_h.in       makefile.in       version.h
aclocal.m4        atacLD.1          atacterm.h        config.cache      configure         mkdirs.sh
# ./configure
loading cache ./config.cache
checking for prefix by checking for atacCC... no
checking host system type... sparc-sun-solaris2.8
Configuring for solaris2.8
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for a BSD compatible install... ./install.sh -c
checking for td_config... no
checking whether make sets ${MAKE}... yes
checking for bison... bison -y
checking for working const... yes
checking for gcc option to accept ANSI C... -DCC_HAS_PROTOS
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking whether time.h and sys/time.h may both be included... yes
checking for fcntl.h... yes
checking for stdlib.h... yes
checking for stdarg.h... yes
checking for sys/time.h... yes
checking for sys/wait.h... yes
checking for term.h... yes
checking for termcap.h... no
checking for time.h... yes
checking for unistd.h... yes
checking for varargs.h... yes
checking if you want to see long compiling messages... yes
checking if you want to use ncurses... no
checking for tigetstr in -lcurses... yes
checking for term.h... term.h
checking if we should include curses.h or termcap.h... curses.h
checking declaration of tputs 3rd param... int OutChar(char)
./configure: test: argument expected
可是同样的这个软件,我在linux suse 9.2下确可以通过。
回复 支持 反对

使用道具 举报

发表于 2005-12-8 11:15:58 | 显示全部楼层
呵呵,又学了一点...
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表