PACKAGE=$(PRJNAME)-$(VERSION)
CCPACKAGE=coccicheck-$(CCVERSION)
-EXCLUDE=debian
-
+EXCLUDE=$(PACKAGE)/debian .depend
+
+DOC=docs/manual/manual.pdf \
+ docs/manual/options.pdf \
+ docs/manual/main_grammar.pdf \
+ docs/html \
+ docs/man \
+ docs/spatch.1 \
+ docs/manual/cocci-python.txt
BINSRC=spatch env.sh env.csh standard.h standard.iso \
- *.txt \
- docs/manual/manual.pdf docs/manual/options.pdf docs/manual/main_grammar.pdf docs/spatch.1 \
- docs/manual/cocci-python.txt \
- demos/*
+ *.txt $(DOC) demos/*
BINSRC-PY=$(BINSRC) $(PYLIB) python/coccilib/
-EXCL=$(EXCLUDE:%=--exclude=$(PACKAGE)/%)
+EXCL=$(EXCLUDE:%=--exclude=%)
BINSRC2=$(BINSRC:%=$(PACKAGE)/%)
BINSRC2-PY=$(BINSRC-PY:%=$(PACKAGE)/%)
# Procedure to do first time:
# cd ~/release
-# cvs checkout coccinelle -dP
+# git clone ... coccinelle
# cd coccinelle
#
# Procedure to do each time:
#
# 1) make prerelease # WARN: These will clean your local rep. of pending modifications
#
-# UPDATE VERSION number in globals/config.ml.in
+# UPDATE VERSION number in ./version
# and commit it with
#
# 2) make release
# the scripts/licensify has been run at least once.
# For the 'make bintar' I can do it from my original repo.
+# The 'git rebase' is in there just in case you started with
+# unpushed changes. However, that is probably something you should
+# not do in the first place.
+
prerelease:
- cvs up -CdP
+ git pull --rebase
+ $(MAKE) fix-expected
$(MAKE) distclean
sed -i "s|^OCAMLCFLAGS=.*$$|OCAMLCFLAGS=|" Makefile
- @echo "\n\tEdit globals/config.ml.in"
+ @echo "\n\tEdit ./version"
@echo "\tCommit with 'make release'\n"
+fix-expected:
+ $(MAKE) distclean
+ ./configure --without-python
+ $(MAKE) world
+ yes | ./spatch.opt -testall
+ cp tests/SCORE_actual.sexp tests/SCORE_expected_orig.sexp
+
release:
- cvs ci -m "Release $(VERSION)" globals/config.ml.in
+ sed -i -e 's|^let version = ".*"$$|let version = "$(VERSION)"|g' globals/config.ml.in
+ git add ./ version globals/config.ml.in
+ git commit -m "Release $(VERSION)"
+ git tag -a -m "Release $(VERSION)" $(VERSION)
+ git push --mirror
$(MAKE) licensify
@echo "\n\tRun 'make package'\n"
$(MAKE) package-src
$(MAKE) package-nopython
$(MAKE) package-python
+ @echo "\tPut online with 'make website'"
+ @echo "\tThe coccinelle SVN repository must be in $(WEBBASE)\n"
package-src:
$(MAKE) distclean # Clean project
package-nopython:
$(MAKE) distclean # Clean project
./configure --without-python
- $(MAKE) docs
$(MAKE) bintar
$(MAKE) bytecodetar
- $(MAKE) staticbintar
+# $(MAKE) staticbintar
package-python:
$(MAKE) distclean # Clean project
./configure # Reconfigure project with Python support
- $(MAKE) docs
$(MAKE) bintar-python
$(MAKE) bytecodetar-python
# make clean is there to remove them while not removing the pdf
# (only distclean remove the pdfs).
srctar:
- $(MAKE) distclean
$(MAKE) docs
$(MAKE) clean
cp -a . $(TMP)/$(PACKAGE)
rm -rf $(TMP)/$(PACKAGE)
bintar: all
+ $(MAKE) docs
rm -f $(TMP)/$(PACKAGE)
ln -s `pwd` $(TMP)/$(PACKAGE)
cd $(TMP); tar cvfz $(PACKAGE)-bin-x86.tgz --exclude-vcs $(BINSRC2)
rm -f $(TMP)/$(PACKAGE)
staticbintar: all.opt
+ $(MAKE) docs
rm -f $(TMP)/$(PACKAGE)
ln -s `pwd` $(TMP)/$(PACKAGE)
$(MAKE) static
# add ocaml version in name ?
bytecodetar: all
+ $(MAKE) docs
rm -f $(TMP)/$(PACKAGE)
ln -s `pwd` $(TMP)/$(PACKAGE)
$(MAKE) purebytecode
rm -f $(TMP)/$(PACKAGE)
bintar-python: all
+ $(MAKE) docs
rm -f $(TMP)/$(PACKAGE)
ln -s `pwd` $(TMP)/$(PACKAGE)
cd $(TMP); tar cvfz $(PACKAGE)-bin-x86-python.tgz --exclude-vcs $(BINSRC2-PY)
# add ocaml version in name ?
bytecodetar-python: all
+ $(MAKE) docs
rm -f $(TMP)/$(PACKAGE)
ln -s `pwd` $(TMP)/$(PACKAGE)
$(MAKE) purebytecode
clean-packages::
rm -f $(TMP)/$(PACKAGE).tgz
rm -f $(TMP)/$(PACKAGE)-bin-x86.tgz
- rm -f $(TMP)/$(PACKAGE)-bin-x86-static.tgz
+# rm -f $(TMP)/$(PACKAGE)-bin-x86-static.tgz
rm -f $(TMP)/$(PACKAGE)-bin-bytecode-$(OCAMLVERSION).tgz
rm -f $(TMP)/$(PACKAGE)-bin-x86-python.tgz
rm -f $(TMP)/$(PACKAGE)-bin-bytecode-$(OCAMLVERSION)-python.tgz
fixdates:
echo do 'touch **/*.*'
-#fixCVS:
-# cvs update -d -P
-# echo do 'rm -rf **/CVS'
-
ocamlversion:
@echo $(OCAMLVERSION)
EXCL_SYNC=--exclude ".git" \
--exclude ".gitignore" \
--exclude ".cvsignore" \
+ --exclude ".svn" \
--exclude "tests" \
--exclude "TODO" \
--cvs-exclude
packsrc: prepack
$(MAKE) -C $(TMP)/$(PACKAGE)/debian lucid
$(MAKE) -C $(TMP)/$(PACKAGE)/debian karmic
-# $(MAKE) -C $(TMP)/$(PACKAGE)/debian maverik
+ $(MAKE) -C $(TMP)/$(PACKAGE)/debian maverick
+ $(MAKE) -C $(TMP)/$(PACKAGE)/debian natty
$(MAKE) push
rm -rf $(TMP)/$(PACKAGE)/
prepack:
rsync -a $(EXCL_SYNC) . $(TMP)/$(PACKAGE)
$(MAKE) -C $(TMP)/$(PACKAGE) licensify
+ sed -i "s|^OCAMLCFLAGS=.*$$|OCAMLCFLAGS=|" $(TMP)/$(PACKAGE)/Makefile
rm -rf $(TMP)/$(PACKAGE)/tools
push:
rm -rf $(TMP)/$(PRJNAME)_$(VERSION)*.dsc
rm -rf $(TMP)/$(PRJNAME)_$(VERSION)*.tar.gz
+# Produces a source tarball
+# Note: start from a fresh working directory
+# Note: configure first
+dist:
+ $(MAKE) licensify
+ $(MAKE) docs
+ $(MAKE) clean
+ tar cvfz $(PACKAGE).tar.gz --transform="s,^,$(PACKAGE)/,S" --exclude=$(PACKAGE).tar.gz --exclude-backups --exclude-vcs *