source: branches/properties/SOURCE_TOOLS/make_java_dependencies.sh

Last change on this file was 9750, checked in by westram, 12 years ago
  • applied (not merged!) [9668] from gtk_only.
    • merge did not work w/o conflicts since the patch mixes gtk-specific changes with general changes (better would have been applied to some non-gtk-branch and then merged into gtk-branch)
    • merging and resolving conflicts now would skip unmergeable parts. when gtk is merged someday, these parts would get lost.
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 843 bytes
Line 
1#!/bin/bash
2# ------------------------------------------------------------------------
3#
4#  very simple java dependency generator
5#  XXX.class depends on all *.java containing the word XXX
6#
7#  Coded by Ralf Westram (coder@reallysoft.de) in September 2003
8#  Copyright Department of Microbiology (Technical University Munich)
9#
10#  Visit our web site at: http://www.arb-home.de/
11#
12# ------------------------------------------------------------------------
13
14SED=${ARBHOME}/SH/arb_sed
15
16find_deps_for() {
17    grep -w -H $1 *.java | $SED -e 's/^\([^:]*\)\.java:.*$/\1.class/ig' | sort | uniq
18}
19
20append_dep() {
21    $SED -e "s/$/ : $1/ig"
22}
23
24make_dependencies() {
25    for JAVA in *.java; do
26        BASE=`basename $JAVA .java`
27        DEPEND=`find_deps_for $BASE | append_dep $BASE.java`
28        echo "$DEPEND"
29    done
30}
31
32make_dependencies | sort
33
34
Note: See TracBrowser for help on using the repository browser.