1 # 2 # Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 # 5 # This code is free software; you can redistribute it and/or modify it 6 # under the terms of the GNU General Public License version 2 only, as 7 # published by the Free Software Foundation. Oracle designates this 8 # particular file as subject to the "Classpath" exception as provided 9 # by Oracle in the LICENSE file that accompanied this code. 10 # 11 # This code is distributed in the hope that it will be useful, but WITHOUT 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 # version 2 for more details (a copy is included in the LICENSE file that 15 # accompanied this code). 16 # 17 # You should have received a copy of the GNU General Public License version 18 # 2 along with this work; if not, write to the Free Software Foundation, 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 # 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 # or visit www.oracle.com if you need additional information or have any 23 # questions. 24 # 25 26 PACKAGE=com/sun/kenc/util 27 28 CLASSES=LogWrapperBase IndentingPrintWriter StringUtil 29 SOURCE=$(CLASSES:%=$(PACKAGE)/%.java) 30 OBJECT=$(CLASSES:%=$(PACKAGE)/%.class) 31 32 MCROOTS= Activation Interceptors IOR Naming ORBUtil POA Util OMG 33 MCFILES=$(MCROOTS:%=data/%.mc) 34 MCSOURCE=$(MCROOTS:%=$(PACKAGE)/%SystemException.java) 35 MCCLASS=$(MCROOTS:%=$(PACKAGE)/%SystemException.class) 36 MCRESOURCE=$(MCROOTS:%=resources/%SystemException.resource) 37 38 JARDIR=lib 39 UTILJAR=$(JARDIR)/util.jar 40 JSCHEMEJAR=$(JARDIR)/jscheme.jar 41 JARS=$(UTILJAR):$(JSCHEMEJAR) 42 43 all: mkdir jar resources classes 44 45 mkdir : 46 @-mkdir resources 47 48 clean: 49 @-rm $(OBJECT) $(MCSOURCE) $(MCOBJECT) $(MCCLASS) $(MCRESOURCE) $(UTILJAR) 50 51 test: 52 @echo "PACKAGE :" $(PACKAGE) 53 @echo "CLASSES :" $(CLASSES) 54 @echo "SOURCE :" $(SOURCE) 55 @echo "OBJECT :" $(OBJECT) 56 @echo "MCROOTS :" $(MCROOTS) 57 @echo "MCFILES :" $(MCFILES) 58 @echo "MCCLASS :" $(MCCLASS) 59 @echo "MCRESOURCE :" $(MCRESOURCE) 60 61 jar: $(UTILJAR) 62 63 $(UTILJAR) : $(OBJECT) 64 jar cvf $(JARDIR)/util.jar $(OBJECT) 65 66 $(OBJECT) : $(SOURCE) 67 68 classes: $(MCCLASS) 69 70 $(MCCLASS) : $(MCSOURCE) 71 72 $(MCSOURCE) : $(MCFILES) 73 74 resources: $(MCRESOURCE) 75 76 $(MCRESOURCE) : $(MCFILES) 77 78 # This target does not compile, because the generated source code requires 79 # com.sun.corba.se.impl.util.SUNVMCID, which would normally be built in the 80 # ee package. This should not be a problem once everything is merged into the 81 # workspace. 82 genclasses: $(MCCLASS) 83 84 $(PACKAGE)/%SystemException.java : data/%.mc 85 ./mc make-class $< 86 mv *SystemException.java $(PACKAGE) 87 88 resources/%SystemException.resource : data/%.mc 89 ./mc make-resource $< 90 mv *.resource resources 91 92 $(PACKAGE)/%.class : $(PACKAGE)/%.java 93 javac -classpath $(JARS) $<