Commit f038cf3c authored by Mans Rullgard's avatar Mans Rullgard
Browse files

build: remove SRC_PATH_BARE variable



Setting SRC_PATH to "." when building in-tree removes the need
for a quoted version of the source path since out-of-tree builds
are not possible if the pathname contains spaces.
Signed-off-by: default avatarMans Rullgard <mans@mansr.com>
parent bb524924
include config.mak include config.mak
SRC_DIR = $(SRC_PATH_BARE) vpath %.c $(SRC_PATH)
vpath %.h $(SRC_PATH)
vpath %.c $(SRC_DIR) vpath %.S $(SRC_PATH)
vpath %.h $(SRC_DIR) vpath %.asm $(SRC_PATH)
vpath %.S $(SRC_DIR) vpath %.v $(SRC_PATH)
vpath %.asm $(SRC_DIR) vpath %.texi $(SRC_PATH)
vpath %.v $(SRC_DIR)
vpath %.texi $(SRC_PATH_BARE)
ifndef V ifndef V
Q = @ Q = @
...@@ -19,7 +17,7 @@ M = @$(call ECHO,$(TAG),$@); ...@@ -19,7 +17,7 @@ M = @$(call ECHO,$(TAG),$@);
$(foreach VAR,$(BRIEF), \ $(foreach VAR,$(BRIEF), \
$(eval override $(VAR) = @$$(call ECHO,$(VAR),$$(MSG)); $($(VAR)))) $(eval override $(VAR) = @$$(call ECHO,$(VAR),$$(MSG)); $($(VAR))))
$(foreach VAR,$(SILENT),$(eval override $(VAR) = @$($(VAR)))) $(foreach VAR,$(SILENT),$(eval override $(VAR) = @$($(VAR))))
$(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_DIR)/%=%)); $(INSTALL)) $(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_PATH)/%=%)); $(INSTALL))
endif endif
IFLAGS := -I. -I$(SRC_PATH) IFLAGS := -I. -I$(SRC_PATH)
...@@ -70,7 +68,7 @@ FFLIBS-$(CONFIG_SWSCALE) += swscale ...@@ -70,7 +68,7 @@ FFLIBS-$(CONFIG_SWSCALE) += swscale
FFLIBS := avutil FFLIBS := avutil
DATA_FILES := $(wildcard $(SRC_DIR)/ffpresets/*.ffpreset) DATA_FILES := $(wildcard $(SRC_PATH)/ffpresets/*.ffpreset)
SKIPHEADERS = cmdutils_common_opts.h SKIPHEADERS = cmdutils_common_opts.h
...@@ -83,7 +81,7 @@ FF_DEP_LIBS := $(DEP_LIBS) ...@@ -83,7 +81,7 @@ FF_DEP_LIBS := $(DEP_LIBS)
all: $(FF_DEP_LIBS) $(PROGS) all: $(FF_DEP_LIBS) $(PROGS)
config.h: .config config.h: .config
.config: $(wildcard $(FFLIBS:%=$(SRC_DIR)/lib%/all*.c)) .config: $(wildcard $(FFLIBS:%=$(SRC_PATH)/lib%/all*.c))
@-tput bold 2>/dev/null @-tput bold 2>/dev/null
@-printf '\nWARNING: $(?F) newer than config.h, rerun configure\n\n' @-printf '\nWARNING: $(?F) newer than config.h, rerun configure\n\n'
@-tput sgr0 2>/dev/null @-tput sgr0 2>/dev/null
...@@ -122,8 +120,8 @@ tools/%.o: tools/%.c ...@@ -122,8 +120,8 @@ tools/%.o: tools/%.c
-include $(wildcard tools/*.d) -include $(wildcard tools/*.d)
VERSION_SH = $(SRC_PATH_BARE)/version.sh VERSION_SH = $(SRC_PATH)/version.sh
GIT_LOG = $(SRC_PATH_BARE)/.git/logs/HEAD GIT_LOG = $(SRC_PATH)/.git/logs/HEAD
.version: $(wildcard $(GIT_LOG)) $(VERSION_SH) config.mak .version: $(wildcard $(GIT_LOG)) $(VERSION_SH) config.mak
.version: M=@ .version: M=@
......
...@@ -1688,7 +1688,7 @@ DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -MM' ...@@ -1688,7 +1688,7 @@ DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -MM'
# find source path # find source path
if test -f configure; then if test -f configure; then
source_path="$(pwd)" source_path=.
disable source_path_used disable source_path_used
else else
source_path=$(cd $(dirname "$0"); pwd) source_path=$(cd $(dirname "$0"); pwd)
...@@ -3257,8 +3257,7 @@ INCDIR=\$(DESTDIR)$incdir ...@@ -3257,8 +3257,7 @@ INCDIR=\$(DESTDIR)$incdir
BINDIR=\$(DESTDIR)$bindir BINDIR=\$(DESTDIR)$bindir
DATADIR=\$(DESTDIR)$datadir DATADIR=\$(DESTDIR)$datadir
MANDIR=\$(DESTDIR)$mandir MANDIR=\$(DESTDIR)$mandir
SRC_PATH="$source_path" SRC_PATH=$source_path
SRC_PATH_BARE=$source_path
CC_IDENT=$cc_ident CC_IDENT=$cc_ident
ARCH=$arch ARCH=$arch
CC=$cc CC=$cc
......
...@@ -11,9 +11,9 @@ documentation: $(DOCS) ...@@ -11,9 +11,9 @@ documentation: $(DOCS)
TEXIDEP = awk '/^@include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d) TEXIDEP = awk '/^@include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d)
doc/%.html: TAG = HTML doc/%.html: TAG = HTML
doc/%.html: doc/%.texi $(SRC_PATH_BARE)/doc/t2h.init doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.init
$(Q)$(TEXIDEP) $(Q)$(TEXIDEP)
$(M)texi2html -monolithic --init-file $(SRC_PATH_BARE)/doc/t2h.init --output $@ $< $(M)texi2html -monolithic --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
doc/%.pod: TAG = POD doc/%.pod: TAG = POD
doc/%.pod: doc/%.texi doc/%.pod: doc/%.texi
......
SRC_DIR := $(SRC_PATH_BARE)/lib$(NAME) SRC_DIR := $(SRC_PATH)/lib$(NAME)
include $(SUBDIR)../common.mak include $(SUBDIR)../common.mak
......
...@@ -41,16 +41,16 @@ tests/seek_test$(EXESUF): tests/seek_test.o $(FF_DEP_LIBS) ...@@ -41,16 +41,16 @@ tests/seek_test$(EXESUF): tests/seek_test.o $(FF_DEP_LIBS)
tools/lavfi-showfiltfmts$(EXESUF): tools/lavfi-showfiltfmts.o $(FF_DEP_LIBS) tools/lavfi-showfiltfmts$(EXESUF): tools/lavfi-showfiltfmts.o $(FF_DEP_LIBS)
$(LD) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS) $(LD) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)
include $(SRC_PATH_BARE)/tests/fate.mak include $(SRC_PATH)/tests/fate.mak
include $(SRC_PATH_BARE)/tests/fate2.mak include $(SRC_PATH)/tests/fate2.mak
include $(SRC_PATH_BARE)/tests/fate/aac.mak include $(SRC_PATH)/tests/fate/aac.mak
include $(SRC_PATH_BARE)/tests/fate/als.mak include $(SRC_PATH)/tests/fate/als.mak
include $(SRC_PATH_BARE)/tests/fate/fft.mak include $(SRC_PATH)/tests/fate/fft.mak
include $(SRC_PATH_BARE)/tests/fate/h264.mak include $(SRC_PATH)/tests/fate/h264.mak
include $(SRC_PATH_BARE)/tests/fate/mp3.mak include $(SRC_PATH)/tests/fate/mp3.mak
include $(SRC_PATH_BARE)/tests/fate/vorbis.mak include $(SRC_PATH)/tests/fate/vorbis.mak
include $(SRC_PATH_BARE)/tests/fate/vp8.mak include $(SRC_PATH)/tests/fate/vp8.mak
FATE_ACODEC = $(ACODEC_TESTS:%=fate-acodec-%) FATE_ACODEC = $(ACODEC_TESTS:%=fate-acodec-%)
FATE_VSYNTH1 = $(VCODEC_TESTS:%=fate-vsynth1-%) FATE_VSYNTH1 = $(VCODEC_TESTS:%=fate-vsynth1-%)
......
...@@ -3,7 +3,7 @@ VP8_SUITE = 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 ...@@ -3,7 +3,7 @@ VP8_SUITE = 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017
define FATE_VP8_SUITE define FATE_VP8_SUITE
FATE_VP8 += fate-vp8-test-vector$(2)-$(1) FATE_VP8 += fate-vp8-test-vector$(2)-$(1)
fate-vp8-test-vector$(2)-$(1): CMD = framemd5 $(3) -i $(SAMPLES)/vp8-test-vectors-r1/vp80-00-comprehensive-$(1).ivf fate-vp8-test-vector$(2)-$(1): CMD = framemd5 $(3) -i $(SAMPLES)/vp8-test-vectors-r1/vp80-00-comprehensive-$(1).ivf
fate-vp8-test-vector$(2)-$(1): REF = $(SRC_PATH_BARE)/tests/ref/fate/vp8-test-vector-$(1) fate-vp8-test-vector$(2)-$(1): REF = $(SRC_PATH)/tests/ref/fate/vp8-test-vector-$(1)
endef endef
define FATE_VP8_FULL define FATE_VP8_FULL
...@@ -11,7 +11,7 @@ $(foreach N,$(VP8_SUITE),$(eval $(call FATE_VP8_SUITE,$(N),$(1),$(2)))) ...@@ -11,7 +11,7 @@ $(foreach N,$(VP8_SUITE),$(eval $(call FATE_VP8_SUITE,$(N),$(1),$(2))))
FATE_VP8 += fate-vp8-sign-bias$(1) FATE_VP8 += fate-vp8-sign-bias$(1)
fate-vp8-sign-bias$(1): CMD = framemd5 $(2) -i $(SAMPLES)/vp8/sintel-signbias.ivf fate-vp8-sign-bias$(1): CMD = framemd5 $(2) -i $(SAMPLES)/vp8/sintel-signbias.ivf
fate-vp8-sign-bias$(1): REF = $(SRC_PATH_BARE)/tests/ref/fate/vp8-sign-bias fate-vp8-sign-bias$(1): REF = $(SRC_PATH)/tests/ref/fate/vp8-sign-bias
endef endef
$(eval $(call FATE_VP8_FULL)) $(eval $(call FATE_VP8_FULL))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment