allow to build from other dir using -C

This commit is contained in:
2026-01-16 16:08:41 +01:00
parent 8ccbd795bd
commit e7501dbc4b
+2 -2
View File
@@ -170,7 +170,7 @@ VERSIONDEBUGFLAG = $(if ${VERSIONDEBUG}, -d)
# Avoid using environment variables for MODULE or PROJECT
MODULE=
PROJECT=
PRJDIR:=$(subst -,_,$(subst .,_,$(notdir $(patsubst %Lib,%,$(patsubst %/snl,%,$(patsubst %/src,%,${PWD}))))))
PRJDIR:=$(subst -,_,$(subst .,_,$(notdir $(patsubst %Lib,%,$(patsubst %/snl,%,$(patsubst %/src,%,$(abspath .)))))))
PRJ = $(strip $(or ${MODULE},${PROJECT},${PRJDIR}))
export PRJ
@@ -183,7 +183,7 @@ export MAKE_FIRST
export SUBMODULES
export USE_LIBVERSION
export ORIGIN=$(firstword $(foreach D,${GIT_DOMAIN},$(shell git remote -v 2>/dev/null | awk '/$(subst .,\.,$D).*\(fetch\)/{print $$2;exit}')$(patsubst %,[%],$(shell git describe --tags --dirty --always --long 2>/dev/null))) $(PWD))
export ORIGIN=$(firstword $(foreach D,${GIT_DOMAIN},$(shell git remote -v 2>/dev/null | awk '/$(subst .,\.,$D).*\(fetch\)/{print $$2;exit}')$(patsubst %,[%],$(shell git describe --tags --dirty --always --long 2>/dev/null))) $(abspath .))
# Some shell commands:
RMDIR = rm -rf