1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: tg_jar.mk,v $
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"
37 .IF
"$(JARTARGETN)"!=""
39 .IF
"$(JARCOMPRESS)"==""
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
)
57 .ENDIF
# "$(CUSTOMMANIFESTFILE)"!=""
59 $(JARMANIFEST
) .PHONY
: $(CUSTOMMANIFESTFILEDEP
)
60 @@
-$(MKDIRHIER
) $(@
:d
)
62 echo Manifest-Version
: 1.0 > $@
63 .IF
"$(JARCLASSPATH)" != ""
64 echo
$(USQ
)Class-Path
: $(JARCLASSPATH
)$(USQ
) >> $@
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)"!=""
77 .IF
"$(NOJARDEP)"!="" ||
"$(NEW_JAR_PACK)"!=""
78 $(JARTARGETN
) .PHONY
:
80 .ELSE
# "$(NOJARDEP)"!="" || "$(NEW_JAR_PACK)"!=""
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
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
)