]> git.uio.no Git - u/mrichter/AliRoot.git/blame - cmake/GenerateLinkDef.sh
doxy: consider comments after last line
[u/mrichter/AliRoot.git] / cmake / GenerateLinkDef.sh
CommitLineData
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 ---------------------------------------------------
12usage()
13{
14 cat<<EOF
15Usage: [OPTIONS] $0 [CLASS ...]
16
17Options:
18 -h,--help This help
19 -S,--no-evolution Do not enable schema evolution
20 -C,--custom-streamer Use custom streamers
21EOF
22}
23
24# --- Default options ------------------------------------------------
25schema="+"
26custom=""
27
28# --- Process options ------------------------------------------------
29while 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
37done
38
39# --- Header ---------------------------------------------------------
40cat <<EOF
41// Auto generated file - do not edit
d9298a37 42#if !defined(__CINT__) && !defined(__CLING__)
2854d28f 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
49EOF
50
51# --- Link definitions -----------------------------------------------
52while test $# -gt 0 ; do
53 echo "#pragma link C++ class ${1}${schema}${custom};"
54 shift
55done
56
57# --- Trailer --------------------------------------------------------
58cat <<EOF
59
60#endif // __CINT__
61//
62// EOF
63//
64EOF
65
66#
67# EOF
68#
69
70
71