OSDN Git Service

Modify Makefile for util/src
[eos/base.git] / Makefile
1 SHELL=/bin/bash
2
3 EOS_GIT_BACKUPSITE=/net/fs08/fs08/DataBase/EosBackup.git
4 EOS_GIT_REPOSITRY= git.osdn.jp:/gitroot/eos/base.git 
5 EOS_GIT_REPOSITRY_NOUSER=git://git.osdn.jp/gitroot/eos/base.git
6 EOS_GIT_REPOSITRY_OPTIONAL= git.osdn.jp:/gitroot/eos/optional.git 
7 EOS_GIT_REPOSITRY_OPTIONAL_NOUSER=git://git.osdn.jp/gitroot/eos/optional.git
8 EOS_GIT_REPOSITRY_TUTORIAL= git.osdn.jp:/gitroot/eos/tutorial.git 
9 EOS_GIT_REPOSITRY_TUTORIAL_NOUSER=git://git.osdn.jp/gitroot/eos/tutorial.git
10 EOS_GIT_REPOSITRY_DATA= git.osdn.jp:/gitroot/eos/data.git 
11 EOS_GIT_REPOSITRY_DATA_NOUSER=git://git.osdn.jp/gitroot/eos/data.git
12 EOS_GIT_REPOSITRY_OTHERS= git.osdn.jp:/gitroot/eos/others.git 
13 EOS_GIT_REPOSITRY_OTHERS_NOUSER=git://git.osdn.jp/gitroot/eos/others.git
14
15
16 EOS_GIT_REPOSITRY_HOSTDEPEND=git.osdn.jp:/gitroot/eos/hostdepend
17 EOS_GIT_REPOSITRY_HOSTDEPEND_NOUSER=git://git.osdn.jp/gitroot/eos/hostdepend
18
19 EOS_GIT_REPOSITRY_ZEPHYR= git.osdn.jp:/gitroot/eos/zephyr.git 
20 EOS_GIT_REPOSITRY_ZEPHYR_NOUSER=git://git.osdn.jp/gitroot/eos/zephyr.git
21
22 EOS_GIT_REPOSITRY_PIONE=https://github.com/pione/pione.git
23 EOS_GIT_REPOSITRY_PIONE_NOUSER=https://github.com/pione/pione.git
24
25 help::
26         @echo ">> Help"
27         @echo ">>>> Download"
28         @echo "---- To register new/Modified source codes. ----"
29         @echo " $$ make git-add         or git-add[-all|-data|-tutorial|-optional|-others|-others2]" 
30         @echo " $$ make git-commit      or git-commit[-all|-data|-tutorial|-optional|-others|-others2]" 
31         @echo " $$ make git-tag         or git-tag[-all|-data|-tutorial|-optional|-others|-others2]" 
32         @echo " $$ make git-push        or git-push[-all|-data|-tutorial|-optional|-others]" 
33         @echo ""
34         @echo "---- To fetch and merge new/modified source codes. ----" 
35         @echo " $$ make git-fetch       or git-fetch[-all|-data|-tutorial|-optional|-others]" 
36         @echo " $$ make git-merge       or git-merge[-all|-data|-tutorial|-optional|-others]" 
37         @echo " $$ make setting"
38         @echo "---- To init git repository ----"
39         @echo " $$ make git-init        or git-init[-all|-zephyr|-data|-tutorial|-optional|-others]" 
40         @echo "---- To clonse git repository ----"
41         @echo " $$ make git-clone or git-clone[-all|-zephyr|-data|-tutorial|-optional|-others]" 
42         @echo "---- option ----"
43         @echo "     [] : base only"
44         @echo "     [-zephyr]   : zephyr (for GUI/browser)"
45         @echo "     [-pione]    : pione  (for process control with GUI/browser)"
46         @echo "     [-data]     : data (for test)"
47         @echo "     [-tutorial] : tutorial"
48         @echo "     [-optional] : optional(for documents)"
49         @echo "     [-others] : other source codes for utils"
50         @echo "     [-others2] : other source codes for utils"
51         @echo "     [-all] : all"
52         @echo ""
53         @echo ">>>> Setting"
54         @echo "---- To set Eos ----"
55         @echo " $$ make setting ; # Create links."
56         @echo " $$ make install ; # No clean, just install."
57         @echo " $$ make rebuild ; # Clean and install."
58         @echo " $$ make rebuild-all ; # Update(prototype), clean and install."
59         @echo ""
60         @echo ">>>> Rebuild"
61         @echo "---- To rebuild source codes of Eos ----"
62         @echo " $$ make rebuild"
63         @echo "---- To update prototype source codes and rebuild source codes of Eos ----"
64         @echo " $$ make rebuild-all"
65         @echo "---- To set Eos ----"
66         @echo " $$ make setting"
67         @echo ""
68         @echo ">>>> Setting for Eos utils using other softwares "
69         @echo "---- To set Eos ----"
70         @echo " $$ cd util; make setting"
71         @echo " $$ cd util; make rebuild"
72
73
74
75 rebuild-all: rebuild-src rebuild-Objects rebuild-all-Tools
76 rebuild: rebuild-src rebuild-Objects rebuild-Tools
77 install: 
78         make install-src 
79         make install-Objects 
80         make install-Tools
81
82 rebuild-src:
83         echo "rebuild-src"
84         cd src; rm -f Makefile; cp -f Config/Template/Makefile Makefile 
85         cd src; rm -f Objects/Makefile; cp -f Config/Template/ObjectsHomeTemplate.Dir/Makefile Objects/Makefile; \
86                 rm -f Objects/Config/Target.inc; cp -f Config/Template/ObjectsHomeTemplate.Dir/Config/Target.inc Objects/Config/Target.inc ;  \
87                 rm -f Objects/Config/Define.inc; sed -e s/worldname/Objects/ Config/Template/ObjectsHomeTemplate.Dir/Config/Define.inc > Objects/Config/Define.inc 
88         cd src; rm -f Tools/Makefile; cp -f Config/Template/ToolsHomeTemplate.Dir/Makefile Tools/Makefile; \
89                 rm -f Tools/Config/Target.inc ; cp -f Config/Template/ToolsHomeTemplate.Dir/Config/Target.inc Tools/Config/Target.inc ; \
90                 rm -f Tools/Config/Define.inc ; sed  -e s/worldname/Tools/ Config/Template/ToolsHomeTemplate.Dir/Config/Define.inc > Tools/Config/Define.inc 
91
92 rebuild-Objects:
93         cd src/Objects;  make clean; make check; make depend; make ; make install
94
95 rebuild-Tools:
96         cd src/Tools;    make clean; make check; make depend; make ; make install
97
98 rebuild-all-Tools:
99         cd src/Tools;    make clean; make update; make check; make depend; make ; make install
100
101 install-src:
102         @echo "install-src"
103         cd src; rm -f Objects/Makefile; cp -f Config/Template/ObjectsHomeTemplate.Dir/Makefile Objects/Makefile
104         cd src; rm -f Tools/Makefile; cp -f Config/Template/ToolsHomeTemplate.Dir/Makefile Tools/Makefile
105
106 install-Objects:
107         @echo "install-Objects"
108         cd src/Objects;  make check; make depend; make ; make install
109
110 install-Tools:
111         @echo "install-Tools"
112         cd src/Tools;    make check; make depend; make ; make install
113
114 setting:relink
115         if [ ! -d hostdepend ] ; then \
116                 mkdir hostdepend; \
117         fi
118
119 relink:
120         rm doc; ln -sf optional/doc .
121         rm objects;  ln -sf optional/objects .
122         rm example; ln -sf data/SampleData example
123
124 #
125 # Add
126 #
127
128 git-add-all:: git-add git-add-data git-add-optional git-add-tutorial git-add-others
129
130 git-add:: git-add-hostdepend
131         @echo "base directory"
132         @git add -v --all . || echo "No files to be added"
133
134 git-add-hostdepend::
135         @echo "hostdepend directory"
136         @cd hostdepend/$${EOS_HOSTDIR}/ ; FLAG=N; \
137         for name in `git remote`; do if [ $$name = hostdepend$${EOS_HOSTDIR} ] ; then FLAG=Y; fi; done; \
138         if [ $$FLAG = 'N' ] ; then \
139         git remote add hostdepend$${EOS_HOSTDIR} $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_HOSTDEPEND)$${EOS_HOSTDIR}.git || echo "Already exist"; \
140         fi 
141         @cd hostdepend/$${EOS_HOSTDIR}/ ; FLAG=N; \
142         for name in `git remote`; do if [ $$name = origin ] ; then FLAG=Y; fi; done; \
143         if [ $$FLAG = 'N' ] ; then \
144         git remote add origin $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_HOSTDEPEND)$${EOS_HOSTDIR}.git || echo "Already exist"; \
145         elif [ ! -z $${EOS_GITUSER} ] ; then \
146         git remote remove origin || echo "No exist"; \
147         git remote add origin $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_HOSTDEPEND)$${EOS_HOSTDIR}.git || echo "Already exist"; \
148         fi 
149         @cd hostdepend/$${EOS_HOSTDIR}/ ; git add -v --all . || echo "No files to be added\n" 
150
151 git-add-optional::
152         cd optional; git add -v --all . 
153
154 git-add-data::
155         cd data; git add -v --all . 
156
157 git-add-tutorial::
158         cd tutorial; git add -v --all . 
159
160 git-add-others::
161         cd others; git add -v --all . 
162
163 git-add-others2::
164         cd others2; git add --all . 
165
166 #
167 # Commit
168 #
169
170 git-commit-all:: git-commit git-commit-data git-commit-optional git-commit-tutorial git-commit-others
171
172 git-commit:: git-commit-hostdepend
173         @git commit || echo "Already commited" 
174
175 git-commit-hostdepend::
176         @cd hostdepend/$${EOS_HOSTDIR}/ ; git commit || echo "Already commited"  
177
178 git-commit-optional::
179         cd optional; git commit  
180
181 git-commit-data::
182         cd data; git commit 
183
184 git-commit-tutorial::
185         cd tutorial; git commit 
186
187 git-commit-others::
188         cd others; git commit 
189
190 git-commit-others2::
191         cd others2; git commit 
192
193 git-backup::
194         git push $(EOS_GIT_BACKUPSITE) master  --tags
195
196 #
197 # tag
198 #
199
200 git-tag::
201         @export DIRECTORYNAME=./; \
202         make git-tag-common;
203
204 git-tag-optional::
205         @export DIRECTORYNAME=optional; \
206         make git-tag-common;
207
208 git-tag-data::
209         @export DIRECTORYNAME=data; \
210         make git-tag-common;
211
212 git-tag-tutorial::
213         @export DIRECTORYNAME=tutorial; \
214         make git-tag-common;
215
216 git-tag-others::
217         @export DIRECTORYNAME=others; \
218         make git-tag-common;
219
220 git-tag-common::
221         @if [ ! -z "$$DIRECTORYNAME" ]; then \
222                 cd $$DIRECTORYNAME; \
223                 echo; \
224                 git tag | sort -k 2,2 -n -t p ; \
225                 echo -n "Version No. (e.g. vXX.YY.ZZpSSSS) : "; \
226                 read TTT; \
227                 if [ ! -z "$$TTT" ]; then \
228                         git tag $$TTT; \
229                 else \
230                         echo "Incorrect."; \
231                 fi; \
232         fi;
233
234 #
235 # push
236
237
238 git-push-all:: git-push git-push-data git-push-optional git-push-tutorial git-push-others
239
240 git-push::git-push-hostdepend
241 #       git push origin master  --tags
242         @echo "base"
243         @export DIRECTORYNAME=./; \
244         export ORIGINNAME=origin; \
245         make git-push-with-check;
246
247 git-push-hostdepend::
248         @#git subtree push --prefix=hostdepend/$${EOS_HOSTDIR}/ --squash hostdepend$${EOS_HOSTDIR} master 
249         @echo "hostdepend"
250         @#cd hostdepend/$${EOS_HOSTDIR}/;  git push hostdepend$${EOS_HOSTDIR} master 
251         @cd hostdepend/$${EOS_HOSTDIR}/;  git push || git push --set-upstream origin master || git push hostdepend$${EOS_HOSTDIR} master 
252
253 git-push-optional::
254 #       cd optional; git push optional master --tags
255         @export DIRECTORYNAME=optional; \
256         export ORIGINNAME=optional; \
257         make git-push-with-check;
258
259 git-push-data::
260 #       cd data; git push data master --tags
261         @export DIRECTORYNAME=data; \
262         export ORIGINNAME=data; \
263         make git-push-with-check;
264
265 git-push-tutorial::
266 #       cd tutorial; git push tutorial master --tags
267         @export DIRECTORYNAME=tutorial; \
268         export ORIGINNAME=tutorial; \
269         make git-push-with-check;
270
271 git-push-others::
272 #       cd others; git push others master --tags
273         @export DIRECTORYNAME=others; \
274         export ORIGINNAME=others; \
275         make git-push-with-check;
276
277 git-push-with-check::
278         @if [ ! -z "$$DIRECTORYNAME" -a ! -z "$$ORIGINNAME" ]; then \
279                 cd $$DIRECTORYNAME; \
280                 echo; \
281                 SSS=`git tag | sort -k 2,2 -n -t p | tail -1`; \
282                 if [ ! -z "$$SSS" ]; then \
283                         echo "$$SSS is Current Tags in $$ORIGINNAME."; \
284                         echo -n "Was the current tag updated? [ Y|y | N|n ]: "; \
285                         read TTT; \
286                         if [ "$$TTT" = Y -o "$$TTT" = y ]; then \
287                                 git push $$ORIGINNAME master --tags; \
288                         else \
289                                 echo "not push."; \
290                         fi; \
291                 else \
292                         echo "Tags do not exist in $$ORIGINNAME."; \
293                         echo "Before push please add tag at current repositry."; \
294                 fi; \
295         fi;
296
297 #
298 # fetch
299 #
300 git-fetch-all:: git-fetch fit-fetch-zephyr git-fetch-data git-fetch-optional git-fetch-tutorial git-fetch-others
301
302 git-fetch::git-pull-hostdepend
303         @echo "fetch: base directory" 
304         @cd .       ; git fetch origin master --tags    ; git log -1 || echo "No files to be fetched"
305
306 git-pull-hostdepend::
307         @#git subtree pull --prefix=hostdepend/$${EOS_HOSTDIR}/ --squash hostdepend$${EOS_HOSTDIR} master 
308         @echo "pull: hostdepend directory"
309         @#cd hostdepend/$${EOS_HOSTDIR}/; git pull --unshallow hostdepend$${EOS_HOSTDIR} master || echo "No files to be fetched" 
310         @cd hostdepend/$${EOS_HOSTDIR}/; git pull hostdepend$${EOS_HOSTDIR} master || echo "No files to be fetched" 
311
312 git-fetch-zephyr::
313         cd zephyr; git fetch zephyr master --tags               ; git log -1
314
315 git-fetch-data::
316         cd data    ; git fetch data master --tags               ; git log -1
317
318 git-fetch-optional::
319         cd optional; git fetch optional master --tags   ; git log -1
320
321 git-fetch-tutorial::
322         cd tutorial; git fetch tutorial master --tags   ; git log -1
323
324 git-fetch-others::
325         cd others  ; git fetch others master --tags             ; git log -1
326
327 #
328 # merge
329 #
330 git-merge-all:: git-merge git-merge-zephyr git-merge-data git-merge-optional git-merge-tutorial git-merge-others
331
332 git-merge::
333         #cd .       ; git log -1; git merge FETCH_HEAD 
334         cd .       ; git log -1; git merge 
335
336 git-merge-zephyr::
337         #cd zephyr  ; git log -1; git merge FETCH_HEAD 
338         cd zephyr  ; git log -1; git merge 
339
340 git-merge-data::
341         #cd data    ; git log -1; git merge FETCH_HEAD 
342         cd data    ; git log -1; git merge 
343
344 git-merge-optional::
345         #cd optional; git log -1; git merge FETCH_HEAD
346         cd optional; git log -1; git merge 
347
348 git-merge-tutorial::
349         #cd tutorial; git log -1; git merge FETCH_HEAD 
350         cd tutorial; git log -1; git merge 
351
352 git-merge-others::
353         #cd others  ; git log -1; git merge FETCH_HEAD 
354         cd others  ; git log -1; git merge 
355
356 #
357 # Nickname 
358 #
359
360 # init
361 git-init-all:: git-init git-init-zephyr git-init-data git-init-optional git-init-tutorial git-init-others
362
363 git-init:: git-add-hostdepend
364         if [ ! -d .git ] ; then git init        ; fi
365         @export ORIGINNAME=origin; \
366         make git-remote-add;
367
368 git-init-data::
369         if [ ! -d data ] ; then mkdir data; fi
370         cd data; \
371         if [ ! -d .git ] ; then git init        ; fi ;
372         @export ORIGINNAME=data; \
373         make git-remote-add-data;
374
375 git-init-zephyr::
376         if [ ! -d zephyr ] ; then mkdir zephyr ; fi
377         cd zephyr; \
378         if [ ! -d .git ] ; then git init        ; fi ;
379         @export ORIGINNAME=zephyr; \
380         make git-remote-add-zephyr;
381
382 git-init-pione::
383         if [ ! -d pione ] ; then mkdir pione; fi
384         cd pione; \
385         if [ ! -d .git ] ; then git init        ; fi ;
386         @export ORIGINNAME=pione; \
387         make git-remote-add-pione;
388
389 git-init-optional::
390         if [ ! -d optional ] ; then mkdir optional; fi
391         if [ ! -L doc      ] ; then ln -sf optional/doc . ; fi
392         if [ ! -L objects  ] ; then ln -sf optional/objects . ; fi
393         cd optional; \
394         if [ ! -d .git ] ; then git init        ; fi ;
395         @export ORIGINNAME=optional; \
396         make git-remote-add-optional;
397
398 git-init-tutorial::
399         if [ ! -d tutorial ] ; then mkdir tutorial ; fi
400         cd tutorial; \
401         if [ ! -d .git ] ; then git init        ; fi ;
402         @export ORIGINNAME=tutorial; \
403         make git-remote-add-tutorial;
404
405 git-init-others::
406         if [ ! -d others ] ; then mkdir others; fi
407         cd others ; \
408         if [ ! -d .git ] ; then git init        ; fi ;
409         @export ORIGINNAME=others; \
410         make git-remote-add-others;
411
412 git-init-others2::
413         if [ ! -d others2 ] ; then mkdir others2; fi
414         cd others2 ; git remote add others2 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_OTHERS)
415
416 # clone
417
418 git-clone-all:: git-clone
419         @if [ ! -z "$${EOS_HOME}" -a -d "$${EOS_HOME}" ] ; then \
420                 cd $${EOS_HOME} ; \
421                 make git-clone-data git-clone-optional git-clone-tutorial git-clone-others; \
422         fi;
423
424 git-clone::
425         @if [ ! -z "$${EOS_HOME}" -a -d "$${EOS_HOME}" ] ; then \
426                 TMPDIRECTORY=$$(pwd) ; \
427                 cd $${EOS_HOME} ; \
428                 if [ ! -d  .git ] ; \
429                 then \
430                         if [ -z $${EOS_GITUSER} ] ; then \
431                                 git clone --depth 1 $(EOS_GIT_REPOSITRY_NOUSER) ./ ; \
432                         else \
433                                 git clone --depth 1 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY) ./ ; \
434                         fi ; \
435                         cd $${TMPDIRECTORY}; \
436                         export ORIGINNAME=origin; \
437                         make git-remote-add; \
438                 fi; \
439         fi;
440
441 git-clone-zephyr::
442         if [ ! -d zephyr] ; then mkdir zephyr; fi
443         @cd zephyr;  if [ ! -d .git ] ; \
444         then \
445                 if [ -z $${EOS_GITUSER} ] ; then \
446                         git clone --depth 1 $(EOS_GIT_REPOSITRY_ZEPHYR_NOUSER) ./ ; \
447                 else \
448                         git clone --depth 1 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_ZEPHYR) ./; \
449                 fi ; \
450                 cd ../ ; \
451                 export ORIGINNAME=zephyr; \
452                 make git-remote-add-zephyr; \
453         fi
454
455 git-clone-data::
456         if [ ! -d data ] ; then mkdir data; fi
457         @cd data;  if [ ! -d .git ] ; \
458         then \
459                 if [ -z $${EOS_GITUSER} ] ; then \
460                         git clone --depth 1 $(EOS_GIT_REPOSITRY_DATA_NOUSER) ./ ; \
461                 else \
462                         git clone --depth 1 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_DATA) ./; \
463                 fi ; \
464                 cd ../ ; \
465                 export ORIGINNAME=data; \
466                 make git-remote-add-data; \
467         fi
468
469 git-clone-optional::
470         if [ ! -d optional ] ; then mkdir optional; fi
471         if [ ! -L doc      ] ; then ln -sf optional/doc . ; fi
472         if [ ! -L objects  ] ; then ln -sf optional/objects . ; fi
473         @cd optional; if [ ! -d .git ] ; \
474         then \
475                 if [ -z $${EOS_GITUSER} ] ; then \
476                         git clone --depth 1 $(EOS_GIT_REPOSITRY_OPTIONAL_NOUSER) ./ ; \
477                 else \
478                         git clone --depth 1 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_OPTIONAL) ./ ; \
479                 fi ; \
480                 cd ../ ; \
481                 export ORIGINNAME=optional; \
482                 make git-remote-add-optional; \
483         fi
484
485 git-clone-tutorial::
486         if [ ! -d tutorial ] ; then mkdir tutorial ; fi
487         @cd tutorial; if [ ! -d .git ] ; \
488         then \
489                 if [ -z $${EOS_GITUSER} ] ; then \
490                         git clone --depth 1 $(EOS_GIT_REPOSITRY_TUTORIAL_NOUSER) ./ ; \
491                 else \
492                         git clone --depth 1 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_TUTORIAL) ./ ; \
493                 fi; \
494                 cd ../ ; \
495                 export ORIGINNAME=tutorial; \
496                 make git-remote-add-tutorial; \
497         fi
498
499 git-clone-others::
500         if [ ! -d others ] ; then mkdir others; fi
501         @cd others ; if [ ! -d .git ] ; \
502         then \
503                 if [ -z $${EOS_GITUSER} ] ; then \
504                         git clone --depth 1 $(EOS_GIT_REPOSITRY_OTHERS_NOUSER) ./ ; \
505                 else \
506                         git clone --depth 1 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_OTHERS) ./ ; \
507                 fi; \
508                 cd ../ ; \
509                 export ORIGINNAME=others; \
510                 make git-remote-add-others; \
511         fi
512 #
513 # add
514 #
515 git-remote-add::
516         @if [ ! -z "$$ORIGINNAME" -a ! -z "$${EOS_HOME}" -a -d "$${EOS_HOME}"  ]; then \
517                 cd $${EOS_HOME}; \
518                 SSS=`git remote -v | awk '{print $$1}' | grep origin`; if [ ! -z "$$SSS" ] ; then git remote rm origin ; fi ; \
519                 if [ -z $${EOS_GITUSER} ] ; then \
520                         git remote add origin    $(EOS_GIT_REPOSITRY_NOUSER); \
521                 else \
522                         git remote add origin    $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY); \
523                 fi ; \
524         fi;
525
526 git-remote-add-zephyr::
527         @if [ ! -z "$$ORIGINNAME" ]; then \
528                 cd $$ORIGINNAME; \
529                 SSS=`git remote -v | awk '{print $$1}' | grep data`; if [ ! -z "$$SSS" ] ; then git remote rm zephyr; fi ; \
530                 if [ -z $${EOS_GITUSER} ] ; then \
531                         git remote add zephyr $(EOS_GIT_REPOSITRY_ZEPHYR_NOUSER); \
532                 else \
533                         git remote add zephyr $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_ZEPHYR); \
534                 fi ; \
535         fi;
536
537 git-remote-add-data::
538         @if [ ! -z "$$ORIGINNAME" ]; then \
539                 cd $$ORIGINNAME; \
540                 SSS=`git remote -v | awk '{print $$1}' | grep data`; if [ ! -z "$$SSS" ] ; then git remote rm data ; fi ; \
541                 if [ -z $${EOS_GITUSER} ] ; then \
542                         git remote add data    $(EOS_GIT_REPOSITRY_DATA_NOUSER); \
543                 else \
544                         git remote add data    $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_DATA); \
545                 fi ; \
546         fi;
547
548 git-remote-add-optional::
549         @if [ ! -z "$$ORIGINNAME" ]; then \
550                 cd $$ORIGINNAME; \
551                 SSS=`git remote -v | awk '{print $$1}' | grep optional`; if [ ! -z "$$SSS" ] ; then git remote rm optional ; fi ; \
552                 if [ -z $${EOS_GITUSER} ] ; then \
553                         git remote add optional    $(EOS_GIT_REPOSITRY_OPTIONAL_NOUSER); \
554                 else \
555                         git remote add optional    $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_OPTIONAL); \
556                 fi ; \
557         fi;
558
559 git-remote-add-tutorial::
560         @if [ ! -z "$$ORIGINNAME" ]; then \
561                 cd $$ORIGINNAME; \
562                 SSS=`git remote -v | awk '{print $$1}' | grep tutorial`; if [ ! -z "$$SSS" ] ; then git remote rm tutorial ; fi ; \
563                 if [ -z $${EOS_GITUSER} ] ; then \
564                         git remote add tutorial    $(EOS_GIT_REPOSITRY_TUTORIAL_NOUSER); \
565                 else \
566                         git remote add tutorial    $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_TUTORIAL); \
567                 fi ; \
568         fi;
569
570 git-remote-add-others::
571         @if [ ! -z "$$ORIGINNAME" ]; then \
572                 cd $$ORIGINNAME; \
573                 SSS=`git remote -v | awk '{print $$1}' | grep others`; if [ ! -z "$$SSS" ] ; then git remote rm others ; fi ; \
574                 if [ -z $${EOS_GITUSER} ] ; then \
575                         git remote add others    $(EOS_GIT_REPOSITRY_OTHERS_NOUSER); \
576                 else \
577                         git remote add others    $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_OTHERS); \
578                 fi ; \
579         fi;