1*7871dc3eSAndrew Rist#************************************************************** 2*7871dc3eSAndrew Rist# 3*7871dc3eSAndrew Rist# Licensed to the Apache Software Foundation (ASF) under one 4*7871dc3eSAndrew Rist# or more contributor license agreements. See the NOTICE file 5*7871dc3eSAndrew Rist# distributed with this work for additional information 6*7871dc3eSAndrew Rist# regarding copyright ownership. The ASF licenses this file 7*7871dc3eSAndrew Rist# to you under the Apache License, Version 2.0 (the 8*7871dc3eSAndrew Rist# "License"); you may not use this file except in compliance 9*7871dc3eSAndrew Rist# with the License. You may obtain a copy of the License at 10*7871dc3eSAndrew Rist# 11*7871dc3eSAndrew Rist# http://www.apache.org/licenses/LICENSE-2.0 12*7871dc3eSAndrew Rist# 13*7871dc3eSAndrew Rist# Unless required by applicable law or agreed to in writing, 14*7871dc3eSAndrew Rist# software distributed under the License is distributed on an 15*7871dc3eSAndrew Rist# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*7871dc3eSAndrew Rist# KIND, either express or implied. See the License for the 17*7871dc3eSAndrew Rist# specific language governing permissions and limitations 18*7871dc3eSAndrew Rist# under the License. 19*7871dc3eSAndrew Rist# 20*7871dc3eSAndrew Rist#************************************************************** 21*7871dc3eSAndrew Rist 22*7871dc3eSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir# this is an optional extension to gbuild 25cdf0e10cSrcweir# it depends on scripts outside the gbuild directory 26cdf0e10cSrcweir# nothing in the gbuild core should ever depend on it 27cdf0e10cSrcweir 28cdf0e10cSrcweir.PHONY : packmodule cleanpackmodule 29cdf0e10cSrcweir 30cdf0e10cSrcweirdefine gb_PackModule_setpackmodulecommand 31cdf0e10cSrcweirifeq ($$(words $(gb_Module_ALLMODULES)),1) 32cdf0e10cSrcweir$$(eval $$(call gb_Output_announce,$$(strip $$(gb_Module_ALLMODULES)),$$(true),ZIP,5)) 33cdf0e10cSrcweirpackmodule : COMMAND := $$(SOLARENV)/bin/packmodule $$(OUTDIR) $$(strip $$(gb_Module_ALLMODULES)) 34cdf0e10cSrcweirelse 35cdf0e10cSrcweir$$(eval $$(call gb_Output_announce,more than one module - creating no zipped package,$$(true),ZIP,5)) 36cdf0e10cSrcweirpackmodule : COMMAND := true 37cdf0e10cSrcweirendif 38cdf0e10cSrcweirendef 39cdf0e10cSrcweir 40cdf0e10cSrcweirpackmodule : allandcheck deliverlog 41cdf0e10cSrcweir $(eval $(call gb_PackModule_setpackmodulecommand)) 42cdf0e10cSrcweir $(COMMAND) 43cdf0e10cSrcweir 44cdf0e10cSrcweirdefine gb_PackModule_setcleanpackmodulecommand 45cdf0e10cSrcweirifeq ($$(words $(gb_Module_ALLMODULES)),1) 46cdf0e10cSrcweir$$(eval $$(call gb_Output_announce,$$(strip $$(gb_Module_ALLMODULES)),$$(false),ZIP,5)) 47cdf0e10cSrcweircleanpackmodule : COMMAND := rm -f $$(OUTDIR)/zip/$$(strip $$(gb_Module_ALLMODULES)).zip 48cdf0e10cSrcweirelse 49cdf0e10cSrcweir$$(eval $$(call gb_Output_announce,more than one module - deleting no zipped package,$$(false),ZIP,5)) 50cdf0e10cSrcweircleanpackmodule : COMMAND := true 51cdf0e10cSrcweirendif 52cdf0e10cSrcweirendef 53cdf0e10cSrcweir 54cdf0e10cSrcweircleanpackmodule : clean 55cdf0e10cSrcweir $(eval $(call gb_PackModule_setcleanpackmodulecommand)) 56cdf0e10cSrcweir $(COMMAND) 57cdf0e10cSrcweir 58cdf0e10cSrcweir# vim: set noet ts=4 sw=4: 59