Skip to content
Snippets Groups Projects
Commit 3fd44ec8 authored by Maxim Cournoyer's avatar Maxim Cournoyer Committed by Adrien Béraud
Browse files

contrib: Relax the file name requirements for the contrib scripts.

It should only worry about its parent directory, not its grandparent.
This makes it possible to bind mount just daemon/contrib in a
container, to run 'make fetch' for example.

* contrib/bootstrap: Adjust relative paths.
* contrib/src/main.mak: Express using the CURDIR variable.
(PATH): Express using the TOPSRC variable.
(pkg_static): Express using the SRC environment variable.

Change-Id: I02cba2249e4971d76ef0af0fa00f4b1af61c5aff
parent a8634446
Branches
No related tags found
No related merge requests found
......@@ -39,7 +39,7 @@ PKGS_ENABLE=
PKGS_DISABLE=
CONF_TARBALLS=
if test ! -f "../../contrib/src/main.mak"
if test ! -f "../src/main.mak"
then
echo "$0 must be run from a subdirectory"
exit 1
......@@ -270,7 +270,7 @@ esac
# Results output
#
test -e Makefile && unlink Makefile
ln -sf ../../contrib/src/main.mak Makefile || exit $?
ln -sf ../src/main.mak Makefile || exit $?
cat << EOF
Bootstrap completed.
......@@ -289,4 +289,4 @@ Other targets:
* make package prepare prebuilt packages
EOF
mkdir -p ../../contrib/tarballs || exit $?
mkdir -p ../tarballs || exit $?
......@@ -23,8 +23,10 @@ all: install
# bootstrap configuration
include config.mak
TOPSRC ?= $(abspath ../../contrib)
TOPDST ?= $(abspath ..)
# The bootstrap script is enforced to run from a child directory of
# daemon/contrib; TOPSRC corresponds to this contrib/ directory.
TOPSRC ?= $(abspath $(CURDIR)/..)
TOPDST ?= $(abspath $(CURDIR)/..)
SRC := $(TOPSRC)/src
# Resolves TARBALLS using the following precedence rules:
......@@ -33,7 +35,7 @@ SRC := $(TOPSRC)/src
# 3. Default value
TARBALLS := $(or $(TARBALLS),$(CONF_TARBALLS),$(TOPSRC)/tarballs)
PATH :=$(abspath ../../extras/tools/build/bin):$(PATH)
PATH :=$(abspath $(TOPSRC)/../extras/tools/build/bin):$(PATH)
export PATH
PKGS_ALL := $(patsubst $(SRC)/%/rules.mak,%,$(wildcard $(SRC)/*/rules.mak))
......@@ -367,7 +369,7 @@ UNPACK = $(RM) -R $@ \
UNPACK_DIR = $(basename $(basename $(notdir $<)))
APPLY = (cd $(UNPACK_DIR) && patch -flp1) <
APPLY_BIN = (cd $(UNPACK_DIR) && patch --binary -flp1) <
pkg_static = (cd $(UNPACK_DIR) && ../../../contrib/src/pkg-static.sh $(1))
pkg_static = (cd $(UNPACK_DIR) && $(SRC)/pkg-static.sh $(1))
MOVE = mv $(UNPACK_DIR) $@ && touch $@
AUTOMAKE_DATA_DIRS=$(foreach n,$(foreach n,$(subst :, ,$(shell echo $$PATH)),$(abspath $(n)/../share)),$(wildcard $(n)/automake*))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment