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