Makefile
changeset 57 5efb9c3180d1
parent 45 20c1c8a59eab
child 58 10707a4a3621
equal deleted inserted replaced
56:4c7748acc8a0 57:5efb9c3180d1
    73 define make_src_rule
    73 define make_src_rule
    74 sources/$(1)_src: sources/$(1)_$($(1)_revisionid)
    74 sources/$(1)_src: sources/$(1)_$($(1)_revisionid)
    75 	touch $$@
    75 	touch $$@
    76 
    76 
    77 sources/$(1)_$($(1)_revisionid): | sources
    77 sources/$(1)_$($(1)_revisionid): | sources
       
    78 	echo "Checkout HG source $(1)_$($(1)_revisionid)"
       
    79 	env
    78 	rm -rf sources/$(1)*
    80 	rm -rf sources/$(1)*
    79 	$(call get_src_hg,sources/$(1),-r $($(1)_revisionid))
    81 	$(call get_src_hg,sources/$(1),-r $($(1)_revisionid))
    80 	touch $$@
    82 	touch $$@
    81 endef
    83 endef
    82 $(foreach project,$(OWN_PROJECTS),$(eval $(call make_src_rule,$(project))))
    84 $(foreach project,$(OWN_PROJECTS),$(eval $(call make_src_rule,$(project))))
    87 define show_revision_details
    89 define show_revision_details
    88 echo -n $(1) "revision is: "; hg -R $(HGROOT)/$(1) id -r $($(1)_revisionid);
    90 echo -n $(1) "revision is: "; hg -R $(HGROOT)/$(1) id -r $($(1)_revisionid);
    89 endef
    91 endef
    90 
    92 
    91 revisions.txt: $(src)/revisions.txt own_sources
    93 revisions.txt: $(src)/revisions.txt own_sources
       
    94 	echo "Generate revisions.txt"
    92 	echo "\n******* PACKAGE REVISIONS ********\n" > revisions.txt
    95 	echo "\n******* PACKAGE REVISIONS ********\n" > revisions.txt
    93 	(echo -n "beremiz_dist revision is: "; hg -R $(src) id;) >> revisions.txt
    96 	(echo -n "beremiz_dist revision is: "; hg -R $(src) id;) >> revisions.txt
    94 	($(foreach project,$(OWN_PROJECTS),$(call show_revision_details,$(project)))) >> revisions.txt
    97 	($(foreach project,$(OWN_PROJECTS),$(call show_revision_details,$(project)))) >> revisions.txt
    95 	bash -c 'hg -R $(src) st | ( if read ; then echo -e "\n******* MODIFIED LPCDISTRO ********\n" ; hg -R $(src) st ; fi ) >> revisions.txt'
    98 	bash -c 'hg -R $(src) st | ( if read ; then echo -e "\n******* MODIFIED LPCDISTRO ********\n" ; hg -R $(src) st ; fi ) >> revisions.txt'
    96 
    99