From 06f7ee77c30db5562d3ae041f7f167384c8c4c95 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Pialasse Date: Thu, 14 Mar 2024 07:13:32 -0400 Subject: [PATCH] get contrib/sme from git.url version from branch --- Makefile.common | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile.common b/Makefile.common index a0acd88..87031f5 100644 --- a/Makefile.common +++ b/Makefile.common @@ -21,8 +21,11 @@ HEAD_BRANCH := devel endif BASEDIR := $(shell basename `pwd`) # BRANCH := $(BASEDIR) -# Get tag for module - e.g. contribs10 or sme10 from file left by cvs2git conversion script -BRANCH := $(shell cat contriborbase) +VERG = $(shell [ `/usr/bin/git branch|awk '{print $$2}'` == 'master' ] && echo 11 || echo `/usr/bin/git branch | awk '{print $$2}'`) +PREF = $(shell [ `/usr/bin/git config --get remote.origin.url| cut -d/ -f4` == "smecontrib" ] && echo 'contrib' || echo 'sme') +#BRANCH := $(shell cat contriborbase) +BRANCH = "$(PREF)$(VERG)" +$(info $$BRANCH is [${BRANCH}]) BRANCHINFO = $(shell grep ^$(BRANCH): $(COMMON_DIR)/branches | cut -d: --output-delimiter=" " -f2-) TARGET := $(word 1, $(BRANCHINFO)) DIST = $(word 2, $(BRANCHINFO)) @@ -155,7 +158,7 @@ $(shell cat sources 2>/dev/null | while read m f ; do if test "$$f" = "$@" ; the endef # list the possible targets for valid arches -ARCHES = noarch i386 i586 i686 x86_64 # ia64 s390 s390x ppc ppc64 pseries ppc64pseries iseries ppc64iseries athlon alpha alphaev6 sparc sparc64 sparcv9 sparcv9v sparc64v i164 mac sh mips geode +ARCHES = noarch i386 x86_64 aarch64 # i586 i686 ia64 s390 s390x ppc ppc64 pseries ppc64pseries iseries ppc64iseries athlon alpha alphaev6 sparc sparc64 sparcv9 sparcv9v sparc64v i164 mac sh mips geode # for the modules that do different "make prep" depending on what arch we build for PREP_ARCHES = $(addprefix prep-,$(ARCHES))