From f038cf3c745099151cdc8aa311fa83f5907598a6 Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Mon, 6 Jun 2011 22:38:38 +0100 Subject: [PATCH] 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: Mans Rullgard --- Makefile | 24 +++++++++++------------- configure | 5 ++--- doc/Makefile | 4 ++-- subdir.mak | 2 +- tests/Makefile | 18 +++++++++--------- tests/fate/vp8.mak | 4 ++-- 6 files changed, 27 insertions(+), 30 deletions(-) diff --git a/Makefile b/Makefile index d3396a1794..f1bede83db 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,11 @@ 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=@ diff --git a/configure b/configure index 672d452849..0f2bd063b8 100755 --- a/configure +++ b/configure @@ -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 diff --git a/doc/Makefile b/doc/Makefile index a5e090b0cc..558277ad0c 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -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 diff --git a/subdir.mak b/subdir.mak index 1d5824b022..63398608d7 100644 --- a/subdir.mak +++ b/subdir.mak @@ -1,4 +1,4 @@ -SRC_DIR := $(SRC_PATH_BARE)/lib$(NAME) +SRC_DIR := $(SRC_PATH)/lib$(NAME) include $(SUBDIR)../common.mak diff --git a/tests/Makefile b/tests/Makefile index 1f7ba26aff..fb9b56e6b3 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -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)/tests/fate.mak +include $(SRC_PATH)/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/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-%) diff --git a/tests/fate/vp8.mak b/tests/fate/vp8.mak index 2b171305cc..1f442af4ac 100644 --- a/tests/fate/vp8.mak +++ b/tests/fate/vp8.mak @@ -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))