Commit f038cf3c authored by Mans Rullgard's avatar Mans Rullgard

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: 's avatarMans Rullgard <mans@mansr.com>
parent bb524924
include config.mak
SRC_DIR = $(SRC_PATH_BARE)
vpath %.c $(SRC_DIR)
vpath %.h $(SRC_DIR)
vpath %.S $(SRC_DIR)
vpath %.asm $(SRC_DIR)
vpath %.v $(SRC_DIR)
vpath %.texi $(SRC_PATH_BARE)
vpath %.c $(SRC_PATH)
vpath %.h $(SRC_PATH)
vpath %.S $(SRC_PATH)
vpath %.asm $(SRC_PATH)
vpath %.v $(SRC_PATH)
vpath %.texi $(SRC_PATH)
ifndef V
Q = @
......@@ -19,7 +17,7 @@ M = @$(call ECHO,$(TAG),$@);
$(foreach VAR,$(BRIEF), \
$(eval override $(VAR) = @$$(call ECHO,$(VAR),$$(MSG)); $($(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
IFLAGS := -I. -I$(SRC_PATH)
......@@ -70,7 +68,7 @@ FFLIBS-$(CONFIG_SWSCALE) += swscale
FFLIBS := avutil
DATA_FILES := $(wildcard $(SRC_DIR)/ffpresets/*.ffpreset)
DATA_FILES := $(wildcard $(SRC_PATH)/ffpresets/*.ffpreset)
SKIPHEADERS = cmdutils_common_opts.h
......@@ -83,7 +81,7 @@ FF_DEP_LIBS := $(DEP_LIBS)
all: $(FF_DEP_LIBS) $(PROGS)
config.h: .config
.config: $(wildcard $(FFLIBS:%=$(SRC_DIR)/lib%/all*.c))
.config: $(wildcard $(FFLIBS:%=$(SRC_PATH)/lib%/all*.c))
@-tput bold 2>/dev/null
@-printf '\nWARNING: $(?F) newer than config.h, rerun configure\n\n'
@-tput sgr0 2>/dev/null
......@@ -122,8 +120,8 @@ tools/%.o: tools/%.c
-include $(wildcard tools/*.d)
VERSION_SH = $(SRC_PATH_BARE)/version.sh
GIT_LOG = $(SRC_PATH_BARE)/.git/logs/HEAD
VERSION_SH = $(SRC_PATH)/version.sh
GIT_LOG = $(SRC_PATH)/.git/logs/HEAD
.version: $(wildcard $(GIT_LOG)) $(VERSION_SH) config.mak
.version: M=@
......
......@@ -1688,7 +1688,7 @@ DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -MM'
# find source path
if test -f configure; then
source_path="$(pwd)"
source_path=.
disable source_path_used
else
source_path=$(cd $(dirname "$0"); pwd)
......@@ -3257,8 +3257,7 @@ INCDIR=\$(DESTDIR)$incdir
BINDIR=\$(DESTDIR)$bindir
DATADIR=\$(DESTDIR)$datadir
MANDIR=\$(DESTDIR)$mandir
SRC_PATH="$source_path"
SRC_PATH_BARE=$source_path
SRC_PATH=$source_path
CC_IDENT=$cc_ident
ARCH=$arch
CC=$cc
......
......@@ -11,9 +11,9 @@ documentation: $(DOCS)
TEXIDEP = awk '/^@include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d)
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)
$(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: doc/%.texi
......
SRC_DIR := $(SRC_PATH_BARE)/lib$(NAME)
SRC_DIR := $(SRC_PATH)/lib$(NAME)
include $(SUBDIR)../common.mak
......
......@@ -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)
$(LD) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)
include $(SRC_PATH_BARE)/tests/fate.mak
include $(SRC_PATH_BARE)/tests/fate2.mak
include $(SRC_PATH_BARE)/tests/fate/aac.mak
include $(SRC_PATH_BARE)/tests/fate/als.mak
include $(SRC_PATH_BARE)/tests/fate/fft.mak
include $(SRC_PATH_BARE)/tests/fate/h264.mak
include $(SRC_PATH_BARE)/tests/fate/mp3.mak
include $(SRC_PATH_BARE)/tests/fate/vorbis.mak
include $(SRC_PATH_BARE)/tests/fate/vp8.mak
include $(SRC_PATH)/tests/fate.mak
include $(SRC_PATH)/tests/fate2.mak
include $(SRC_PATH)/tests/fate/aac.mak
include $(SRC_PATH)/tests/fate/als.mak
include $(SRC_PATH)/tests/fate/fft.mak
include $(SRC_PATH)/tests/fate/h264.mak
include $(SRC_PATH)/tests/fate/mp3.mak
include $(SRC_PATH)/tests/fate/vorbis.mak
include $(SRC_PATH)/tests/fate/vp8.mak
FATE_ACODEC = $(ACODEC_TESTS:%=fate-acodec-%)
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
define FATE_VP8_SUITE
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): 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
define FATE_VP8_FULL
......@@ -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-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
$(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