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
16 EOS_GIT_REPOSITRY_HOSTDEPEND=git.osdn.jp:/gitroot/eos/hostdepend
17 EOS_GIT_REPOSITRY_HOSTDEPEND_NOUSER=git://git.osdn.jp/gitroot/eos/hostdepend
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
22 EOS_GIT_REPOSITRY_PIONE=https://github.com/pione/pione.git
23 EOS_GIT_REPOSITRY_PIONE_NOUSER=https://github.com/pione/pione.git
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]"
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"
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."
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"
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"
75 rebuild-all: rebuild-src rebuild-Objects rebuild-all-Tools
76 rebuild: rebuild-src rebuild-Objects rebuild-Tools
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
93 cd src/Objects; make clean; make check; make depend; make ; make install
96 cd src/Tools; make clean; make check; make depend; make ; make install
99 cd src/Tools; make clean; make update; make check; make depend; make ; make install
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
107 @echo "install-Objects"
108 cd src/Objects; make check; make depend; make ; make install
111 @echo "install-Tools"
112 cd src/Tools; make check; make depend; make ; make install
115 if [ ! -d hostdepend ] ; then \
120 rm doc; ln -sf optional/doc .
121 rm objects; ln -sf optional/objects .
122 rm example; ln -sf data/SampleData example
128 git-add-all:: git-add git-add-data git-add-optional git-add-tutorial git-add-others
130 git-add:: git-add-hostdepend
131 @echo "base directory"
132 @git add -v --all . || echo "No files to be added"
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"; \
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"; \
149 @cd hostdepend/$${EOS_HOSTDIR}/ ; git add -v --all . || echo "No files to be added\n"
152 cd optional; git add -v --all .
155 cd data; git add -v --all .
158 cd tutorial; git add -v --all .
161 cd others; git add -v --all .
164 cd others2; git add --all .
170 git-commit-all:: git-commit git-commit-data git-commit-optional git-commit-tutorial git-commit-others
172 git-commit:: git-commit-hostdepend
173 @git commit || echo "Already commited"
175 git-commit-hostdepend::
176 @cd hostdepend/$${EOS_HOSTDIR}/ ; git commit || echo "Already commited"
178 git-commit-optional::
179 cd optional; git commit
184 git-commit-tutorial::
185 cd tutorial; git commit
188 cd others; git commit
191 cd others2; git commit
194 git push $(EOS_GIT_BACKUPSITE) master --tags
201 @export DIRECTORYNAME=./; \
205 @export DIRECTORYNAME=optional; \
209 @export DIRECTORYNAME=data; \
213 @export DIRECTORYNAME=tutorial; \
217 @export DIRECTORYNAME=others; \
221 @if [ ! -z "$$DIRECTORYNAME" ]; then \
222 cd $$DIRECTORYNAME; \
224 git tag | sort -k 2,2 -n -t p ; \
225 echo -n "Version No. (e.g. vXX.YY.ZZpSSSS) : "; \
227 if [ ! -z "$$TTT" ]; then \
238 git-push-all:: git-push git-push-data git-push-optional git-push-tutorial git-push-others
240 git-push::git-push-hostdepend
241 # git push origin master --tags
243 @export DIRECTORYNAME=./; \
244 export ORIGINNAME=origin; \
245 make git-push-with-check;
247 git-push-hostdepend::
248 @#git subtree push --prefix=hostdepend/$${EOS_HOSTDIR}/ --squash hostdepend$${EOS_HOSTDIR} master
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
254 # cd optional; git push optional master --tags
255 @export DIRECTORYNAME=optional; \
256 export ORIGINNAME=optional; \
257 make git-push-with-check;
260 # cd data; git push data master --tags
261 @export DIRECTORYNAME=data; \
262 export ORIGINNAME=data; \
263 make git-push-with-check;
266 # cd tutorial; git push tutorial master --tags
267 @export DIRECTORYNAME=tutorial; \
268 export ORIGINNAME=tutorial; \
269 make git-push-with-check;
272 # cd others; git push others master --tags
273 @export DIRECTORYNAME=others; \
274 export ORIGINNAME=others; \
275 make git-push-with-check;
277 git-push-with-check::
278 @if [ ! -z "$$DIRECTORYNAME" -a ! -z "$$ORIGINNAME" ]; then \
279 cd $$DIRECTORYNAME; \
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 ]: "; \
286 if [ "$$TTT" = Y -o "$$TTT" = y ]; then \
287 git push $$ORIGINNAME master --tags; \
292 echo "Tags do not exist in $$ORIGINNAME."; \
293 echo "Before push please add tag at current repositry."; \
300 git-fetch-all:: git-fetch fit-fetch-zephyr git-fetch-data git-fetch-optional git-fetch-tutorial git-fetch-others
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"
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"
313 cd zephyr; git fetch zephyr master --tags ; git log -1
316 cd data ; git fetch data master --tags ; git log -1
319 cd optional; git fetch optional master --tags ; git log -1
322 cd tutorial; git fetch tutorial master --tags ; git log -1
325 cd others ; git fetch others master --tags ; git log -1
330 git-merge-all:: git-merge git-merge-zephyr git-merge-data git-merge-optional git-merge-tutorial git-merge-others
333 #cd . ; git log -1; git merge FETCH_HEAD
334 cd . ; git log -1; git merge
337 #cd zephyr ; git log -1; git merge FETCH_HEAD
338 cd zephyr ; git log -1; git merge
341 #cd data ; git log -1; git merge FETCH_HEAD
342 cd data ; git log -1; git merge
345 #cd optional; git log -1; git merge FETCH_HEAD
346 cd optional; git log -1; git merge
349 #cd tutorial; git log -1; git merge FETCH_HEAD
350 cd tutorial; git log -1; git merge
353 #cd others ; git log -1; git merge FETCH_HEAD
354 cd others ; git log -1; git merge
361 git-init-all:: git-init git-init-zephyr git-init-data git-init-optional git-init-tutorial git-init-others
363 git-init:: git-add-hostdepend
364 if [ ! -d .git ] ; then git init ; fi
365 @export ORIGINNAME=origin; \
369 if [ ! -d data ] ; then mkdir data; fi
371 if [ ! -d .git ] ; then git init ; fi ;
372 @export ORIGINNAME=data; \
373 make git-remote-add-data;
376 if [ ! -d zephyr ] ; then mkdir zephyr ; fi
378 if [ ! -d .git ] ; then git init ; fi ;
379 @export ORIGINNAME=zephyr; \
380 make git-remote-add-zephyr;
383 if [ ! -d pione ] ; then mkdir pione; fi
385 if [ ! -d .git ] ; then git init ; fi ;
386 @export ORIGINNAME=pione; \
387 make git-remote-add-pione;
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
394 if [ ! -d .git ] ; then git init ; fi ;
395 @export ORIGINNAME=optional; \
396 make git-remote-add-optional;
399 if [ ! -d tutorial ] ; then mkdir tutorial ; fi
401 if [ ! -d .git ] ; then git init ; fi ;
402 @export ORIGINNAME=tutorial; \
403 make git-remote-add-tutorial;
406 if [ ! -d others ] ; then mkdir others; fi
408 if [ ! -d .git ] ; then git init ; fi ;
409 @export ORIGINNAME=others; \
410 make git-remote-add-others;
413 if [ ! -d others2 ] ; then mkdir others2; fi
414 cd others2 ; git remote add others2 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_OTHERS)
418 git-clone-all:: git-clone
419 @if [ ! -z "$${EOS_HOME}" -a -d "$${EOS_HOME}" ] ; then \
421 make git-clone-data git-clone-optional git-clone-tutorial git-clone-others; \
425 @if [ ! -z "$${EOS_HOME}" -a -d "$${EOS_HOME}" ] ; then \
426 TMPDIRECTORY=$$(pwd) ; \
430 if [ -z $${EOS_GITUSER} ] ; then \
431 git clone --depth 1 $(EOS_GIT_REPOSITRY_NOUSER) ./ ; \
433 git clone --depth 1 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY) ./ ; \
435 cd $${TMPDIRECTORY}; \
436 export ORIGINNAME=origin; \
437 make git-remote-add; \
442 if [ ! -d zephyr] ; then mkdir zephyr; fi
443 @cd zephyr; if [ ! -d .git ] ; \
445 if [ -z $${EOS_GITUSER} ] ; then \
446 git clone --depth 1 $(EOS_GIT_REPOSITRY_ZEPHYR_NOUSER) ./ ; \
448 git clone --depth 1 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_ZEPHYR) ./; \
451 export ORIGINNAME=zephyr; \
452 make git-remote-add-zephyr; \
456 if [ ! -d data ] ; then mkdir data; fi
457 @cd data; if [ ! -d .git ] ; \
459 if [ -z $${EOS_GITUSER} ] ; then \
460 git clone --depth 1 $(EOS_GIT_REPOSITRY_DATA_NOUSER) ./ ; \
462 git clone --depth 1 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_DATA) ./; \
465 export ORIGINNAME=data; \
466 make git-remote-add-data; \
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 ] ; \
475 if [ -z $${EOS_GITUSER} ] ; then \
476 git clone --depth 1 $(EOS_GIT_REPOSITRY_OPTIONAL_NOUSER) ./ ; \
478 git clone --depth 1 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_OPTIONAL) ./ ; \
481 export ORIGINNAME=optional; \
482 make git-remote-add-optional; \
486 if [ ! -d tutorial ] ; then mkdir tutorial ; fi
487 @cd tutorial; if [ ! -d .git ] ; \
489 if [ -z $${EOS_GITUSER} ] ; then \
490 git clone --depth 1 $(EOS_GIT_REPOSITRY_TUTORIAL_NOUSER) ./ ; \
492 git clone --depth 1 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_TUTORIAL) ./ ; \
495 export ORIGINNAME=tutorial; \
496 make git-remote-add-tutorial; \
500 if [ ! -d others ] ; then mkdir others; fi
501 @cd others ; if [ ! -d .git ] ; \
503 if [ -z $${EOS_GITUSER} ] ; then \
504 git clone --depth 1 $(EOS_GIT_REPOSITRY_OTHERS_NOUSER) ./ ; \
506 git clone --depth 1 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_OTHERS) ./ ; \
509 export ORIGINNAME=others; \
510 make git-remote-add-others; \
516 @if [ ! -z "$$ORIGINNAME" -a ! -z "$${EOS_HOME}" -a -d "$${EOS_HOME}" ]; then \
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); \
522 git remote add origin $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY); \
526 git-remote-add-zephyr::
527 @if [ ! -z "$$ORIGINNAME" ]; then \
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); \
533 git remote add zephyr $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_ZEPHYR); \
537 git-remote-add-data::
538 @if [ ! -z "$$ORIGINNAME" ]; then \
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); \
544 git remote add data $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_DATA); \
548 git-remote-add-optional::
549 @if [ ! -z "$$ORIGINNAME" ]; then \
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); \
555 git remote add optional $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_OPTIONAL); \
559 git-remote-add-tutorial::
560 @if [ ! -z "$$ORIGINNAME" ]; then \
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); \
566 git remote add tutorial $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_TUTORIAL); \
570 git-remote-add-others::
571 @if [ ! -z "$$ORIGINNAME" ]; then \
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); \
577 git remote add others $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_OTHERS); \