undoapi: introduce JARCLASSEXCLUDES directive, allows to exclude patterns when creating the JAR file

This commit is contained in:
Frank Schoenheit [fs] 2010-10-14 16:40:31 +02:00
parent c872672baf
commit 207bf88bd2

View file

@ -67,6 +67,14 @@ $(JARMANIFEST) .PHONY : $(CUSTOMMANIFESTFILEDEP)
.ENDIF # "$(JARMANIFEST)"!=""
.ENDIF # "$(NEW_JAR_PACK)"!=""
.IF "$(JARCLASSEXCLUDES)" == ""
ZIPJAR_EXCLUDE=
.ELSE # "$(JARCLASSEXCLUDES)" == ""
ZIPJAR_EXCLUDE=$(foreach,i,$(JARCLASSEXCLUDES) -x "$i")
# format:
# JARCLASSEXCLUDES=foo/* bar/*
.ENDIF # "$(JARCLASSEXCLUDES)" == ""
#
# build jar
#
@ -82,8 +90,8 @@ $(JARTARGETN) :
@-find . -type d -user $(USER) ! -perm -5 -print | xargs test "$$1" != "" && chmod +r $$1
.ENDIF
.IF "$(JARMANIFEST)"!=""
$(COMMAND_ECHO)cd $(CLASSDIR)/$(TARGET) && zip $(ZIP_VERBOSITY) -u -rX ../$(@:f) $(subst,$(CLASSDIR)/$(TARGET)/, $(JARMANIFEST)) $(CHECKZIPRESULT)
$(COMMAND_ECHO)cd $(CLASSDIR)/$(TARGET) && zip $(ZIP_VERBOSITY) -u -rX ../$(@:f) $(subst,$(CLASSDIR)/$(TARGET)/, $(JARMANIFEST)) $(ZIPJAR_EXCLUDE) $(CHECKZIPRESULT)
.ENDIF # "$(JARMANIFEST)"!=""
$(COMMAND_ECHO)cd $(CLASSDIR) && zip $(ZIP_VERBOSITY) -u -rX $(@:f) $(subst,\,/ $(JARCLASSDIRS)) $(CHECKZIPRESULT)
$(COMMAND_ECHO)cd $(CLASSDIR) && zip $(ZIP_VERBOSITY) -u -rX $(@:f) $(subst,\,/ $(JARCLASSDIRS)) $(ZIPJAR_EXCLUDE) $(CHECKZIPRESULT)
.ENDIF