~ubuntu-branches/ubuntu/trusty/coccinelle/trusty

« back to all changes in this revision

Viewing changes to Makefile.release

  • Committer: Package Import Robot
  • Author(s): Євгеній Мещеряков
  • Date: 2012-08-19 20:40:52 UTC
  • mfrom: (7.2.8 experimental)
  • Revision ID: package-import@ubuntu.com-20120819204052-8cujknwy6cn8a6h6
Tags: 1.0.0~rc15.deb-1
* New upstream RC 
  - Do not build-depend on libsexplib-camlp4-dev and libextlib-ocaml-dev
    anymore

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
    docs/man                     \
16
16
    docs/spatch.1                \
17
17
    docs/manual/cocci-python.txt
18
 
BINSRC=spatch env.sh env.csh standard.h standard.iso \
19
 
       *.txt $(DOC) demos/*
 
18
BINSRC=spatch* env.sh env.csh standard.h standard.iso \
 
19
       *.txt $(DOC) demos/* scripts/spatch*
20
20
BINSRC-PY=$(BINSRC) $(PYLIB) python/coccilib/
21
21
 
22
22
EXCL=$(EXCLUDE:%=--exclude=%)
23
23
BINSRC2=$(BINSRC:%=$(PACKAGE)/%)
24
24
BINSRC2-PY=$(BINSRC-PY:%=$(PACKAGE)/%)
25
25
 
 
26
# TMP should point to a folder that is private to the release
 
27
# process. In addition, it should not be the direct parent of
 
28
# the directory in which the release is performed, because it
 
29
# creates temporary directories that in this case could have
 
30
# a name clash with the current directory.
26
31
ifndef TMP
27
 
TMP=/tmp
 
32
TMP=/var/tmp
28
33
endif
29
34
 
30
35
# should be defined by Makefile.config
64
69
# unpushed changes. However, that is probably something you should
65
70
# not do in the first place.
66
71
 
67
 
prerelease: Makefile.config
 
72
release-help:
 
73
        @echo "To make a release, perform the following steps:"
 
74
        @echo ""
 
75
        @echo "1. Make sure that all changes are committed and pushed."
 
76
        @echo "   (making a release will destroy any uncommitted changes)"
 
77
        @echo "   Preferably, start from a fresh clone of the coccinelle repo."
 
78
        @echo "2. Run 'make prerelease'. It will generate some files that are not"
 
79
        @echo "   in the repository but part of the release tarballs."
 
80
        @echo "3. Edit ./version. It must be a new version."
 
81
        @echo "4. Run 'make release'. It makes changes to the git repository that"
 
82
        @echo "   are not idempotent. Running this step again is likely to result"
 
83
        @echo "   in some git errors. These are not dramatic and are therefore"
 
84
        @echo "   ignored."
 
85
        @echo "5. Run 'make package'. It will build many tarballs."
 
86
        @echo "6. Run 'make website'. Make sure that $(WEBBASE) exists beforehand."
 
87
        @echo "   Hint: run step 5 and 6 directly after each other. The tarballs"
 
88
        @echo "         are stored temporarily in $(TMP)."
 
89
        @echo "7. Updated some webpages and commit them to svn."
 
90
 
 
91
prerelease:
68
92
        @echo "pulling changes from the repository"
69
93
        $(GIT) pull --rebase
70
94
        $(MAKE) fix-expected
71
95
        $(MAKE) distclean KEEP_CONFIG=1
72
96
        @echo "\n\tEdit ./version"
73
97
        @echo "\tCommit with 'make release'\n"
74
 
        @echo "\tYou can skip the actual commit using 'GIT=echo make release'"
 
98
        @echo "\t* set the GIT env variable to 'echo' to skip performing any git commands"
 
99
        @echo "\t* changes to files other than ./version will not be committed automatically."
75
100
 
76
101
fix-expected:
77
102
        @echo "going to generate: tests/SCORE_expected_orig.sexp"
78
103
        $(MAKE) distclean
79
 
        ./configure --disable-python
 
104
        ./configure --enable-release --disable-python
80
105
        $(MAKE) opt-only
81
106
        yes | ./spatch.opt -testall --iso-file ./standard.iso --macro-file-builtins ./standard.h
82
107
        cp tests/SCORE_actual.sexp tests/SCORE_expected_orig.sexp
86
111
        @echo "Marking version: $(VERSION)"
87
112
        echo -n "$(VERSION)" > ./version
88
113
        $(GIT) add ./version
89
 
        $(GIT) commit -m "Release $(VERSION)"
90
 
        $(GIT) tag -a -m "Release $(VERSION)" $(VERSION)
 
114
        -$(GIT) commit -m "Release $(VERSION)"
 
115
        -$(GIT) tag -a -m "Release $(VERSION)" $(VERSION)
91
116
        $(GIT) push --mirror
92
117
        $(MAKE) licensify
93
118
        @echo "\n\tLicensify has run: do not commit any files from now on!"
105
130
        $(MAKE) srctar
106
131
        $(MAKE) coccicheck
107
132
 
 
133
# Reconfigures the project without Python support
 
134
# Note: we disable pcre syntax as well to eliminate the dependency
 
135
# on those libraries.
108
136
package-nopython:
109
 
        $(MAKE) distclean             # Clean project
110
 
        ./configure --disable-python  # Reconfigure project without Python support
 
137
        $(MAKE) distclean
 
138
        ./configure --enable-release --disable-python --disable-pcre-syntax --disable-menhirLib --disable-sexplib --disable-extlib --disable-pycaml
111
139
        $(MAKE) bintar
112
140
        $(MAKE) bytecodetar
113
 
#       $(MAKE) staticbintar
114
141
 
 
142
# Reconfigure project with Python support
 
143
# Note: we disable pcre syntax as well to eliminate the dependency
 
144
# on those libraries.
115
145
package-python:
116
 
        $(MAKE) distclean            # Clean project
117
 
        ./configure --enable-python  # Reconfigure project with Python support
 
146
        $(MAKE) distclean
 
147
        ./configure --enable-release --enable-python --disable-pcre-syntax --disable-menhirLib --disable-sexplib --disable-extlib --disable-pycaml
118
148
        $(MAKE) bintar-python
119
149
        $(MAKE) bytecodetar-python
120
150
 
134
164
        if test -f "$(TMP)/$(PACKAGE)/"; then rm -f "$(TMP)/$(PACKAGE)/"; fi # remove it if it is a symlink
135
165
        $(MKDIR_P) "$(TMP)/$(PACKAGE)/"
136
166
        cp -rfa ./*  "$(TMP)/$(PACKAGE)/"
137
 
        cd $(TMP)/$(PACKAGE); cd parsing_cocci/; $(MAKE) parser_cocci_menhir.ml
 
167
        cd $(TMP)/$(PACKAGE); $(MAKE) -C parsing_cocci parser_cocci_menhir.ml
138
168
        rm -f $(TMP)/$(PACKAGE)/Makefile.config
139
169
        cd $(TMP); tar cvfz $(PACKAGE).tgz --exclude-vcs $(EXCL) $(PACKAGE)
140
170
        rm -rf  $(TMP)/$(PACKAGE)
143
173
        $(MAKE) docs
144
174
        rm -f $(TMP)/$(PACKAGE)
145
175
        ln -s `pwd` $(TMP)/$(PACKAGE)
 
176
        @if test -n "${PATCHELF}" -a -f spatch; then \
 
177
           $(PATCHELF) --set-interpreter "/lib/ld-linux.so.2" --set-rpath "" spatch; fi
 
178
        @if test -n "${PATCHELF}" -a -f spatch.opt; then \
 
179
           $(PATCHELF) --set-interpreter "/lib/ld-linux.so.2" --set-rpath "" spatch.opt; fi
146
180
        cd $(TMP); tar cvfz $(PACKAGE)-bin-x86.tgz --exclude-vcs $(BINSRC2)
147
181
        rm -f $(TMP)/$(PACKAGE)
148
182
 
154
188
        cd $(TMP); tar cvfz $(PACKAGE)-bin-x86-static.tgz --exclude-vcs $(BINSRC2)
155
189
        rm -f $(TMP)/$(PACKAGE)
156
190
 
157
 
# add ocaml version in name ?
158
191
bytecodetar: all-dev
159
192
        $(MAKE) docs
160
193
        rm -f $(TMP)/$(PACKAGE)
161
194
        ln -s `pwd` $(TMP)/$(PACKAGE)
162
195
        $(MAKE) purebytecode
163
 
        cd $(TMP); tar cvfz $(PACKAGE)-bin-bytecode-$(OCAMLVERSION).tgz --exclude-vcs $(BINSRC2)
 
196
        $(MAKE) copy-stubs
 
197
        @if test -n "${PATCHELF}" -a -f dllpycaml_stubs.so; then \
 
198
          $(PATCHELF) --set-rpath "" dllpycaml_stubs.so; fi
 
199
        @if test -n "${PATHCELF}" -a -f dllpcre_stubs.so; then \
 
200
          $(PATCHELF) --set-rpath "" dllpcre_stubs.so; fi
 
201
        cd $(TMP); tar cvfz $(PACKAGE)-bin-bytecode-$(OCAMLVERSION).tgz --exclude-vcs $(BINSRC2) $$(find -L $(PACKAGE) -maxdepth 1 -name 'dll*.so')
164
202
        rm -f $(TMP)/$(PACKAGE)
 
203
        rm -f dllpycaml_stubs.so dllpcre_stubs.so
165
204
 
166
205
bintar-python: all
167
206
        $(MAKE) docs
 
207
        @if test -n "${PATCHELF}" -a -f spatch; then \
 
208
           $(PATCHELF) --set-interpreter "/lib/ld-linux.so.2" --set-rpath "" spatch; fi
 
209
        @if test -n "${PATCHELF}" -a -f spatch.opt; then \
 
210
           $(PATCHELF) --set-interpreter "/lib/ld-linux.so.2" --set-rpath "" spatch.opt; fi
168
211
        rm -f $(TMP)/$(PACKAGE)
169
212
        ln -s `pwd` $(TMP)/$(PACKAGE)
170
213
        cd $(TMP); tar cvfz $(PACKAGE)-bin-x86-python.tgz --exclude-vcs $(BINSRC2-PY)
171
214
        rm -f $(TMP)/$(PACKAGE)
172
215
 
173
 
# add ocaml version in name ?
174
216
bytecodetar-python: all-dev
175
217
        $(MAKE) docs
176
218
        rm -f $(TMP)/$(PACKAGE)
177
219
        ln -s `pwd` $(TMP)/$(PACKAGE)
178
220
        $(MAKE) purebytecode
179
 
        cd $(TMP); tar cvfz $(PACKAGE)-bin-bytecode-$(OCAMLVERSION)-python.tgz --exclude-vcs $(BINSRC2-PY)
 
221
        $(MAKE) copy-stubs
 
222
        @if test -n "${PATCHELF}" -a -f dllpycaml_stubs.so; then \
 
223
           $(PATCHELF) --set-rpath "" dllpycaml_stubs.so; fi
 
224
        @if test -n "${PATHCELF}" -a -f dllpcre_stubs.so; then \
 
225
           $(PATCHELF) --set-rpath "" dllpcre_stubs.so; fi
 
226
        cd $(TMP); tar cvfz $(PACKAGE)-bin-bytecode-$(OCAMLVERSION)-python.tgz --exclude-vcs $(BINSRC2-PY) $$(find -L $(PACKAGE) -maxdepth 1 -name 'dll*.so')
180
227
        rm -f $(TMP)/$(PACKAGE)
 
228
        rm -f dllpycaml_stubs.so dllpcre_stubs.so
181
229
 
182
230
coccicheck:
183
231
        cp -a ./scripts/coccicheck $(TMP)/$(CCPACKAGE)
187
235
clean-packages::
188
236
        rm -f $(TMP)/$(PACKAGE).tgz
189
237
        rm -f $(TMP)/$(PACKAGE)-bin-x86.tgz
190
 
#       rm -f $(TMP)/$(PACKAGE)-bin-x86-static.tgz
191
238
        rm -f $(TMP)/$(PACKAGE)-bin-bytecode-$(OCAMLVERSION).tgz
192
239
        rm -f $(TMP)/$(PACKAGE)-bin-x86-python.tgz
193
240
        rm -f $(TMP)/$(PACKAGE)-bin-bytecode-$(OCAMLVERSION)-python.tgz
194
241
        rm -f $(TMP)/$(CCPACKAGE).tgz
195
242
 
196
243
#
197
 
# No need to licensify 'demos'. Because these is basic building blocks
 
244
# No need to licensify 'demos'. Because these are basic building blocks
198
245
# to use SmPL.
199
246
#
200
247
TOLICENSIFY=ctl engine globals parsing_cocci popl popl09 python scripts tools
268
315
# Note: configure first
269
316
dist:
270
317
        $(MAKE) licensify
 
318
        $(MAKE) distclean KEEP_CONFIG=1
271
319
        $(MAKE) docs
 
320
        $(MAKE) -C parsing_cocci parser_cocci_menhir.ml
272
321
        $(MAKE) clean
273
322
        tar cvfz $(PACKAGE).tar.gz --transform="s,^,$(PACKAGE)/,S" --exclude=$(PACKAGE).tar.gz --exclude-backups --exclude-vcs *