equal
deleted
inserted
replaced
|
1 # |
|
2 # Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 # All rights reserved. |
|
4 # This component and the accompanying materials are made available |
|
5 # under the terms of "Eclipse Public License v1.0" |
|
6 # which accompanies this distribution, and is available |
|
7 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 # |
|
9 # Initial Contributors: |
|
10 # Nokia Corporation - initial contribution. |
|
11 # |
|
12 # Contributors: |
|
13 # |
|
14 # Description: |
|
15 # |
|
16 |
|
17 use File::Find; |
|
18 $cp = $ENV{'OMJ_PP_CP'}; |
|
19 $root_dir = $ENV{'OMJ_PP_ROOT_DIR'}; |
|
20 $jar_dir = $ENV{'OMJ_PP_JAR_DIR'}; |
|
21 @javac = ("javac", "-cp", "$cp", ,"-d", "classes", "myClass.java"); |
|
22 my $current_dir; |
|
23 sub process_dir { |
|
24 if (-d $_) |
|
25 { |
|
26 $current_dir = $_; |
|
27 } |
|
28 $current_file = $_; |
|
29 @jar = ("jar", "-cf", "$jar_dir$current_dir.jar","-C","classes","."); |
|
30 if ($current_file eq "myClass.java") |
|
31 { |
|
32 system("mkdir","classes"); |
|
33 system(@javac); |
|
34 system(@jar); |
|
35 } |
|
36 } |
|
37 find(\&process_dir, $root_dir); |