use pending master heads - updated modules.list to point to vsys's
[build.git] / Makefile
index a5aacd5..788205c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -293,11 +293,13 @@ 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).gitrepo := $(firstword $(subst @, ,$($(1)-GITPATH)))
-$(1).gittag := $(word 2,$(subst @, ,$($(1)-GITPATH)))
-$(1).gittag := $(if $($(1).gittag),$($(1).gittag),master)
+$(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)
 endif
 endef
 
@@ -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), \
@@ -405,7 +408,7 @@ endif
 ### this utility allows to extract various info from a spec file
 ### and to define them in makefiles
 spec2make: spec2make.c
-       $(CC) -g -Wall $< -o $@ -lrpm -lrpmbuild
+       $(CC) -g -Wall $< -o $@ -lrpm -lrpmbuild -lrpmio -lpopt
 
 ### run spec2make on the spec file and include the result
 # usage: spec2make package
@@ -769,10 +772,10 @@ info-branches:
 
 module-tools:
        @$(foreach module,$(ALL.modules), \
-        $(if $($(module)-GITPATH), \
+        $(if $($(module)-GITPATH), \
          $(if $($(module)-BRANCH), \
-            echo git:$(module):$($(module)-BRANCH); , \
-            echo git:$(module); ), \
+            echo $(module):$($(module)-BRANCH); , \
+            echo $(module); ), \
          $(if $($(module)-BRANCH), \
             echo $(module):$($(module)-BRANCH); , \
             echo $(module); )))
@@ -781,6 +784,9 @@ info: info-packages info-modules info-branches
 
 .PHONY: info info-packages info-modules info-branches module-tools
 
+show-multi-modules:
+       @$(foreach package,$(ALL),$(if $(subst x1,,x$(words $($(package)-MODULES))), echo p=$(package) mods=$($(package)-MODULES) ;))
+.PHONY: show-multi-modules
 ####################
 help:
        @echo "********** Run make in two stages:"