It is required during make local, at which point we have a global
installation and can therefore use the global tool.
Signed-off-by: Tobias Ulmer <tu@emlix.com>
$(MAKE) -C extensions local
install-local:
- scripts/e2-locate-project-root
+ $(BINDIR)/e2-locate-project-root
@echo removing old installation...
rm -rf $(LOCALBINDIR)
rm -rf $(LOCALLIBDIR)
require("e2option")
require("generic_git")
-install_prefix = buildconfig.PREFIX
-
e2lib.init()
e2option.documentation = [[
if not rc then
e2lib.abort(e:cat(re))
end
-local cmd = string.format("make PREFIX=%s local install-local",
- e2lib.shquote(install_prefix))
+local cmd = string.format("make PREFIX=%s BINDIR=%s local install-local",
+ e2lib.shquote(buildconfig.PREFIX), e2lib.shquote(buildconfig.BINDIR))
rc, re = e2lib.callcmd_capture(cmd)
if rc ~= 0 then
e2lib.abort(e:cat(re))
DETECT_TOOL = $(TOPLEVEL)/scripts/detect_tool
-PROJECTDIR ?= $(shell cd $(TOPLEVEL);scripts/e2-locate-project-root 2>/dev/null)
+PROJECTDIR ?= $(shell cd $(TOPLEVEL) && $(BINDIR)/e2-locate-project-root 2>/dev/null)
E2DATA = /mnt/e2data
export E2DATA PROJECTDIR
+++ /dev/null
-#!/bin/sh
-export LC_ALL=C
-while [ '!' -d .e2 ] ; do
- if [ "$PWD" = "/" ] ; then
- echo >&2 \
- "e2-locate-project-root: Not in a project environment."
- exit 1
- fi
- cd ..
-done
-echo $PWD