merge the formfield patch from ooo-build
[ooovba.git] / solenv / inc / tg_jar.mk
blob24398a39aa95a8430e98060317d022f30628633f
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: tg_jar.mk,v $
11 # $Revision: 1.25 $
13 # This file is part of OpenOffice.org.
15 # OpenOffice.org is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU Lesser General Public License version 3
17 # only, as published by the Free Software Foundation.
19 # OpenOffice.org is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU Lesser General Public License version 3 for more details
23 # (a copy is included in the LICENSE file that accompanied this code).
25 # You should have received a copy of the GNU Lesser General Public License
26 # version 3 along with OpenOffice.org. If not, see
27 # <http://www.openoffice.org/license.html>
28 # for a copy of the LGPLv3 License.
30 #*************************************************************************
33 .IF "$(VERBOSE)"=="FALSE"
34 ZIP_VERBOSITY=-q
35 .ENDIF
37 .IF "$(JARTARGETN)"!=""
39 .IF "$(JARCOMPRESS)"==""
40 JARCOMPRESS_FLAG=0
41 .ENDIF
43 .IF "$(NEW_JAR_PACK)"!=""
44 $(JARTARGETN) : $(JARMANIFEST) $(JAVACLASSFILES) $(JAVATARGET)
45 .ENDIF # "$(NEW_JAR_PACK)"!=""
47 .IF "$(NEW_JAR_PACK)"!=""
48 .IF "$(JARMANIFEST)"!=""
50 .IF "$(CUSTOMMANIFESTFILE)"!=""
52 CUSTOMMANIFESTFILEDEP:=$(MISC)/$(TARGET)_$(CUSTOMMANIFESTFILE:f)
54 $(MISC)/$(TARGET)_$(CUSTOMMANIFESTFILE:f) : $(subst,/,/ $(DMAKE_WORK_DIR))/$(CUSTOMMANIFESTFILE)
55 -$(RM) $@
56 $(COPY) $< $@
57 .ENDIF # "$(CUSTOMMANIFESTFILE)"!=""
59 $(JARMANIFEST) .PHONY : $(CUSTOMMANIFESTFILEDEP)
60 @@-$(MKDIRHIER) $(@:d)
61 @@-$(RM) $@
62 echo Manifest-Version: 1.0 > $@
63 .IF "$(JARCLASSPATH)" != ""
64 echo $(USQ)Class-Path: $(JARCLASSPATH)$(USQ) >> $@
65 .ENDIF
66 # $(RSCREVISION) contains chars that must be quoted (for *NIX shells)
67 echo $(USQ)Solar-Version: $(RSCREVISION)$(USQ) >> $@
68 .IF "$(CUSTOMMANIFESTFILE)"!=""
69 $(TYPE) $(MISC)/$(TARGET)_$(CUSTOMMANIFESTFILE:f) >> $@
70 .ENDIF # "$(CUSTOMMANIFESTFILE)"!=""
71 .ENDIF # "$(JARMANIFEST)"!=""
72 .ENDIF # "$(NEW_JAR_PACK)"!=""
75 # build jar
77 .IF "$(NOJARDEP)"!="" || "$(NEW_JAR_PACK)"!=""
78 $(JARTARGETN) .PHONY :
79 # $(JARMANIFEST)
80 .ELSE # "$(NOJARDEP)"!="" || "$(NEW_JAR_PACK)"!=""
81 .DIRCACHE = no
82 $(JARTARGETN) :
83 #$(JARTARGETN) .SETDIR=$(CLASSDIR) .SEQUENTIAL : $(JARTARGETDEP) $(shell @-cat -s $(MISC)/$(JARTARGETN).dep )
84 .ENDIF # "$(NOJARDEP)"!="" || "$(NEW_JAR_PACK)"!=""
85 .IF "$(OS)$(CPU)"=="SOLARISS"
86 @-find . -type d -user $(USER) ! -perm -5 -print | xargs test "$$1" != "" && chmod +r $$1
87 .ENDIF
88 .IF "$(JARMANIFEST)"!=""
89 cd $(CLASSDIR)/$(TARGET) && zip -u -rX ../$(@:f) $(subst,$(CLASSDIR)/$(TARGET)/, $(JARMANIFEST)) $(CHECKZIPRESULT)
90 .ENDIF # "$(JARMANIFEST)"!=""
91 cd $(CLASSDIR) && zip -u -rX $(@:f) $(subst,\,/ $(JARCLASSDIRS)) $(CHECKZIPRESULT)
92 .ENDIF