2003-04-28 10:44:42 -05:00
|
|
|
#*************************************************************************
|
|
|
|
#
|
2008-04-10 11:40:06 -05:00
|
|
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
#
|
|
|
|
# Copyright 2008 by Sun Microsystems, Inc.
|
2003-04-28 10:44:42 -05:00
|
|
|
#
|
2008-04-10 11:40:06 -05:00
|
|
|
# OpenOffice.org - a multi-platform office productivity suite
|
2003-04-28 10:44:42 -05:00
|
|
|
#
|
2008-04-10 11:40:06 -05:00
|
|
|
# $RCSfile: tg_jar.mk,v $
|
2003-04-28 10:44:42 -05:00
|
|
|
#
|
2008-04-10 11:40:06 -05:00
|
|
|
# $Revision: 1.25 $
|
2003-04-28 10:44:42 -05:00
|
|
|
#
|
2008-04-10 11:40:06 -05:00
|
|
|
# This file is part of OpenOffice.org.
|
2003-04-28 10:44:42 -05:00
|
|
|
#
|
2008-04-10 11:40:06 -05:00
|
|
|
# OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
# only, as published by the Free Software Foundation.
|
2003-04-28 10:44:42 -05:00
|
|
|
#
|
2008-04-10 11:40:06 -05:00
|
|
|
# OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU Lesser General Public License version 3 for more details
|
|
|
|
# (a copy is included in the LICENSE file that accompanied this code).
|
2003-04-28 10:44:42 -05:00
|
|
|
#
|
2008-04-10 11:40:06 -05:00
|
|
|
# You should have received a copy of the GNU Lesser General Public License
|
|
|
|
# version 3 along with OpenOffice.org. If not, see
|
|
|
|
# <http://www.openoffice.org/license.html>
|
|
|
|
# for a copy of the LGPLv3 License.
|
2003-04-28 10:44:42 -05:00
|
|
|
#
|
|
|
|
#*************************************************************************
|
|
|
|
|
2000-09-20 08:43:26 -05:00
|
|
|
|
|
|
|
.IF "$(JARTARGETN)"!=""
|
|
|
|
|
|
|
|
.IF "$(JARCOMPRESS)"==""
|
|
|
|
JARCOMPRESS_FLAG=0
|
|
|
|
.ENDIF
|
|
|
|
|
|
|
|
.IF "$(NEW_JAR_PACK)"!=""
|
2006-05-18 04:02:49 -05:00
|
|
|
$(JARTARGETN) : $(JARMANIFEST) $(JAVACLASSFILES) $(JAVATARGET)
|
2003-03-27 04:48:49 -06:00
|
|
|
.ENDIF # "$(NEW_JAR_PACK)"!=""
|
2000-09-20 08:43:26 -05:00
|
|
|
|
|
|
|
.IF "$(NEW_JAR_PACK)"!=""
|
|
|
|
.IF "$(JARMANIFEST)"!=""
|
|
|
|
|
|
|
|
.IF "$(CUSTOMMANIFESTFILE)"!=""
|
|
|
|
|
2009-09-07 08:35:07 -05:00
|
|
|
CUSTOMMANIFESTFILEDEP:=$(MISC)/$(TARGET)_$(CUSTOMMANIFESTFILE:f)
|
2000-09-20 08:43:26 -05:00
|
|
|
|
2009-09-07 08:35:07 -05:00
|
|
|
$(MISC)/$(TARGET)_$(CUSTOMMANIFESTFILE:f) : $(subst,/,/ $(DMAKE_WORK_DIR))/$(CUSTOMMANIFESTFILE)
|
2007-01-25 05:54:58 -06:00
|
|
|
-$(RM) $@
|
|
|
|
$(COPY) $< $@
|
2000-09-20 08:43:26 -05:00
|
|
|
.ENDIF # "$(CUSTOMMANIFESTFILE)"!=""
|
|
|
|
|
2005-06-17 03:49:55 -05:00
|
|
|
$(JARMANIFEST) .PHONY : $(CUSTOMMANIFESTFILEDEP)
|
2007-02-06 07:00:02 -06:00
|
|
|
@@-$(MKDIRHIER) $(@:d)
|
|
|
|
@@-$(RM) $@
|
2006-10-05 04:40:20 -05:00
|
|
|
echo Manifest-Version: 1.0 > $@
|
2005-06-17 03:49:55 -05:00
|
|
|
.IF "$(JARCLASSPATH)" != ""
|
2006-10-05 04:40:20 -05:00
|
|
|
echo $(USQ)Class-Path: $(JARCLASSPATH)$(USQ) >> $@
|
2005-06-17 03:49:55 -05:00
|
|
|
.ENDIF
|
2005-03-18 03:14:13 -06:00
|
|
|
# $(RSCREVISION) contains chars that must be quoted (for *NIX shells)
|
2006-10-05 04:40:20 -05:00
|
|
|
echo $(USQ)Solar-Version: $(RSCREVISION)$(USQ) >> $@
|
2000-09-20 08:43:26 -05:00
|
|
|
.IF "$(CUSTOMMANIFESTFILE)"!=""
|
2009-09-07 08:35:07 -05:00
|
|
|
$(TYPE) $(MISC)/$(TARGET)_$(CUSTOMMANIFESTFILE:f) >> $@
|
2000-09-20 08:43:26 -05:00
|
|
|
.ENDIF # "$(CUSTOMMANIFESTFILE)"!=""
|
|
|
|
.ENDIF # "$(JARMANIFEST)"!=""
|
2003-03-27 04:48:49 -06:00
|
|
|
.ENDIF # "$(NEW_JAR_PACK)"!=""
|
2000-09-20 08:43:26 -05:00
|
|
|
|
|
|
|
#
|
|
|
|
# build jar
|
|
|
|
#
|
|
|
|
.IF "$(NOJARDEP)"!="" || "$(NEW_JAR_PACK)"!=""
|
2003-03-27 04:48:49 -06:00
|
|
|
$(JARTARGETN) .PHONY :
|
2000-09-20 08:43:26 -05:00
|
|
|
# $(JARMANIFEST)
|
|
|
|
.ELSE # "$(NOJARDEP)"!="" || "$(NEW_JAR_PACK)"!=""
|
|
|
|
.DIRCACHE = no
|
2003-03-27 04:48:49 -06:00
|
|
|
$(JARTARGETN) :
|
2009-09-07 08:35:07 -05:00
|
|
|
#$(JARTARGETN) .SETDIR=$(CLASSDIR) .SEQUENTIAL : $(JARTARGETDEP) $(shell @-cat -s $(MISC)/$(JARTARGETN).dep )
|
2000-09-20 08:43:26 -05:00
|
|
|
.ENDIF # "$(NOJARDEP)"!="" || "$(NEW_JAR_PACK)"!=""
|
|
|
|
.IF "$(OS)$(CPU)"=="SOLARISS"
|
2007-01-25 05:54:58 -06:00
|
|
|
@-find . -type d -user $(USER) ! -perm -5 -print | xargs test "$$1" != "" && chmod +r $$1
|
2000-09-20 08:43:26 -05:00
|
|
|
.ENDIF
|
2005-05-06 03:37:41 -05:00
|
|
|
.IF "$(JARMANIFEST)"!=""
|
2009-09-07 08:35:07 -05:00
|
|
|
cd $(CLASSDIR)/$(TARGET) && zip -u -rX ../$(@:f) $(subst,$(CLASSDIR)/$(TARGET)/, $(JARMANIFEST)) $(CHECKZIPRESULT)
|
2005-05-06 03:37:41 -05:00
|
|
|
.ENDIF # "$(JARMANIFEST)"!=""
|
2007-01-25 05:54:58 -06:00
|
|
|
cd $(CLASSDIR) && zip -u -rX $(@:f) $(subst,\,/ $(JARCLASSDIRS)) $(CHECKZIPRESULT)
|
2000-09-20 08:43:26 -05:00
|
|
|
.ENDIF
|
|
|
|
|