1#!/usr/bin/env omake 2#---------------------------------------------------------------------------- 3# Project: Horizon 4# File: packagedefs.om 5# 6# Copyright 2007-2009 Nintendo. All rights reserved. 7# 8# These coded instructions, statements, and computer programs contain 9# proprietary information of Nintendo of America Inc. and/or Nintendo 10# Company Ltd., and are protected by Federal copyright law. They may 11# not be disclosed to third parties or copied or duplicated in any form, 12# in whole or in part, without the prior written consent of Nintendo. 13# 14# $Date:: 2010-04-07#$ 15# $Rev: 13736 $ 16# $Author: hatamoto_minoru $ 17#---------------------------------------------------------------------------- 18 19PackageManager. = 20 class PackageManager 21 22 new() = 23 this.pmap = $(Map) 24 return $(this) 25 26 add(name) = 27 pmap = $(pmap.add $(name), true) 28 export 29 30 isAvailable(name) = 31 return $(pmap.mem $(name)) 32 33 isPackaged() = 34 return $(isAvailable internal) 35 36 dump() = 37 pmap.foreach(k, v) 38 println($"Package: "$(k)) 39 return 40 41declare public.PACKAGE_MANAGER 42PACKAGE_MANAGER = $(PackageManager.new) 43 44if $(test -d $(ROOT_OMAKE)/private) 45 foreach(DEF,$(ls $(ROOT_OMAKE)/private/*.om)) 46 include $(removesuffix $(DEF)) 47 export 48 export 49 50#PACKAGE_MANAGER.dump() 51