Makefile
changeset 15 db66054a2ff3
parent 14 8d49ccbdb035
child 16 ab28d0363837
equal deleted inserted replaced
14:8d49ccbdb035 15:db66054a2ff3
    67 define hg_get_archive
    67 define hg_get_archive
    68 hg -R $(HGROOT)/`basename $(1)` archive $(2) $(1)
    68 hg -R $(HGROOT)/`basename $(1)` archive $(2) $(1)
    69 endef
    69 endef
    70 endif
    70 endif
    71 
    71 
       
    72 define hg_get_rev_num
       
    73 hg -R $(HGROOT)/`basename $(1)` id -i | sed 's/\+//' > $(2)
       
    74 endef
       
    75 
    72 define get_src_hg
    76 define get_src_hg
    73 rm -rf $(1)
    77 rm -rf $(1)
    74 $(call hg_get_archive, $(1), $(2))
    78 $(call hg_get_archive, $(1), $(2))
    75 endef
    79 endef
    76 
    80 
   244 	rm -rf  examples
   248 	rm -rf  examples
   245 	mkdir -p examples
   249 	mkdir -p examples
   246 
   250 
   247 beremiz: | build examples
   251 beremiz: | build examples
   248 	$(call get_src_hg,build/beremiz)
   252 	$(call get_src_hg,build/beremiz)
       
   253 	$(call hg_get_rev_num,beremiz,build/beremiz/revision)
   249 	$(call tweak_beremiz_targets)
   254 	$(call tweak_beremiz_targets)
   250 	rm -rf examples/canopen_tests
   255 	rm -rf examples/canopen_tests
   251 	mkdir -p examples/canopen_tests
   256 	mkdir -p examples/canopen_tests
   252 	mv build/beremiz/tests/canopen_* examples/canopen_tests
   257 	mv build/beremiz/tests/canopen_* examples/canopen_tests
   253 	rm -rf examples/base_tests
   258 	rm -rf examples/base_tests