当前位置: 技术问答>linux和unix
Makefile的疑问
来源: 互联网 发布时间:2016-06-05
本文导语: Makefile开头是 @SET_MAKE@ 什么意思? @@两个符号中加加个变量又是什么意思?? 在编译smartmontools-5.38是看到里面有个Makefile.am文件里就是这么写着。。。 请指点 ============================== [code=BatchFile] @SET_MAKE@ # Make sure...
Makefile开头是 @SET_MAKE@
什么意思?
@@两个符号中加加个变量又是什么意思??
在编译smartmontools-5.38是看到里面有个Makefile.am文件里就是这么写着。。。
请指点
==============================
[code=BatchFile]
@SET_MAKE@
# Make sure .cpp takes precedence to avoid compiling old .c file
SUFFIXES = .cpp .c .s .o
AM_CPPFLAGS = -DSMARTMONTOOLS_SYSCONFDIR="$(sysconfdir)"
sbin_PROGRAMS = smartd
smartctl
smartd_SOURCES = smartd.cpp
smartd.h
atacmdnames.cpp
atacmdnames.h
atacmds.cpp
atacmds.h
ataprint.cpp
ataprint.h
extern.h
int64.h
knowndrives.cpp
knowndrives.h
scsicmds.cpp
scsicmds.h
scsiata.cpp
scsiata.h
scsiprint.cpp
scsiprint.h
utility.cpp
utility.h
smartd_LDADD = @os_deps@ @os_libs@
smartd_DEPENDENCIES = @os_deps@
EXTRA_smartd_SOURCES = os_darwin.cpp
os_darwin.h
os_linux.cpp
os_linux.h
os_freebsd.cpp
os_freebsd.h
os_netbsd.cpp
os_netbsd.h
os_openbsd.cpp
os_openbsd.h
os_solaris.cpp
os_solaris.h
os_solaris_ata.s
os_win32.cpp
os_generic.cpp
os_generic.h
cciss.cpp
cciss.h
if OS_WIN32_MINGW
smartd_SOURCES +=
posix/regex.h
posix/regex.c
os_win32/daemon_win32.h
os_win32/daemon_win32.cpp
os_win32/hostname_win32.h
os_win32/hostname_win32.cpp
os_win32/syslog.h
os_win32/syslog_win32.cpp
# Included by regex.c:
EXTRA_smartd_SOURCES +=
posix/regcomp.c
posix/regexec.c
posix/regex_internal.c
posix/regex_internal.h
endif
smartctl_SOURCES= smartctl.cpp
smartctl.h
atacmdnames.cpp
atacmdnames.h
atacmds.cpp
atacmds.h
ataprint.cpp
ataprint.h
extern.h
int64.h
knowndrives.cpp
knowndrives.h
scsicmds.cpp
scsicmds.h
scsiata.cpp
scsiata.h
scsiprint.cpp
scsiprint.h
utility.cpp
utility.h
smartctl_LDADD = @os_deps@ @os_libs@
smartctl_DEPENDENCIES = @os_deps@
[/code]
什么意思?
@@两个符号中加加个变量又是什么意思??
在编译smartmontools-5.38是看到里面有个Makefile.am文件里就是这么写着。。。
请指点
==============================
[code=BatchFile]
@SET_MAKE@
# Make sure .cpp takes precedence to avoid compiling old .c file
SUFFIXES = .cpp .c .s .o
AM_CPPFLAGS = -DSMARTMONTOOLS_SYSCONFDIR="$(sysconfdir)"
sbin_PROGRAMS = smartd
smartctl
smartd_SOURCES = smartd.cpp
smartd.h
atacmdnames.cpp
atacmdnames.h
atacmds.cpp
atacmds.h
ataprint.cpp
ataprint.h
extern.h
int64.h
knowndrives.cpp
knowndrives.h
scsicmds.cpp
scsicmds.h
scsiata.cpp
scsiata.h
scsiprint.cpp
scsiprint.h
utility.cpp
utility.h
smartd_LDADD = @os_deps@ @os_libs@
smartd_DEPENDENCIES = @os_deps@
EXTRA_smartd_SOURCES = os_darwin.cpp
os_darwin.h
os_linux.cpp
os_linux.h
os_freebsd.cpp
os_freebsd.h
os_netbsd.cpp
os_netbsd.h
os_openbsd.cpp
os_openbsd.h
os_solaris.cpp
os_solaris.h
os_solaris_ata.s
os_win32.cpp
os_generic.cpp
os_generic.h
cciss.cpp
cciss.h
if OS_WIN32_MINGW
smartd_SOURCES +=
posix/regex.h
posix/regex.c
os_win32/daemon_win32.h
os_win32/daemon_win32.cpp
os_win32/hostname_win32.h
os_win32/hostname_win32.cpp
os_win32/syslog.h
os_win32/syslog_win32.cpp
# Included by regex.c:
EXTRA_smartd_SOURCES +=
posix/regcomp.c
posix/regexec.c
posix/regex_internal.c
posix/regex_internal.h
endif
smartctl_SOURCES= smartctl.cpp
smartctl.h
atacmdnames.cpp
atacmdnames.h
atacmds.cpp
atacmds.h
ataprint.cpp
ataprint.h
extern.h
int64.h
knowndrives.cpp
knowndrives.h
scsicmds.cpp
scsicmds.h
scsiata.cpp
scsiata.h
scsiprint.cpp
scsiprint.h
utility.cpp
utility.h
smartctl_LDADD = @os_deps@ @os_libs@
smartctl_DEPENDENCIES = @os_deps@
[/code]
|
宏: AC_PROG_MAKE_SET
如果make预定义了变量MAKE,把输出变量SET_MAKE定义为空。否则,把 SET_MAKE定义成`MAKE=make'。为SET_MAKE调用AC_SUBST。
为了使用这个宏,在每个其他的、运行MAKE的目录中的`Makefile.in'添加一行:
@SET_MAKE@
[url=http://www.cndw.com/tech/server/2006040431621.asp]
如果make预定义了变量MAKE,把输出变量SET_MAKE定义为空。否则,把 SET_MAKE定义成`MAKE=make'。为SET_MAKE调用AC_SUBST。
为了使用这个宏,在每个其他的、运行MAKE的目录中的`Makefile.in'添加一行:
@SET_MAKE@
[url=http://www.cndw.com/tech/server/2006040431621.asp]
|