OSDN Git Service

Bug fixed:
[eos/base.git] / Makefile
1 EOS_GIT_BACKUPSITE=/net/fs08/fs08/DataBase/EosBackup.git
2 EOS_GIT_REPOSITRY= git.sourceforge.jp:/gitroot/eos/base.git 
3 EOS_GIT_REPOSITRY_OPTIONAL= git.sourceforge.jp:/gitroot/eos/optional.git 
4 EOS_GIT_REPOSITRY_TUTORIAL= git.sourceforge.jp:/gitroot/eos/tutorial.git 
5 EOS_GIT_REPOSITRY_DATA= git.sourceforge.jp:/gitroot/eos/data.git 
6 EOS_GIT_REPOSITRY_OTHERS= git.sourceforge.jp:/gitroot/eos/others.git 
7
8
9 help::
10         @echo ">> Help"
11         @echo ">>>> Download"
12         @echo "---- To register new/Modified source codes. ----"
13         @echo " $$ make git-add         or git-add[-all|-data|-tutorial|-optional|-others|-others2]" 
14         @echo " $$ make git-commit      or git-commit[-all|-data|-tutorial|-optional|-others|-others2]" 
15         @echo " $$ git tag " 
16         @echo " $$ git tag newtag "
17         @echo " $$ make git-push        or git-push[-all|-data|-tutorial|-optional|-others]" 
18         @echo ""
19         @echo "---- To fetch and merge new/modified source codes. ----" 
20         @echo " $$ make git-fetch       or git-fetch[-all|-data|-tutorial|-optional|-others]" 
21         @echo " $$ make git-merge       or git-merge[-all|-data|-tutorial|-optional|-others]" 
22         @echo " $$ make setting"
23         @echo "---- To init git repository ----"
24         @echo " $$ make git-init        or git-init[-all|-data|-tutorial|-optional|-others]" 
25         @echo "---- To clonse git repository ----"
26         @echo " $$ make git-clone or git-clone[-all|-data|-tutorial|-optional|-others]" 
27         @echo "---- option ----"
28         @echo "     [] : base only"
29         @echo "     [-data]     : data (for test)"
30         @echo "     [-tutorial] : tutorial"
31         @echo "     [-optional] : optional(for documents)"
32         @echo "     [-others] : other source codes for utils"
33         @echo "     [-others2] : other source codes for utils"
34         @echo "     [-all] : all"
35         @echo ""
36         @echo ">>>> Setting"
37         @echo "---- To set Eos ----"
38         @echo " $$ make setting ; # Create links."
39         @echo " $$ make install ; # No clean, just install."
40         @echo " $$ make rebuild ; # Clean and install."
41         @echo ""
42         @echo ">>>> Rebuild"
43         @echo "---- To rebuild source codes of Eos ----"
44         @echo " $$ make rebuild"
45         @echo "---- To set Eos ----"
46         @echo " $$ make setting"
47         @echo ""
48         @echo ">>>> Setting for Eos utils using other softwares "
49         @echo "---- To set Eos ----"
50         @echo " $$ cd util; make setting"
51         @echo " $$ cd util; make rebuild"
52
53
54
55 rebuild: rebuild-src rebuild-Objects rebuild-Tools
56 install: install-src install-Objects install-Tools
57
58 rebuild-src:
59         echo "rebuild-src"
60         cd src; rm -f Objects/Makefile; cp -f Config/Template/ObjectsHomeTemplate.Dir/Makefile Objects/Makefile
61         cd src; rm -f Tools/Makefile; cp -f Config/Template/ToolsHomeTemplate.Dir/Makefile Tools/Makefile
62
63 rebuild-Objects:
64         cd src/Objects;  make clean; make check; make depend; make ; make install
65
66 rebuild-Tools:
67         cd src/Tools;    make clean; make check; make depend; make ; make install
68
69 install-src:
70         echo "rebuild-src"
71         cd src; rm -f Objects/Makefile; cp -f Config/Template/ObjectsHomeTemplate.Dir/Makefile Objects/Makefile
72         cd src; rm -f Tools/Makefile; cp -f Config/Template/ToolsHomeTemplate.Dir/Makefile Tools/Makefile
73
74 install-Objects:
75         cd src/Objects;  make check; make depend; make ; make install
76
77 install-Tools:
78         cd src/Tools;    make check; make depend; make ; make install
79
80 setting:relink
81
82 relink:
83         ln -sf optional/doc .
84         ln -sf optional/objects .
85         ln -sf data/example .
86
87 git-add-all:: git-add git-add-data git-add-optional git-add-tutorial git-add-others
88
89 git-add::
90         git add -v .
91
92 git-add-optional::
93         cd optional; git add . 
94
95 git-add-data::
96         cd data; git add . 
97
98 git-add-tutorial::
99         cd tutorial; git add . 
100
101 git-add-others::
102         cd others; git add . 
103
104 git-add-others2::
105         cd others2; git add . 
106
107 git-commit-all:: git-commit git-commit-data git-commit-optional git-commit-tutorial git-commit-others
108
109 git-commit::
110         git commit 
111
112 git-commit-optional::
113         cd optional; git commit  
114
115 git-commit-data::
116         cd data; git commit 
117
118 git-commit-tutorial::
119         cd tutorial; git commit 
120
121 git-commit-others::
122         cd others; git commit 
123
124 git-commit-others2::
125         cd others2; git commit 
126
127 git-backup::
128         git push $(EOS_GIT_BACKUPSITE) master  --tags
129
130 git-push-all:: git-push git-push-data git-push-optional git-push-tutorial git-push-others
131
132 git-push::
133         git push origin master  --tags
134
135 git-push-optional::
136         cd optional; git push optional master --tags
137
138 git-push-data::
139         cd data; git push data master --tags
140
141 git-push-tutorial::
142         cd tutorial; git push tutorial master --tags 
143
144 git-push-others::
145         cd others; git push others master --tags
146
147 git-fetch-all:: git-fetch git-fetch-data git-fetch-optional git-fetch-tutorial git-fetch-others
148
149 git-fetch::
150         cd .       ; git fetch origin master  ; git log -1
151
152 git-fetch-data::
153         cd data    ; git fetch data master    ; git log -1
154
155 git-fetch-optional::
156         cd optional; git fetch optional master; git log -1
157
158 git-fetch-tutorial::
159         cd tutorial; git fetch tutorial master; git log -1
160
161 git-fetch-others::
162         cd others  ; git fetch others master  ; git log -1
163
164 git-merge-all:: git-merge git-merge-data git-merge-optional git-merge-tutorial git-merge-others
165
166 git-merge::
167         cd .       ; git log -1; git merge FETCH_HEAD 
168
169 git-merge-data::
170         cd data    ; git log -1; git merge FETCH_HEAD 
171
172 git-merge-optional::
173         cd optional; git log -1; git merge FETCH_HEAD
174
175 git-merge-tutorial::
176         cd tutorial; git log -1; git merge FETCH_HEAD 
177
178 git-merge-others::
179         cd others  ; git log -1; git merge FETCH_HEAD 
180
181 #
182 # Nickname 
183 #
184
185 git-init-all:: git-init git-init-data git-init-optional git-init-tutorial git-init-others
186
187 git-init::
188         if [ ! -d .git ] ; then git init        ; fi
189         SSS=`git remote -v | grep origin`; if [ ! -z "$$SSS" ] ; then git remote rm origin ; fi ; \
190         git remote add origin    $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY)
191
192 git-init-data::
193         if [ ! -d data ] ; then mkdir data; fi
194         cd data; SSS=`git remote -v | grep data`; if [ ! -z "$$SSS" ] ; then git remote rm data ; fi ; \
195         git remote add data      $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_DATA)
196
197 git-init-optional::
198         if [ ! -d optional ] ; then mkdir optional; fi
199         if [ ! -L doc      ] ; then ln -sf optional/doc . ; fi
200         if [ ! -L objects  ] ; then ln -sf optional/objects . ; fi
201         cd optional; SSS=`git remote -v | grep optional`; if [ ! -z "$$SSS" ] ; then git remote rm optional ; fi ; \
202         git remote add optional  $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_OPTIONAL)
203
204 git-init-tutorial::
205         if [ ! -d tutorial ] ; then mkdir tutorial ; fi
206         cd tutorial; SSS=`git remote -v | grep tutorial`; if [ ! -z "$$SSS" ] ; then git remote rm tutorial ; fi ; \
207         git remote add tutorial  $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_TUTORIAL)
208
209 git-init-others::
210         if [ ! -d others ] ; then mkdir others; fi
211         cd others ; SSS=`git remote -v | grep others`; if [ ! -z "$$SSS" ] ; then git remote rm others ; fi ; \
212         git remote add others $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_OTHERS)
213
214
215 git-clone-all:: git-clone git-clone-data git-clone-optional git-clone-tutorial git-clone-others
216
217 git-clone:git-init
218         if [ ! -d  .git ] ; \
219         then \
220                 git clone --depth 1 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY) ./ ; \
221         fi
222
223 git-clone-data: git-init-data
224         cd data;  if [ ! -d .git ] ; \
225         then \
226                 git clone --depth 1 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_DATA) ./; \
227         fi
228
229 git-clone-optional: git-init-optional 
230         cd optional; if [ ! -d .git ] ; \
231         then \
232                 git clone --depth 1 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_OPTIONAL) ./ ; \
233         fi
234
235 git-clone-tutorial: git-init-tutorial
236         cd tutorial; if [ ! -d .git ] ; \
237         then \
238                 git clone --depth 1 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_TUTORIAL) ./ ; \
239         fi
240
241 git-clone-others: git-init-others
242         cd others ; if [ ! -d .git ] ; \
243         then \
244                 git clone --depth 1 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_OTHERS) ./ ; \
245         fi
246
247 git-init-others2::
248         if [ ! -d others2 ] ; then mkdir others2; fi
249         cd others2 ; git remote add others2 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_OTHERS)
250