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

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

  ViewVC Help
Powered by ViewVC 1.1.23