]>
Commit | Line | Data |
---|---|---|
2854d28f | 1 | #!/bin/sh |
2 | ||
3 | # | |
4 | # Script to generate LinkDef file from a list of classes. | |
5 | # | |
6 | # Usage: GenerateLinkDef.sh [CLASS ...] | |
7 | # | |
8 | # Author: Christian Holm Christensen <cholm@nbi.dk> | |
9 | # | |
10 | ||
11 | # --- Help message --------------------------------------------------- | |
12 | usage() | |
13 | { | |
14 | cat<<EOF | |
15 | Usage: [OPTIONS] $0 [CLASS ...] | |
16 | ||
17 | Options: | |
18 | -h,--help This help | |
19 | -S,--no-evolution Do not enable schema evolution | |
20 | -C,--custom-streamer Use custom streamers | |
21 | EOF | |
22 | } | |
23 | ||
24 | # --- Default options ------------------------------------------------ | |
25 | schema="+" | |
26 | custom="" | |
27 | ||
28 | # --- Process options ------------------------------------------------ | |
29 | while test $# -gt 0 ; do | |
30 | case $1 in | |
31 | -h|--help) usage ; exit 0 ;; | |
32 | -S|--no-evolution) schema="" ;; | |
33 | -C|--custom-streamer) custom="-" ;; | |
34 | *) break ;; | |
35 | esac | |
36 | shift | |
37 | done | |
38 | ||
39 | # --- Header --------------------------------------------------------- | |
40 | cat <<EOF | |
41 | // Auto generated file - do not edit | |
42 | #ifndef __CINT__ | |
43 | # error Not for compilation | |
44 | #else | |
45 | #pragma link off all globals; | |
46 | #pragma link off all classes; | |
47 | #pragma link off all functions; | |
48 | ||
49 | EOF | |
50 | ||
51 | # --- Link definitions ----------------------------------------------- | |
52 | while test $# -gt 0 ; do | |
53 | echo "#pragma link C++ class ${1}${schema}${custom};" | |
54 | shift | |
55 | done | |
56 | ||
57 | # --- Trailer -------------------------------------------------------- | |
58 | cat <<EOF | |
59 | ||
60 | #endif // __CINT__ | |
61 | // | |
62 | // EOF | |
63 | // | |
64 | EOF | |
65 | ||
66 | # | |
67 | # EOF | |
68 | # | |
69 | ||
70 | ||
71 |