我遇到了一个makefile,如下所示:
GENERAL_RULES = $(WM_DIR)/rules/General
include $(GENERAL_RULES)/general
#------------------------------------------------------------------------------
# Declare names of make system control files derived from file 'files'
#------------------------------------------------------------------------------
OBJECTS_DIR = $(MAKE_DIR)/$(WM_OPTIONS)
OPTIONS = $(OBJECTS_DIR)/options
FILES = $(OBJECTS_DIR)/files
VARS = $(OBJECTS_DIR)/variables
SFILES = $(OBJECTS_DIR)/sourceFiles
-include $(OPTIONS)
#------------------------------------------------------------------------------
# Declare dependency of all make system files on FILES
# Causes all derived files to be remade if any are changed or missing
#------------------------------------------------------------------------------
all : $(OPTIONS) $(SFILES) $(VARS)
$(OPTIONS) : $(MAKE_DIR)/options
@$(CPP) $(GFLAGS) $(MAKE_DIR)/options | sed -e 's@ *@ @g' > $(OPTIONS)
有人可以解释上面代码的最后一行的含义吗?一个sed命令中有三个@符号。我不太了解@符号的含义。请帮忙。
答案 0 :(得分:1)
Sed在设置搜索和替换时非常宽容,允许许多字符用作分隔符。
The
sed -e 's@ *@ @g'
可能更容易识别为
sed -e 's/ */ /g'
即