make/common/MakeBase.gmk

changeset 2438
f4b08401e50d
parent 2316
64a3eeabf6e5
parent 2422
84adf64edebb
equal deleted inserted replaced
2412:0cafacf400c9 2438:f4b08401e50d
291 $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9501,9750) 291 $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9501,9750)
292 $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9751,10000) 292 $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9751,10000)
293 293
294 endef 294 endef
295 295
296 # The source tips can come from the Mercurial repository, or in the files 296 # The source ids can come from the Mercurial repository, or in the files
297 # $(HGTIP_FILENAME) which contains the tip but is also positioned in the same 297 # $(HGTIP_FILENAME) which contains the id but is also positioned in the same
298 # directory as the original $(HGDIR) directory. 298 # directory as the original $(HGDIR) directory.
299 # These should not be := assignments, only used from the root Makefile. 299 # These should not be := assignments, only used from the root Makefile.
300 HG_VERSION = $(shell $(HG) version 2> /dev/null) 300 HG_VERSION = $(shell $(HG) version 2> /dev/null)
301 HG_DIRECTORY=.hg 301 HG_DIRECTORY=.hg
302 HGTIP_FILENAME=.hgtip 302 HGTIP_FILENAME=.hgtip
304 REPO_LIST = $(patsubst ./%,%,$(patsubst %/,%,$(sort $(dir \ 304 REPO_LIST = $(patsubst ./%,%,$(patsubst %/,%,$(sort $(dir \
305 $(shell $(CD) $(SRC_ROOT) ; ( $(LS) -d $(HG_SEARCH:%/REPO=%/$(HG_DIRECTORY)) ; \ 305 $(shell $(CD) $(SRC_ROOT) ; ( $(LS) -d $(HG_SEARCH:%/REPO=%/$(HG_DIRECTORY)) ; \
306 $(LS) $(HG_SEARCH:%/REPO=%/$(HGTIP_FILENAME)) ) \ 306 $(LS) $(HG_SEARCH:%/REPO=%/$(HGTIP_FILENAME)) ) \
307 2> /dev/null))))) 307 2> /dev/null)))))
308 308
309 # Emit the repo:tip pairs to $@ 309 # Emit the repo:id pairs to $@
310 define GetSourceTips 310 define GetSourceTips
311 $(CD) $(SRC_ROOT) ; \ 311 $(CD) $(SRC_ROOT) ; \
312 for i in $(REPO_LIST) IGNORE ; do \ 312 for i in $(REPO_LIST) IGNORE ; do \
313 if [ "$${i}" = "IGNORE" ] ; then \ 313 if [ "$${i}" = "IGNORE" ] ; then \
314 continue; \ 314 continue; \
315 elif [ -d $${i}/$(HG_DIRECTORY) -a "$(HG_VERSION)" != "" ] ; then \ 315 elif [ -d $${i}/$(HG_DIRECTORY) -a "$(HG_VERSION)" != "" ] ; then \
316 $(PRINTF) " %s:%s" \ 316 $(PRINTF) " %s:%s" \
317 "$${i}" `$(HG) tip --repository $${i} --template '{node|short}\n'` ; \ 317 "$${i}" `$(HG) id -i --repository $${i}` ; \
318 elif [ -f $${i}/$(HGTIP_FILENAME) ] ; then \ 318 elif [ -f $${i}/$(HGTIP_FILENAME) ] ; then \
319 $(PRINTF) " %s:%s" \ 319 $(PRINTF) " %s:%s" \
320 "$${i}" `$(CAT) $${i}/$(HGTIP_FILENAME)` ; \ 320 "$${i}" `$(CAT) $${i}/$(HGTIP_FILENAME)` ; \
321 fi; \ 321 fi; \
322 done >> $@ 322 done >> $@
323 $(PRINTF) "\n" >> $@ 323 $(PRINTF) "\n" >> $@
324 endef 324 endef
325 325
326 # Create the HGTIP_FILENAME file. Called from jdk/make/closed/bundles.gmk 326 # Create the HGTIP_FILENAME file. Called from jdk/make/closed/bundles.gmk
327 define CreateHgTip 327 define CreateHgTip
328 $(HG) tip --repository $1 --template '{node|short}\n' > $1/$(HGTIP_FILENAME); \ 328 $(HG) id -i --repository $1' > $1/$(HGTIP_FILENAME); \
329 $(ECHO) $1/$(HGTIP_FILENAME) 329 $(ECHO) $1/$(HGTIP_FILENAME)
330 endef 330 endef
331 331
332 define SetupLogging 332 define SetupLogging
333 ifeq ($$(LOG_LEVEL),trace) 333 ifeq ($$(LOG_LEVEL),trace)

mercurial