gnumake2: packmodule extension
This commit is contained in:
parent
068d8ecd8b
commit
034f941e55
5 changed files with 64 additions and 3 deletions
|
@ -52,7 +52,7 @@ def main(args):
|
|||
[packedmodule.write(path) for path in stripped_paths_to_pack(deliverlog)]
|
||||
packedmodule.close()
|
||||
|
||||
if __name__ == "__main__":
|
||||
if __name__ == "__main__":
|
||||
main(sys.argv)
|
||||
|
||||
# vim:set et sw=4 ts=4 filetype=python:
|
||||
|
|
|
@ -58,11 +58,12 @@ define gb_Deliver_deliver
|
|||
$(call gb_Deliver__deliverprefix,$(2)) $(gb_Deliver_GNUCOPY) -f $(1) $(2)
|
||||
endef
|
||||
|
||||
# we need the trailing whitespace so that the newline of echo does not become part of the last record
|
||||
define gb_Deliver_setdeliverlogcommand
|
||||
ifeq ($$(words $(gb_Module_ALLMODULES)),1)
|
||||
$$(eval $$(call gb_Output_announce,$$(strip $$(gb_Module_ALLMODULES)),$$(true),LOG,1))
|
||||
deliverlog : COMMAND := mkdir -p $$(OUTDIR)/inc/$$(strip $$(gb_Module_ALLMODULES)) &&
|
||||
deliverlog : COMMAND += echo "$$(strip $$(call gb_Deliver_DELIVERABLES))" | awk -f $$(GBUILDDIR)/processdelivered.awk > $$(OUTDIR)/inc/$$(strip $(gb_Module_ALLMODULES))/deliver.log
|
||||
deliverlog : COMMAND += echo "$$(strip $$(call gb_Deliver_DELIVERABLES)) " | awk -f $$(GBUILDDIR)/processdelivered.awk > $$(OUTDIR)/inc/$$(strip $(gb_Module_ALLMODULES))/deliver.log
|
||||
else
|
||||
$$(eval $$(call gb_Output_announce,more than one module - creating no deliver.log,$$(true),LOG,1))
|
||||
deliverlog : COMMAND := true
|
||||
|
|
56
solenv/gbuild/extensions/PackModule.mk
Normal file
56
solenv/gbuild/extensions/PackModule.mk
Normal file
|
@ -0,0 +1,56 @@
|
|||
#*************************************************************************
|
||||
#
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# Copyright 2009 by Sun Microsystems, Inc.
|
||||
#
|
||||
# OpenOffice.org - a multi-platform office productivity suite
|
||||
#
|
||||
# This file is part of OpenOffice.org.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# 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).
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
#*************************************************************************
|
||||
|
||||
# this is an optional extension to gbuild
|
||||
# it depends on scripts outside the gbuild directory
|
||||
# nothing in the gbuild core should ever depend on it
|
||||
|
||||
define gb_PackModule_setpackmodulecommand
|
||||
ifeq ($$(words $(gb_Module_ALLMODULES)),1)
|
||||
$$(eval $$(call gb_Output_announce,$$(strip $$(gb_Module_ALLMODULES)),$$(true),ZIP,5))
|
||||
packmodule : COMMAND := $$(SOLARENV)/bin/packmodule $$(OUTDIR) $$(strip $$(gb_Module_ALLMODULES)) $$(UPDMINOR)
|
||||
else
|
||||
$$(eval $$(call gb_Output_announce,more than one module - creating no zipped package,$$(true),ZIP,5))
|
||||
packmodule : COMMAND := true
|
||||
endif
|
||||
endef
|
||||
|
||||
.PHONY : packmodule cleanpackmodule
|
||||
packmodule : all
|
||||
$(eval $(call gb_PackModule_setpackmodulecommand))
|
||||
$(COMMAND)
|
||||
|
||||
# TODO: implement cleanpackmodule
|
||||
# Should cleanpackmodule depend on clean and thus remove the build too? That
|
||||
# would be consistent with the current behaviour of packmodule. Or should it
|
||||
# only remove the packed module, but nothing else? Or should packmodule have
|
||||
# an order only dependency on all? Then one could either pack whats there with
|
||||
# "packmodule" (might fail on an incomplete build) or make sure everything is
|
||||
# up-to-date with "packmodule all".
|
||||
|
||||
|
||||
# vim: set noet ts=4 sw=4:
|
|
@ -207,4 +207,9 @@ include $(foreach class, \
|
|||
Module \
|
||||
,$(GBUILDDIR)/$(class).mk)
|
||||
|
||||
# optional extensions that should never be essential
|
||||
ifneq ($(wildcard $(GBUILDDIR)/extensions/*.mk),)
|
||||
include $(wildcard $(GBUILDDIR)/extensions/*.mk)
|
||||
endif
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
||||
|
|
|
@ -33,4 +33,3 @@ BEGIN {
|
|||
NF == 2 {
|
||||
print "COPY " $1 " " $2;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue