7116322: enhance javac make rule with a little bit of instrumentation

Reviewed-by: dholmes, ohair
This commit is contained in:
Stuart Marks 2011-11-30 13:11:16 -08:00
parent 8b11c10364
commit af629d027c

View File

@ -233,12 +233,14 @@ classes : $(CLASSES_INIT) .delete.classlist .compile.classlist
@$(MKDIR) -p $(CLASSDESTDIR)
@$(RM) $<.filtered
@$(CAT) $< | $(NAWK) 'length>0' | $(SORT) -u > $<.filtered
@if [ `$(CAT) $<.filtered | $(WC) -l` -ge 1 ] ; then \
@numfiles=`$(WC) -l < $<.filtered` ; \
if [ $$numfiles -ge 1 ] ; then \
$(ECHO) "# Java sources to be compiled: (listed in file $<)"; \
$(CAT) $<.filtered; \
$(ECHO) "# Running javac:"; \
$(ECHO) "# Running javac: $$numfiles files; in $(CURDIR)"; \
$(ECHO) $(JAVAC_CMD) -sourcepath "$(SOURCEPATH)" -d $(CLASSDESTDIR) @$<.filtered; \
$(JAVAC_CMD) -sourcepath "$(SOURCEPATH)" -d $(CLASSDESTDIR) @$<.filtered; \
$(ECHO) "# javac finished"; \
fi
@$(java-vm-cleanup)