168 endif |
168 endif |
169 # The capture deletes macro finds all deleted files and concatenates them. The resulting file |
169 # The capture deletes macro finds all deleted files and concatenates them. The resulting file |
170 # tells us what to remove from the jar-file. |
170 # tells us what to remove from the jar-file. |
171 $1_CAPTURE_DELETES=$$(foreach src,$$($1_SRCS),($(FIND) $$(src) -name _the.package.deleted -newer $$@ -exec $(SED) 's|$$(src)||g' \{\} >> $$($1_DELETES_FILE) \;) $$(NEWLINE)) |
171 $1_CAPTURE_DELETES=$$(foreach src,$$($1_SRCS),($(FIND) $$(src) -name _the.package.deleted -newer $$@ -exec $(SED) 's|$$(src)||g' \{\} >> $$($1_DELETES_FILE) \;) $$(NEWLINE)) |
172 # The update contents macro updates the jar file with the previously capture contents. |
172 # The update contents macro updates the jar file with the previously capture contents. |
|
173 # xargs is used to trim the whitespace from the contents file, to see if it is empty. |
173 $1_UPDATE_CONTENTS=$$(foreach src,$$($1_SRCS),\ |
174 $1_UPDATE_CONTENTS=$$(foreach src,$$($1_SRCS),\ |
174 (cd $$(src) && \ |
175 (cd $$(src) && \ |
175 if [ -s _the.$$($1_JARNAME)_contents ]; then \ |
176 if [ -n "`$(CAT) _the.$$($1_JARNAME)_contents | $(XARGS)`" ]; then \ |
176 $(ECHO) " updating" `$(WC) -l _the.$$($1_JARNAME)_contents | $(AWK) '{ print $$$$1 }'` files && \ |
177 $(ECHO) " updating" `$(WC) -l _the.$$($1_JARNAME)_contents | $(AWK) '{ print $$$$1 }'` files && \ |
177 $(JAR) $$($1_JAR_UPDATE_OPTIONS) $$@ @_the.$$($1_JARNAME)_contents; \ |
178 $(JAR) $$($1_JAR_UPDATE_OPTIONS) $$@ @_the.$$($1_JARNAME)_contents; \ |
178 fi) $$(NEWLINE)) |
179 fi) $$(NEWLINE)) |
179 # The s-variants of the above macros are used when the jar is created from scratch. |
180 # The s-variants of the above macros are used when the jar is created from scratch. |
180 $1_SCAPTURE_CONTENTS=$$(foreach src,$$($1_SRCS),\ |
181 $1_SCAPTURE_CONTENTS=$$(foreach src,$$($1_SRCS),\ |