1.1 --- a/common/makefiles/JavaCompilation.gmk Mon Nov 12 12:34:11 2012 -0800 1.2 +++ b/common/makefiles/JavaCompilation.gmk Tue Nov 13 15:54:33 2012 -0800 1.3 @@ -170,9 +170,10 @@ 1.4 # tells us what to remove from the jar-file. 1.5 $1_CAPTURE_DELETES=$$(foreach src,$$($1_SRCS),($(FIND) $$(src) -name _the.package.deleted -newer $$@ -exec $(SED) 's|$$(src)||g' \{\} >> $$($1_DELETES_FILE) \;) $$(NEWLINE)) 1.6 # The update contents macro updates the jar file with the previously capture contents. 1.7 + # xargs is used to trim the whitespace from the contents file, to see if it is empty. 1.8 $1_UPDATE_CONTENTS=$$(foreach src,$$($1_SRCS),\ 1.9 (cd $$(src) && \ 1.10 - if [ -s _the.$$($1_JARNAME)_contents ]; then \ 1.11 + if [ -n "`$(CAT) _the.$$($1_JARNAME)_contents | $(XARGS)`" ]; then \ 1.12 $(ECHO) " updating" `$(WC) -l _the.$$($1_JARNAME)_contents | $(AWK) '{ print $$$$1 }'` files && \ 1.13 $(JAR) $$($1_JAR_UPDATE_OPTIONS) $$@ @_the.$$($1_JARNAME)_contents; \ 1.14 fi) $$(NEWLINE))