From: Thierry Parmentelat Date: Fri, 22 Oct 2010 13:39:23 +0000 (+0200) Subject: export <>-SVNPATH or <>-GITPATH as global %{SCMURL} to specfiles X-Git-Tag: 5.0-rc16~38 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=2bf8e93221910a9a3c63b5548d6a76887bef61e2;p=build.git export <>-SVNPATH or <>-GITPATH as global %{SCMURL} to specfiles --- diff --git a/Makefile b/Makefile index 8b3410bc..788205cd 100644 --- a/Makefile +++ b/Makefile @@ -293,8 +293,10 @@ ALL.modules:=$(sort $(ALL.modules)) define stage1_module_vars ifneq "$($(1)-SVNPATH)" "" $(1)-SVNPATH := $(strip $($(1)-SVNPATH)) +$(1)-SCMPATH := $(strip $($(1)-SVNPATH)) else $(1)-GITPATH := $$(strip $$($(1)-GITPATH)) +$(1)-SCMPATH := $$(strip $$($(1)-GITPATH)) $(1).gitrepo := $$(firstword $$(subst @, ,$$($(1)-GITPATH))) $(1).gittag := $$(word 2,$$(subst @, ,$$($(1)-GITPATH))) $(1).gittag := $$(if $$($(1).gittag),$$($(1).gittag),master) @@ -342,6 +344,7 @@ define target_spec $($(1).specpath): header.spec $($(1).codespec) mkdir -p SPECS cat header.spec > $($(1).specpath) + echo "%define SCMURL $($($(1).module)-SCMPATH)" >> $($(1).specpath) $(if $($(1).has-date),echo "%define date $(shell date +%Y.%m.%d)" >> $($(1).specpath),) $(if $($(1)-SPECVARS), \ $(foreach line,$($(1)-SPECVARS), \