/[PAMELA software]/DarthVader/TrackerLevel2/Makefile
ViewVC logotype

Diff of /DarthVader/TrackerLevel2/Makefile

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by pam-fi, Tue Nov 7 15:55:10 2006 UTC revision 1.41 by mocchiut, Tue Feb 3 10:31:52 2009 UTC
# Line 1  Line 1 
1  # Tracker flight analysis software  # Tracker flight analysis software
2  # SOFTWARE VERSION  # SOFTWARE VERSION
3  VER= v2r00  VER= v6r01
4  DEBUG=0  DEBUG=0
5  # An almost general purpouse Makefile for PAMELA repository  # An almost general purpouse Makefile for PAMELA repository
6  # Let's start with some usefull definition for colorize the echo  # Let's start with some usefull definition for colorize the echo
7  RED='\E[1;31;40m'  RED='\E[1;31;40m'
8  GREEN='\E[1;32;40m'  GREEN='\E[1;32;40m'
9  YELLOW='\E[1;33;40m'  YELLOW='\E[1;33;40m'
10  BLUE='\E[1;34;40m'  BLUE='\E[1;34;40m'
11  WHITE='\E[1;37;40m'  WHITE='\E[1;37;40m'
12  VIOLET='\E[1;35;40m'  VIOLET='\E[1;35;40m'
13  CYAN='\E[1;36;40m'  CYAN='\E[1;36;40m'
14  # Here the echo definition to use them  # Here the echo definition to use them
15  EVIOLET=echo -e ${VIOLET}  EVIOLET=echo -e ${VIOLET}
16  ECYAN=echo -e ${CYAN}  ECYAN=echo -e ${CYAN}
17  ERED=echo -e ${RED}  ERED=echo -e ${RED}
18  EGREEN=echo -e ${GREEN}  EGREEN=echo -e ${GREEN}
19  EYELLOW=echo -e ${YELLOW}  EYELLOW=echo -e ${YELLOW}
20  EBLUE=echo -e ${BLUE}  EBLUE=echo -e ${BLUE}
21  EWHITE=echo -e ${WHITE}  EWHITE=echo -e ${WHITE}
22  # Reset the terminal  # Reset the terminal
23  RESET=tput sgr0  RESET=tput sgr0
24  # Here the variables used to override the standard make flags  # Here the variables used to override the standard make flags
25  # C  # C
26  CC=gcc  CC=gcc
27  #CFLAGS=-Wall -O -fPIC -pthread -g  #CFLAGS=-Wall -O -fPIC -pthread -g ${PAM_BIT}
28  CFLAGS=-Wall -O -fPIC -pthread  #CFLAGS=-Wall -O -fPIC -pthread ${PAM_BIT}
29  # Enviroment:  CFLAGS=-Wall -O3 -funroll-loops -fPIC -pthread ${PAM_BIT}
30  GCCVER=`gcc --version | head -1`  #CFLAGS=-Wall -fPIC -pthread ${PAM_BIT}
31  UNAMEA=`uname -a`  # Enviroment:
32  TODAY=`date`  GCCVER=`gcc --version | head -1`
33  # F77  UNAMEA=`uname -a`
34  F77=g77  TODAY=`date`
35  #F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -g -extend_source -static -fno-backslash  # F77
36  F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash  F77=g77
37  # C++  #F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -g -extend_source -static -fno-backslash  ${PAM_BIT}
38  CXX=g++  #F77FLAGS=  -malign-double -Wall -funroll-loops -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash -fPIC ${PAM_BIT}
39  #CXXFLAGS=-Wall -O -fPIC -pthread -g -D'DEBUG=${DEBUG}'  #F77FLAGS=  -malign-double -Wall -funroll-loops -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash -fPIC ${PAM_BIT}
40  #CXXFLAGS=-Wall -O -fPIC -pthread -g -D'DEBUG=0'  F77FLAGS=  -O2 -malign-double -Wall -funroll-loops -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash -fPIC ${PAM_BIT}
41  #CXXFLAGS=-Wall -O -fPIC -pthread -fpermissive  #F77FLAGS=  -malign-double -Wall -funroll-loops -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash -fPIC ${PAM_BIT}
42  CXXFLAGS=-Wall -O -fPIC -pthread  #F77FLAGS=   -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash -fPIC ${PAM_BIT}
43  # ROOTCINT  #F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash -fPIC ${PAM_BIT}
44  ROOTCINT=rootcint  # C++
45  # Here the variables definig the local directories  CXX=g++
46  DIRTOP=${shell pwd}  #CXXFLAGS=-Wall -O -fPIC -pthread -g -D'DEBUG=${DEBUG}' ${PAM_BIT}
47  #DIRLIB=lib/${ARCH}/  #CXXFLAGS=-Wall -O -fPIC -pthread -g -D'DEBUG=0' ${PAM_BIT}
48  #DIRBIN=bin/${ARCH}/  #CXXFLAGS=-Wall -O -fPIC -pthread -fpermissive ${PAM_BIT}
49  DIRLIB=../lib/${ARCH}/  #CXXFLAGS=-Wall -O4 -fPIC -pthread ${PAM_BIT}
50  DIRBIN=../bin/${ARCH}/  CXXFLAGS=-Wall -O3 -funroll-loops -fPIC -pthread ${PAM_BIT}
51  DIRSRC=src  #CXXFLAGS=-Wall -fPIC -pthread ${PAM_BIT}
52  DIRINC=inc  # ROOTCINT
53  DIRDOC=doc  ROOTCINT=rootcint
54  DIRMACROS=macros  # Here the variables definig the local directories
55  DIRCALIB=calib  DIRTOP=${shell pwd}
56  # Here the  PAMELA environmental variables to be checked  #DIRLIB=lib/${ARCH}/
57  PAM_ENV= PAM_BIN_env PAM_LIB_env PAM_INC_env PAM_DOC_env PAM_YODA_env  #DIRBIN=bin/${ARCH}/
58  # Here the local variables used to build the targets  DIRLIB=../lib/${ARCH}/
59  #-------------------------------------------------  DIRBIN=../bin/${ARCH}/
60  FSRCS=${DIRSRC}/F77/fillpedsig.f   \  DIRSRC=src
61          ${DIRSRC}/F77/readallparam.f \  DIRINC=inc
62          ${DIRSRC}/F77/functions.f    \  DIRDOC=doc
63          ${DIRSRC}/F77/cncomp.f    \  DIRMACROS=macros
64          ${DIRSRC}/F77/filladc.f    \  DIRCALIB=calib
65          ${DIRSRC}/F77/reductionflight.f \  # Here the  PAMELA environmental variables to be checked
66          ${DIRSRC}/F77/functionspfa.f    \  PAM_ENV= PAM_BIN_env PAM_LIB_env PAM_INC_env PAM_DOC_env PAM_YODA_env
67          ${DIRSRC}/F77/mini.f \  # Here the local variables used to build the targets
68          ${DIRSRC}/F77/tricircle.f \  #-------------------------------------------------
69          ${DIRSRC}/F77/analysissubroutines.f \  FSRCS=${DIRSRC}/F77/fillpedsig.f   \
70          ${DIRSRC}/F77/analysisflight.f \          ${DIRSRC}/F77/readallparam.f \
71          ${DIRSRC}/F77/readB.f \          ${DIRSRC}/F77/functions.f    \
72          ${DIRSRC}/F77/interB.f \          ${DIRSRC}/F77/cncomp.f    \
73          ${DIRSRC}/F77/track.f \          ${DIRSRC}/F77/filladc.f    \
74          ${DIRSRC}/F77/grkuta.f          ${DIRSRC}/F77/reductionflight.f \
75            ${DIRSRC}/F77/functionspfa.f    \
76  FOBJS=$(FSRCS:${DIRSRC}/F77/%.f=${DIRLIB}/%.o)          ${DIRSRC}/F77/mini.f \
77  #-------------------------------------------------          ${DIRSRC}/F77/tricircle.f \
78  CSRCS=          ${DIRSRC}/F77/analysissubroutines.f \
79  COBJS=$(CSRCS:${DIRSRC}%.cpp=${DIRLIB}/%.o)          ${DIRSRC}/F77/analysisflight.f \
80  #-------------------------------------------------          ${DIRSRC}/F77/readB.f \
81  # librerie utilizzabili da root (ci deve essere anche il ***LinkDef.h )          ${DIRSRC}/F77/interB.f \
82  LIBROOTSRCS=    ${DIRSRC}/TrkLevel2.cpp  \          ${DIRSRC}/F77/track.f \
83                                  ${DIRSRC}/TrkLevel1.cpp          ${DIRSRC}/F77/grkuta.f \
84  #LIBROOTSRCS=            ${DIRSRC}/F77/bdll.f      # ***PP***
85  LIBROOTLIBS=$(LIBROOTSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so)  
86  LIBROOTOBJS=${DIRLIB}/readB.o ${DIRLIB}/interB.o ${DIRLIB}/track.o ${DIRLIB}/grkuta.o ${DIRLIB}/functionspfa.o ${DIRLIB}/readallparam.o ${DIRLIB}/functions.o ${DIRLIB}/mini.o  FOBJS=$(FSRCS:${DIRSRC}/F77/%.f=${DIRLIB}/%.o)
87  LIBROOTCLIBS=libTrkLevel2 libTrkLevel1  #-------------------------------------------------
88  #LIBROOTCLIBS=  CSRCS=
89  FULLROOTCLIBS=$(LIBROOTCLIBS:%=${DIRLIB}/%_${VER}.so)  COBJS=$(CSRCS:${DIRSRC}%.cpp=${DIRLIB}/%.o)
90  #-------------------------------------------------  #-------------------------------------------------
91  # librerie C++ NON utilizzabili da root  # librerie utilizzabili da root (ci deve essere anche il ***LinkDef.h )
92  #LIBCPPSRCS=  ${DIRSRC}/TrkLevel2.cpp \  LIBROOTSRCS=${DIRSRC}/TrkParams.cpp \
93  #               ${DIRSRC}/TrkLevel0.cpp          ${DIRSRC}/TrkLevel2.cpp  \
94  LIBCPPSRCS=${DIRSRC}/TrkLevel0.cpp \          ${DIRSRC}/TrkLevel1.cpp \
95             ${DIRSRC}/TrkStruct.cpp \          ${DIRSRC}/TrkLevel0.cpp \
96             ${DIRSRC}/TrkProcess.cpp \          ${DIRSRC}/TrkHough.cpp \
97             ${DIRSRC}/TrkVerl2.cpp \          ${DIRSRC}/TrkCalib.cpp
98             ${DIRSRC}/TrkCore.cpp    
99  LIBCPPLIBS=$(LIBCPPSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so)  #LIBROOTSRCS=  
100  #LIBCPPCLIBS=libTrkLevel2 libTrkLevel0  LIBROOTLIBS=$(LIBROOTSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so)
101  LIBCPPCLIBS=libTrkLevel0 libTrkStruct libTrkProcess libTrkCore libTrkVerl2  LIBROOTOBJS=${DIRLIB}/readB.o \
102  FULLCPPCLIBS=$(LIBCPPCLIBS:%=${DIRLIB}/%_${VER}.so)          ${DIRLIB}/interB.o \
103  #-------------------------------------------------          ${DIRLIB}/track.o \
104  # librerie F77 NON utilizzabili da root          ${DIRLIB}/grkuta.o \
105  LIBF77SRCS=          ${DIRLIB}/bdll.o \
106  LIBF77OBJS= $(LIBF77SRCS:${DIRSRC}/F77/%.f=${DIRLIB}/%.o)          ${DIRLIB}/functionspfa.o \
107  LIBF77LIBS= $(LIBF77SRCS:${DIRSRC}/F77/%.f=${DIRLIB}/lib%_${VER}.so)          ${DIRLIB}/readallparam.o \
108  LIBF77CLIBS=          ${DIRLIB}/functions.o  \
109  FULLF77CLIBS=$(LIBF77CLIBS:%=${DIRLIB}/%_${VER}.so)          ${DIRLIB}/mini.o  \
110  #-------------------------------------------------          ${DIRLIB}/tricircle.o  \
111  FULLLIBS=${FULLROOTCLIBS} ${FULLCPPCLIBS} ${FULLF77CLIBS}          ${DIRLIB}/analysisflight.o  \
112            ${DIRLIB}/analysissubroutines.o  \
113  #-------------------------------------------------          ${DIRLIB}/fillpedsig.o  \
114  # eseguibile          ${DIRLIB}/cncomp.o  \
115  CXXEXESRCS=${DIRSRC}/TrackerLevel2.cpp          ${DIRLIB}/filladc.o  \
116  CXXEXEOBJS=$(CXXEXESRCS:${DIRSRC}%.cpp=${DIRLIB}%.o)          ${DIRLIB}/reductionflight.o
117  CXXEXELIBS:=TrackerLevel2  LIBROOTCLIBS= libTrkParams libTrkLevel2 libTrkLevel1 libTrkLevel0 libTrkHough libTrkCalib
118    
119  OTHERLIBS=${PAM_LIB}/libGLTables.so ${DIRLIB}/libRunInfo.so  #LIBROOTCLIBS=
120  SUBDIR=../RunInfo  FULLROOTCLIBS=$(LIBROOTCLIBS:%=${DIRLIB}/%_${VER}.so)
121  SUBINC=$(shell for dir in `echo ${SUBDIR}`; do echo -I$${dir}/inc; done)  #-------------------------------------------------
122    # librerie C++ NON utilizzabili da root
123  #-------------------------------------------------  #LIBCPPSRCS=  ${DIRSRC}/TrkLevel2.cpp \
124  # variabili per l'installazione  #               ${DIRSRC}/TrkLevel0.cpp
125  EXESRCS=${DIRBIN}/TrackerLevel2  LIBCPPSRCS=${DIRSRC}/TrkStruct.cpp \
126  INCSRCS= \             ${DIRSRC}/TrkProcess.cpp \
127          ${DIRINC}/TrkLevel2.h \             ${DIRSRC}/TrkVerl2.cpp \
128          ${DIRINC}/TrkLevel1.h \             ${DIRSRC}/TrkCore.cpp \
129          ${DIRINC}/TrkLevel0.h \  #          ${DIRSRC}/TrkLevel0.cpp
130          ${DIRINC}/TrkStruct.h \  
131          ${DIRINC}/TrkProcess.h \  LIBCPPLIBS=$(LIBCPPSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so)
132          ${DIRINC}/TrkCore.h \  #LIBCPPCLIBS=libTrkLevel2 libTrkLevel0
133          ${DIRINC}/TrkVerl2.h  LIBCPPCLIBS= libTrkStruct libTrkProcess libTrkCore libTrkVerl2 #libTrkLevel0
134  MACROSSRCS=  FULLCPPCLIBS=$(LIBCPPCLIBS:%=${DIRLIB}/%_${VER}.so)
135  CALIBFILES=  #-------------------------------------------------
136  DOCFILES=  # librerie F77 NON utilizzabili da root
137  # Here the Variables used for info target  LIBF77SRCS=
138  PACKAGE=Tracker flight software  LIBF77OBJS= $(LIBF77SRCS:${DIRSRC}/F77/%.f=${DIRLIB}/%.o)
139  EXECUTABLES=${EXESRCS}  LIBF77LIBS= $(LIBF77SRCS:${DIRSRC}/F77/%.f=${DIRLIB}/lib%_${VER}.so)
140  LIBS= ${FULLLIBS} ${OTHERLIBS}  LIBF77CLIBS=
141  DOCS=  FULLF77CLIBS=$(LIBF77CLIBS:%=${DIRLIB}/%_${VER}.so)
142  SRCS=  #-------------------------------------------------
143  MACROS= ${MACROSSRCS}  FULLLIBS=${FULLROOTCLIBS} ${FULLCPPCLIBS} ${FULLF77CLIBS}
144  INCLUDE= ${INCSRCS}  
145  #  #-------------------------------------------------
146  TOBEDEL = junk  # eseguibile
147  ROOTINC=$$${shell root-config --incdir}  CXXEXESRCS=${DIRSRC}/TrackerLevel2.cpp
148  NROOTINC=${shell root-config --incdir}  CXXEXEOBJS=$(CXXEXESRCS:${DIRSRC}%.cpp=${DIRLIB}%.o)
149  # Let's start  CXXEXELIBS:=TrackerLevel2
150  #all : test mkbindir mklibdir mkverpath ${LIBF77LIBS} ${LIBROOTLIBS} ${LIBCPPLIBS} ${FOBJS} ${COBJS} ${CXXEXELIBS}  
151  all : test mkbindir mklibdir mkverpath ${LIBF77LIBS} ${LIBROOTLIBS} ${LIBCPPLIBS}  OTHERLIBS=${PAM_LIB}/libGLTables.so ${DIRLIB}/libRunInfo.so
152  all:  SUBDIR=../RunInfo
153          @echo -e ${GREEN} ""  SUBINC=$(shell for dir in `echo ${SUBDIR}`; do echo -I$${dir}/inc; done)
154          @(${EGREEN} " Finished, now you can install the package \n  (use: make install or make upgrade or make forceinstall) "; ${RESET})  
155          @echo -e ${GREEN} ""  #-------------------------------------------------
156          @${RESET}  # variabili per l'installazione
157    EXESRCS=${DIRBIN}/TrackerLevel2
158  standalone: all ${CXXEXELIBS}  INCSRCS= \
159            ${DIRINC}/TrkLevel2.h \
160  # Here some general rules to produce objects in our local dir          ${DIRINC}/TrkLevel1.h \
161  ${DIRLIB}/%.o: ${DIRSRC}/%.cpp          ${DIRINC}/TrkLevel0.h \
162  #       @(${EYELLOW} " C++ object ------------------------")          ${DIRINC}/TrkHough.h \
163          @(${EGREEN} "Creating C++ object file: "${WHITE} "$@"; ${RESET})          ${DIRINC}/TrkCalib.h \
164          @${CXX} ${CXXFLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.cpp -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ `root-config --cflags`          ${DIRINC}/TrkParams.h \
165            ${DIRINC}/TrkStruct.h \
166  ${DIRLIB}/%.o : ${DIRSRC}/F77/%.f          ${DIRINC}/TrkProcess.h \
167  #       @(${EYELLOW} " F77 object ------------------------")          ${DIRINC}/TrkCore.h \
168          @(${EGREEN} "Creating F77 object file: "${WHITE} "$@"; ${RESET})          ${DIRINC}/TrkVerl2.h
169          @${F77} ${F77FLAGS} -c -o $@ ${DIRSRC}/F77/`basename ${@} .o`.f -I${DIRTOP}/${DIRINC}/F77 -I${NROOTINC} ${SUBINC} -I${PAM_YODA}/include/yoda -I${PAM_INC}/  MACROSSRCS=
170    CALIBFILES=
171  # .so from .o fortran  DOCFILES=
172  ${LIBF77LIBS}: ${LIBF77OBJS}  # Here the Variables used for info target
173          @(${EYELLOW} " F77 shared library --------------------------")  PACKAGE=Tracker flight software
174          @(${EGREEN} "Creating library: "${WHITE} "$@"; ${RESET})  EXECUTABLES=${EXESRCS}
175  #       @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ $^ `cernlib mathlib` /usr/lib/libg2c.so.0  LIBS= ${FULLLIBS} ${OTHERLIBS}
176  ##      @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c $^ `cernlib mathlib`  DOCS=
177          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c $^  SRCS=
178    MACROS= ${MACROSSRCS}
179  ${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS}  INCLUDE= ${INCSRCS}
180          @(${EYELLOW} " ROOT library ------------------------")  #
181          @(${EGREEN} "Creating file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp"; ${RESET})  TOBEDEL = junk
182  #  ROOTINC=$$${shell root-config --incdir}
183  #       Create *Dict.cpp and *Dict.h  NROOTINC=${shell root-config --incdir}
184  #  # Let's start
185          @${ROOTCINT} -f ${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp -c -I${ROOTINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ ${DIRINC}/`basename $(@F) _${VER}.so | sed s/lib//`.h ${DIRINC}/`basename $(@F) _${VER}.so | sed s/lib//`LinkDef.h  #all : test mkbindir mklibdir mkverpath ${LIBF77LIBS} ${LIBROOTLIBS} ${LIBCPPLIBS} ${FOBJS} ${COBJS} ${CXXEXELIBS}
186  #  all : test mkbindir mklibdir mkverpath ${LIBF77LIBS} ${LIBROOTLIBS} ${LIBCPPLIBS}
187  #       create .o  all:
188  #          @echo -e ${GREEN} ""
189          @(${EGREEN} "Compiling file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET})          @(${EGREEN} " Finished, now you can install the package \n  (use: make install or make upgrade or make forceinstall) "; ${RESET})
190          @${CXX} ${CXXFLAGS} -c ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.cpp  -o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o -I${DIRTOP}/${DIRINC} -I${DIRTOP} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ -I${NROOTINC};          @echo -e ${GREEN} ""
191          @(${EGREEN} "Compiling file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp"; ${RESET})          @${RESET}
192          @${CXX} ${CXXFLAGS} -c ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp -o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_INC} -I${PAM_YODA}/include/yoda/ -I${NROOTINC};  
193          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))  standalone: all ${CXXEXELIBS}
194  #  
195  #       create .so  # Here some general rules to produce objects in our local dir
196  #  ${DIRLIB}/%.o: ${DIRSRC}/%.cpp
197          @(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET})  #       @(${EYELLOW} " C++ object ------------------------")
198  ##      @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda -I${PAM_INC} ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o ${LIBROOTOBJS} `cernlib mathlib` 1>/dev/null                  @(${EGREEN} "Creating C++ object file: "${WHITE} "$@"; ${RESET})
199          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda -I${PAM_INC} ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o ${LIBROOTOBJS} 1>/dev/null            @${CXX} ${CXXFLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.cpp -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ `root-config --cflags`
200  #       ${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ ${SUBINC} ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o 1>/dev/null  
201          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))  ${DIRLIB}/%.o : ${DIRSRC}/F77/%.f
202          @(${EYELLOW} " -------------------------------------")  #       @(${EYELLOW} " F77 object ------------------------")
203            @(${EGREEN} "Creating F77 object file: "${WHITE} "$@"; ${RESET})
204  ${LIBCPPLIBS}: ${LIBCPPSRCS}          @${F77} ${F77FLAGS} -c -o $@ ${DIRSRC}/F77/`basename ${@} .o`.f -I${DIRTOP}/${DIRINC}/F77 -I${NROOTINC} ${SUBINC} -I${PAM_YODA}/include/yoda -I${PAM_INC}/
205  #  
206  #       create .o  # .so from .o fortran
207  #  ${LIBF77LIBS}: ${LIBF77OBJS}
208          @(${EGREEN} "Compiling file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET})          @(${EYELLOW} " F77 shared library --------------------------")
209          @${CXX} ${CXXFLAGS} -c ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.cpp -o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ -I${NROOTINC};          @(${EGREEN} "Creating library: "${WHITE} "$@"; ${RESET})
210  #  #       @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ $^ `cernlib mathlib` /usr/lib/libg2c.so.0
211  #       create .so  ##      @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c $^ `cernlib mathlib`
212  #          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c $^
213          @(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET})  
214          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${OTHERLIBS} ${FOBJS} 1>/dev/null  ${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS}
215          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))          @(${EYELLOW} " ROOT library ------------------------")
216            @(${EGREEN} "Creating file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp"; ${RESET})
217    #
218  ${CXXEXELIBS}: ${COBJS} ${FOBJS} ${CXXEXEOBJS}  #       Create *Dict.cpp and *Dict.h
219          @(${EVIOLET} "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *")  #
220          @(${EGREEN} "Creating exec file: "${WHITE} "$@"; ${RESET})          @${ROOTCINT} -f ${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp -c -I${DIRINC} -I${ROOTINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ ${DIRINC}/`basename $(@F) _${VER}.so | sed s/lib//`.h ${DIRINC}/`basename $(@F) _${VER}.so | sed s/lib//`LinkDef.h
221  #       @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRLIB}/$@.o -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ ${PAM_YODA}/lib/libyoda.so ${PAM_YODA}/lib/libutils.so ${FOBJS} ${COBJS} ${FULLLIBS} ${OTHERLIBS} -lThread `root-config --cflags --glibs` `cernlib mathlib` /usr/lib/libg2c.so.0;  #
222          @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRLIB}/$@.o -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ ${PAM_YODA}/lib/libyoda.so ${FOBJS} ${COBJS} ${FULLLIBS} ${OTHERLIBS} -lThread -lg2c `root-config --cflags --glibs` `cernlib mathlib`;  #       create .o
223    #
224            @(${EGREEN} "Compiling file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET})
225  # A small target to check environmental variables          @${CXX} ${CXXFLAGS} -c ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.cpp  -o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o -I${DIRTOP}/${DIRINC} -I${DIRTOP} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ -I${NROOTINC};
226  %_env:          @(${EGREEN} "Compiling file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp"; ${RESET})
227          @${test_env}          @${CXX} ${CXXFLAGS} -c ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp -o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_INC} -I${PAM_YODA}/include/yoda/ -I${NROOTINC};
228            @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))
229  .PHONY: install installdoc installlib installmacros installinc installexe installcmacro  #
230  .PHONY: clean depclean info mkbindir mklibdir testcern testpamenv test  #       create .so
231    #
232  mkbindir: ${DIRBIN}          @(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET})
233  ${DIRBIN}:  ##      @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda -I${PAM_INC} ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o ${LIBROOTOBJS} `cernlib mathlib` 1>/dev/null        
234          @${test_and_mk}          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda -I${PAM_INC} ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o ${LIBROOTOBJS} 1>/dev/null  
235    #       ${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ ${SUBINC} ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o 1>/dev/null
236  mklibdir: ${DIRLIB}          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))
237  ${DIRLIB}:          @(${EYELLOW} " -------------------------------------")
238          @${test_and_mk}  
239    ${LIBCPPLIBS}: ${LIBCPPSRCS}
240  # Here what has to be deleted in clean target  #
241  clean: TOBEDEL= ${DIRSRC}/*.o ${DIRSRC}/*Dict.cpp ${DIRSRC}/*Dict.h ${FOBJS} ${FULLLIBS} ${DIRBIN}/${CXXEXELIBS} ${COBJS} ${CXXEXEOBJS} ${DIRSRC}/TrkVerl2.cpp  #       create .o
242  clean:  #
243          @${test_and_rm}          @(${EGREEN} "Compiling file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET})
244            @${CXX} ${CXXFLAGS} -c ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.cpp -o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ -I${NROOTINC};
245  distclean: clean  #
246  distclean: TOBEDEL= ${DIRBIN} ${DIRLIB}  #       create .so
247  distclean:  #
248          @${test_and_rm}          @(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET})
249            @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${OTHERLIBS} ${FOBJS} 1>/dev/null
250  forceinstall: FORCE=-f          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))
251  forceinstall: install  
252    
253  upgrade: FORCE=-u  ${CXXEXELIBS}: ${COBJS} ${FOBJS} ${CXXEXEOBJS}
254  upgrade: install          @(${EVIOLET} "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *")
255  upgradestandalone: FORCE=-u          @(${EGREEN} "Creating exec file: "${WHITE} "$@"; ${RESET})
256  upgradestandalone: installstandalone  #       @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRLIB}/$@.o -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ ${PAM_YODA}/lib/libyoda.so ${PAM_YODA}/lib/libutils.so ${FOBJS} ${COBJS} ${FULLLIBS} ${OTHERLIBS} -lThread `root-config --cflags --glibs` `cernlib mathlib` /usr/lib/libg2c.so.0;
257            @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRLIB}/$@.o -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ ${PAM_YODA}/lib/libyoda.so ${FOBJS} ${COBJS} ${FULLLIBS} ${OTHERLIBS} -lThread -lg2c `root-config --cflags --glibs` `cernlib_noshift mathlib`;
258  install: installlib installinc installmacros installcalib installdoc installcmacro  
259  installstandalone: install installexe  
260    # A small target to check environmental variables
261  installlib: LINK=y  %_env:
262  installlib: TOBEMOVED= $(FULLLIBS:${DIRLIB}%=${PAM_LIB}%)          @${test_env}
263  installlib: ORIGIN=${DIRLIB}  
264  installlib:  .PHONY: install installdoc installlib installmacros installinc installexe installcmacro
265          @${test_and_cp}  .PHONY: clean depclean info mkbindir mklibdir testcern testpamenv test
266    
267  installcmacro: LINK=y  mkbindir: ${DIRBIN}
268  installcmacro: TOBEMOVED= $(FULLMACROCLIBS:${DIRLIB}%=${PAM_LIB}%)  ${DIRBIN}:
269  installcmacro: ORIGIN=${DIRLIB}          @${test_and_mk}
270  installcmacro:  
271          @${test_and_cp}  mklibdir: ${DIRLIB}
272    ${DIRLIB}:
273  installinc: TOBEMOVED= $(INCSRCS:${DIRINC}/%=${PAM_INC}/%)          @${test_and_mk}
274  installinc: ORIGIN=${DIRINC}  
275  installinc:  # Here what has to be deleted in clean target
276          @${test_and_cp}  clean: TOBEDEL= ${DIRSRC}/*.o ${DIRSRC}/*Dict.cpp ${DIRSRC}/*Dict.h ${FOBJS} ${FULLLIBS} ${DIRBIN}/${CXXEXELIBS} ${COBJS} ${CXXEXEOBJS} ${DIRSRC}/TrkVerl2.cpp
277    clean:
278  installexe: TOBEMOVED= $(EXESRCS:${DIRBIN}/%=${PAM_BIN}/%)          @${test_and_rm}
279  installexe: ORIGIN=${DIRBIN}  
280  installexe:  distclean: clean
281          @${test_and_cp}  distclean: TOBEDEL= ${DIRBIN} ${DIRLIB}
282    distclean:
283  installmacros: TOBEMOVED= $(MACROSSRCS:${DIRMACROS}/%=${PAM_MACROS}/%)          @${test_and_rm}
284  installmacros: ORIGIN=${DIRMACROS}  
285  installmacros:  forceinstall: FORCE=-f
286          @${test_and_cp}  forceinstall: install
287    
288  installcalib: TOBEMOVED= $(CALIBFILES:${DIRCALIB}/%=${PAM_CALIB}/%)  upgrade: FORCE=-u
289  installcalib: ORIGIN=${DIRCALIB}  upgrade: install
290  installcalib:  upgradestandalone: FORCE=-u
291          @${test_and_cp}  upgradestandalone: installstandalone
292    
293  installdoc: TOBEMOVED= $(DOCFILES:${DIRDOC}/%=${PAM_DOC}/%)  install: installlib installinc installmacros installcalib installdoc installcmacro
294  installdoc: ORIGIN=${DIRDOC}  installstandalone: install installexe
295  installdoc:  
296          @${test_and_cp}  installlib: LINK=y
297    installlib: TOBEMOVED= $(FULLLIBS:${DIRLIB}%=${PAM_LIB}%)
298  mkverpath:  installlib: ORIGIN=${DIRLIB}
299  #       @echo '#include <TSystem.h>' >  ${DIRTOP}/${DIRSRC}/TrkVerl2.cpp; echo ' void info(){ printf("\nTracker Level2 flight package version: ${VER}\n\nCompiled on '${TODAY}' with: '${GCCVER}'\n\nOn: '${UNAMEA}'\n\n"); }' >>  ${DIRTOP}/${DIRSRC}/TrkVerl2.cpp  installlib:
300          @echo '#include <TSystem.h>' >  ${DIRTOP}/${DIRSRC}/TrkVerl2.cpp; echo ' char *TrkInfo(bool print){ if ( print ) printf("\nTracker Level2 flight package version: ${VER}\n\nCompiled on '${TODAY}' with: '${GCCVER}'\n\nOn: '${UNAMEA}'\n\n"); return("${VER}"); }' >>  ${DIRTOP}/${DIRSRC}/TrkVerl2.cpp          @${test_and_cp}
301          @sleep 0.8  
302    installcmacro: LINK=y
303    installcmacro: TOBEMOVED= $(FULLMACROCLIBS:${DIRLIB}%=${PAM_LIB}%)
304    installcmacro: ORIGIN=${DIRLIB}
305  info:  installcmacro:
306          @echo " "          @${test_and_cp}
307          @${EGREEN} "Infos for package :" ${WHITE} ${PACKAGE}  
308          @${EGREEN} "          VERSION :" ${WHITE} ${VER}  installinc: TOBEMOVED= $(INCSRCS:${DIRINC}/%=${PAM_INC}/%)
309          @${EGREEN} "      EXECUTABLES :" ${WHITE} ${EXECUTABLES}  installinc: ORIGIN=${DIRINC}
310          @${EGREEN} "         INCLUDES :" ${WHITE} ${INCLUDE}  installinc:
311          @${EGREEN} "             LIBS :" ${WHITE} ${LIBS}          @${test_and_cp}
312          @${EGREEN} "             DOCS :" ${WHITE} ${DOCS}  
313          @${EGREEN} "             SRCS :" ${WHITE} ${SRCS}  installexe: TOBEMOVED= $(EXESRCS:${DIRBIN}/%=${PAM_BIN}/%)
314          @${EGREEN} "           MACROS :" ${WHITE} ${MACROS}  installexe: ORIGIN=${DIRBIN}
315          @echo " "  installexe:
316          @${RESET}          @${test_and_cp}
317    
318  test: testpamenv  installmacros: TOBEMOVED= $(MACROSSRCS:${DIRMACROS}/%=${PAM_MACROS}/%)
319    installmacros: ORIGIN=${DIRMACROS}
320  testpamenv: ${PAM_ENV}  installmacros:
321            @${test_and_cp}
322  root-config: OPT=--cflags  
323  root-config:  installcalib: TOBEMOVED= $(CALIBFILES:${DIRCALIB}/%=${PAM_CALIB}/%)
324          @${test_cmd}  installcalib: ORIGIN=${DIRCALIB}
325    installcalib:
326  # Here follows some usefull macros          @${test_and_cp}
327  define  test_and_cp  
328  wd=`pwd`;\  installdoc: TOBEMOVED= $(DOCFILES:${DIRDOC}/%=${PAM_DOC}/%)
329  for i in ${TOBEMOVED} ; do \  installdoc: ORIGIN=${DIRDOC}
330  wv=$${i##/*/}; \  installdoc:
331  dest=$${i/$${wv}/}; \          @${test_and_cp}
332  ${EGREEN} "Testing for :" ${WHITE} "$${i}" ; ${RESET}; \  
333  if [ ! "${FORCE}" ] ; then \  mkverpath:
334   if [ ! -f $${i} ]; then  \  #       @echo '#include <TSystem.h>' >  ${DIRTOP}/${DIRSRC}/TrkVerl2.cpp; echo ' void info(){ printf("\nTracker Level2 flight package version: ${VER}\n\nCompiled on '${TODAY}' with: '${GCCVER}'\n\nOn: '${UNAMEA}'\n\n"); }' >>  ${DIRTOP}/${DIRSRC}/TrkVerl2.cpp
335    ${EGREEN} "Copying : "${WHITE} ${ORIGIN}/$${i##/*/} ;\          @echo '#include <TSystem.h>' >  ${DIRTOP}/${DIRSRC}/TrkVerl2.cpp; echo ' char *TrkInfo(bool print){ if ( print ) printf("\nTracker Level2 flight package version: ${VER}\n\nCompiled on '${TODAY}' with: '${GCCVER}'\n\nOn: '${UNAMEA}'\n\n"); return("${VER}"); }' >>  ${DIRTOP}/${DIRSRC}/TrkVerl2.cpp
336    ${EGREEN} "      to: "${WHITE} $${i} ; ${RESET}; \          @sleep 0.8
337    cp ${ORIGIN}/$${i##/*/} $${i}; \  
338   else \  
339     ${ERED} "File already exist !!!! Please delete it " ${WHITE}; ${RESET}; \  
340   fi;\  info:
341  else \          @echo " "
342     if [ "${FORCE}" == "-u" ] ; then \          @${EGREEN} "Infos for package :" ${WHITE} ${PACKAGE}
343       if [ "`basename $${i}`" != "`basename $${i} _${VER}.so`" ]; then \          @${EGREEN} "          VERSION :" ${WHITE} ${VER}
344         ${EYELLOW} "Removing: "${WHITE} ${PAM_LIB}/`basename $${i} _${VER}.so`_v*r*.so; ${RESET}; \          @${EGREEN} "      EXECUTABLES :" ${WHITE} ${EXECUTABLES}
345         rm -f ${PAM_LIB}/`basename $${i} _${VER}.so`_v*r*.so ; \          @${EGREEN} "         INCLUDES :" ${WHITE} ${INCLUDE}
346         ${EGREEN} "Copying : "${WHITE} ${ORIGIN}/$${i##/*/} ;\          @${EGREEN} "             LIBS :" ${WHITE} ${LIBS}
347         ${EGREEN} "      to: "${WHITE} $${i} ; ${RESET}; \          @${EGREEN} "             DOCS :" ${WHITE} ${DOCS}
348         cp ${ORIGIN}/$${i##/*/} $${i}; \          @${EGREEN} "             SRCS :" ${WHITE} ${SRCS}
349       else \          @${EGREEN} "           MACROS :" ${WHITE} ${MACROS}
350         ${EYELLOW} " Forcing copy: "${WHITE} ${ORIGIN}/$${i##/*/} ;\          @echo " "
351         ${EYELLOW} "          to: "${WHITE} $${i} ; ${RESET}; \          @${RESET}
352         cp -f ${ORIGIN}/$${i##/*/} $${i}; \  
353       fi; \  test: testpamenv
354     else \  
355       ${EYELLOW} " Forcing copy: "${WHITE} ${ORIGIN}/$${i##/*/} ;\  testpamenv: ${PAM_ENV}
356       ${EYELLOW} "          to: "${WHITE} $${i} ; ${RESET}; \  
357       cp ${FORCE} ${ORIGIN}/$${i##/*/} $${i}; \  root-config: OPT=--cflags
358     fi;\  root-config:
359  fi ;\          @${test_cmd}
360  if [ ! -z ${LINK} ] ; then \  
361    ${EGREEN} "Creating symlink from : "${WHITE} $${wv/_${VER}/} ;\  # Here follows some usefull macros
362    ${EGREEN} "                   to : "${WHITE} $${i##/*/} ; ${RESET}; \  define  test_and_cp
363    cd $${dest}; \  wd=`pwd`;\
364    ln -sf $${wv} $${wv/_${VER}/}; \  for i in ${TOBEMOVED} ; do \
365    cd $${wd}; \  wv=$${i##/*/}; \
366  fi \  dest=$${i/$${wv}/}; \
367  done  ${EGREEN} "Testing for :" ${WHITE} "$${i}" ; ${RESET}; \
368  endef  if [ ! "${FORCE}" ] ; then \
369     if [ ! -f $${i} ]; then  \
370  define  test_and_mk    ${EGREEN} "Copying : "${WHITE} ${ORIGIN}/$${i##/*/} ;\
371  ${EGREEN} "Testing for :" ${WHITE} "$@"; ${RESET}    ${EGREEN} "      to: "${WHITE} $${i} ; ${RESET}; \
372  test -d "$@" || \    cp ${ORIGIN}/$${i##/*/} $${i}; \
373  (${EGREEN} "Creating : "${WHITE} "$@"; ${RESET}; mkdir -p $@)   else \
374  endef     ${ERED} "File already exist !!!! Please delete it " ${WHITE}; ${RESET}; \
375     fi;\
376  define  test_env  else \
377  ${EGREEN} "Testing for env:" ${WHITE} $(patsubst %_env,%,$@); ${RESET}     if [ "${FORCE}" == "-u" ] ; then \
378  printenv $(patsubst %_env,%,$@) 1>/dev/null || \       if [ "`basename $${i}`" != "`basename $${i} _${VER}.so`" ]; then \
379  (${ERED} "ERROR, variable : "${WHITE} $(patsubst %_env,%,$@) \         ${EYELLOW} "Removing: "${WHITE} ${PAM_LIB}/`basename $${i} _${VER}.so`_v*r*.so; ${RESET}; \
380  ${RED} "not defined !!! Check your env. settings"; \         rm -f ${PAM_LIB}/`basename $${i} _${VER}.so`_v*r*.so ; \
381  ${RESET}; exit 1)         ${EGREEN} "Copying : "${WHITE} ${ORIGIN}/$${i##/*/} ;\
382  ${EGREEN} " Defined:" ${WHITE} $${$(patsubst %_env,%,$@)}; ${RESET}         ${EGREEN} "      to: "${WHITE} $${i} ; ${RESET}; \
383  endef         cp ${ORIGIN}/$${i##/*/} $${i}; \
384         else \
385  define  test_cmd         ${EYELLOW} " Forcing copy: "${WHITE} ${ORIGIN}/$${i##/*/} ;\
386  ${EGREEN} "Testing for cmd:" ${WHITE} $@ ${OPT}; ${RESET}         ${EYELLOW} "          to: "${WHITE} $${i} ; ${RESET}; \
387  $@ ${OPT} 1>/dev/null 2>&1 || \         cp -f ${ORIGIN}/$${i##/*/} $${i}; \
388  (${ERED} "ERROR, command : "${WHITE} $@ ${OPT}\       fi; \
389  ${RED} "not found !!! Check your installation"; \     else \
390  ${RESET}; exit 1)       ${EYELLOW} " Forcing copy: "${WHITE} ${ORIGIN}/$${i##/*/} ;\
391  ${EGREEN} " Present:" ${WHITE} $@ ${OPT}; ${RESET}       ${EYELLOW} "          to: "${WHITE} $${i} ; ${RESET}; \
392  endef       cp ${FORCE} ${ORIGIN}/$${i##/*/} $${i}; \
393       fi;\
394  define  test_and_rm  fi ;\
395  for i in ${TOBEDEL}; do \  if [ ! -z ${LINK} ] ; then \
396  test -d $${i} || (${ERED} "Removing file :"${WHITE} $${i}; ${RESET}; \    ${EGREEN} "Creating symlink from : "${WHITE} $${wv/_${VER}/} ;\
397  rm -f $${i} ); \    ${EGREEN} "                   to : "${WHITE} $${i##/*/} ; ${RESET}; \
398  test ! -d $${i} || (${ERED} "Removing dir :"${WHITE} $${i}; ${RESET}; \    cd $${dest}; \
399  rm -rf $${i} ); \    ln -sf $${wv} $${wv/_${VER}/}; \
400  done    cd $${wd}; \
401  endef  fi \
402    done
403    endef
404    
405    define  test_and_mk
406    ${EGREEN} "Testing for :" ${WHITE} "$@"; ${RESET}
407    test -d "$@" || \
408    (${EGREEN} "Creating : "${WHITE} "$@"; ${RESET}; mkdir -p $@)
409    endef
410    
411    define  test_env
412    ${EGREEN} "Testing for env:" ${WHITE} $(patsubst %_env,%,$@); ${RESET}
413    printenv $(patsubst %_env,%,$@) 1>/dev/null || \
414    (${ERED} "ERROR, variable : "${WHITE} $(patsubst %_env,%,$@) \
415    ${RED} "not defined !!! Check your env. settings"; \
416    ${RESET}; exit 1)
417    ${EGREEN} " Defined:" ${WHITE} $${$(patsubst %_env,%,$@)}; ${RESET}
418    endef
419    
420    define  test_cmd
421    ${EGREEN} "Testing for cmd:" ${WHITE} $@ ${OPT}; ${RESET}
422    $@ ${OPT} 1>/dev/null 2>&1 || \
423    (${ERED} "ERROR, command : "${WHITE} $@ ${OPT}\
424    ${RED} "not found !!! Check your installation"; \
425    ${RESET}; exit 1)
426    ${EGREEN} " Present:" ${WHITE} $@ ${OPT}; ${RESET}
427    endef
428    
429    define  test_and_rm
430    for i in ${TOBEDEL}; do \
431    test -d $${i} || (${ERED} "Removing file :"${WHITE} $${i}; ${RESET}; \
432    rm -f $${i} ); \
433    test ! -d $${i} || (${ERED} "Removing dir :"${WHITE} $${i}; ${RESET}; \
434    rm -rf $${i} ); \
435    done
436    endef

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.41

  ViewVC Help
Powered by ViewVC 1.1.23