-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
177 lines (144 loc) · 4.16 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
#d = ah09aProceedings
d1 = chep09geant4
d = $(d1)
#d1 = jpcsSample
# extended report
#d = ah08hCodeReport
%tex = pdflatex
tex = latex
pdfviewer = /home/aatos/Desktop/system/tools/acroread/opt/Adobe/Reader8/bin/./acroread
#pdfviewer = gv
#pdfviewer = firefox
dviviewer = xdvi -allowshell -geometry 700x900+750+100
all: paper
@echo :::document = $(d)
@echo :::preparing latex ...
@c; rm -f *.aux
ifdef AHSYSTEM
# rm -f refs.bib ; cp ../refs.bib . ; # use always the mother file for the bibliography
endif
@makeindex $(d).tex; $(tex) $(d); bibtex $(d); $(tex) $(d); $(tex) $(d); asy $(d); $(tex) $(d)
ifdef AHSYSTEM
$(dviviewer) $(d).dvi &
$(pdfviewer) $(d).pdf
endif
ca:
rm -f *.pdf *.ps *.out $(d)_*.eps $(d).asy
paper:
@echo :::CHEP09 TMVA paper = $(d1)
@rm -f *.aux
@$(tex) $(d1) && $(tex) $(d1)
# @bibtex $(d1)
# @$(tex) $(d1) && $(tex) $(d1)
@dvips -R0 $(d1).dvi -o $(d1).ps
@ps2pdf $(d1).ps
ifdef USEVIEWER
$(PDFVIEWER) $(d1).pdf
endif
files:
ls -latGg code/$(GI) > code/bertiniFiles.txt
ls -latGg code/$(GI) >> code/bertiniFiles.txt
gpin: # grep pi-N scattering
rm -f code/pin.grep;g
grep -nisr tetnew code/ > code/pin.grep;
grep -nisr phfun code/ >> code/pin.grep;
pdf:
@echo :: prepare ps and pdf from dvi
@dvips -R0 $(d).dvi -o $(d).ps
@ps2pdf $(d).ps
ifdef AHSYSTEM
$(pdfviewer) $(d).pdf &
endif
s:
@echo :::launching browser...
@konqueror -geometry 650x1600+950+0 $(d).dvi &
@echo :::done.
CODE = G4NucleiModel.cc
codetex: #prepare file to be included to latex
echo " \begin{verbatim} " > code/$(CODE).tex; \
cat code/$(CODE) >> code/$(CODE).tex; \
echo " \end{verbatim} " >> code/$(CODE).tex; \
ls -alt code
FIX = FIX080213
codefix: #prepare file to be included to latex
echo " \begin{verbatim} " > code/$(FIX)$(CODE).tex; \
grep -nisr $(FIX) code/$(CODE) >> code/$(FIX)$(CODE).tex; \
echo " \end{verbatim} " >> code/$(FIX)$(CODE).tex; \
ls -alt code
#-----------------SLIDE
slides:
$(tex) $(d).tex; $(tex) $(d).tex; $(pdfviewer) $(d).pdf &
SOURCEFILE = d
show:
$(pdfviewer) $(SOURCEFILE).pdf &
html: $(SOURCEFILE).pdf
pdftohtml $(SOURCEFILE).pdf
pdfs: $(SOURCEFILE).tex
$(PDFGENERATOR) $(SOURCEFILE)
$(PDFGENERATOR) $(SOURCEFILE)
dvi: $(SOURCEFILE).tex filter
$(DVIGENERATOR) $(SOURCEFILE)
$(DVIGENERATOR) $(SOURCEFILE)
$(DVIGENERATOR) $(FILTEREDFISRC)
$(DVIGENERATOR) $(FILTEREDFISRC)
ps: dvi
$(PSGENERATOR) $(SOURCEFILE).dvi -o $(SOURCEFILE).ps
$(PSGENERATOR) $(FILTEREDFISRC).dvi -o $(FILTEREDFISRC).ps
filter: $(FISOURCEFILE).tex
cat $(FISOURCEFILE).tex |sed "s/ä/\\\\\"a/g" | sed "s/Ä/\\\\\"A/g" | sed "s/ö/\\\\\"o/g" | sed "s/Ö/\\\\\"O/g" > $(FILTEREDFISRC).tex
#END SLIDE -----------------------
includes::
@for dir in HEPGeometry HEPRandom; do \
(cd $$dir && $(MAKE) $@); \
done
FIELD += 01 02 03 04
# Field
field:
@$(ECHO) Making Field Tests...
@for nn in $(FIELD); do \
(cd test7$$nn && $(MAKE)); \
done;:
SUBDIRS = N01 N02 N03 N04 N05 N06 N07
clean:
@for dir in $(SUBDIRS); do (cd $$dir; $(MAKE) clean); done
unique := $(shell echo $$$$)
libmap: liblist
@$(ECHO) "Libmap stage. Searching for GNUmakefiles and sorting ..."
@find . \
-name GNUmakefile -exec $(GREP) -l '^ *name *:=' {} \; \
| sort \
> /tmp/G4_all_lib_makefiles.$(unique);
ifneq (,$(findstring Linux-g++,$(G4SYSTEM)))
@rm -f $(G4TMPDIR)/G4run/G4RunManagerKernel.*
else
@cd $(G4INSTALL)/source/run; $(MAKE) G4FPE_DEBUG=1;
@if [ ! -d $(G4LIBDIR) ] ; then mkdir $(G4LIBDIR) ;fi
name := G4hepgeometry
ifndef G4INSTALL
G4INSTALL = ../../..
endif
glob global: banner kernel
ifdef G4LIB_USE_G3TOG4
@for dir in $(SUBDIR4); do (cd $$dir && $(MAKE)); done;:
endif
@$(MAKE) libmap
@$(ECHO) "Libraries installation completed !"; done
endif
addPK:
git remote add pekka git://github.com/kaitanie/chep09inclphyslist.git
getPK:
git fetch pekka
git merge pekka/master
gitClonePK:
git://github.com/kaitanie/chep09inclphyslist.git
gitClone:
git clone [email protected]:aatos/chep09inclphyslist.git
#git diff
#git status
#git commit -a -m 'comment' (add all changes)
#(modify)
#git diff
#git commit -a -m 'comment'
#gitk
#git push
#git revert HEAD (in case of bad commit this reverses it)