[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] externals/caml 1d6cd46 196/197: Add make target for opam releas
From: |
Stefan Monnier |
Subject: |
[nongnu] externals/caml 1d6cd46 196/197: Add make target for opam release |
Date: |
Sat, 21 Nov 2020 01:20:06 -0500 (EST) |
branch: externals/caml
commit 1d6cd46e3e862dbb3dc20c5c78da892cf0794546
Author: Christophe Troestler <Christophe.Troestler@umons.ac.be>
Commit: Christophe Troestler <Christophe.Troestler@umons.ac.be>
Add make target for opam release
---
.gitignore | 2 ++
Makefile | 33 +++++++++++++++++++++++++++++----
2 files changed, 31 insertions(+), 4 deletions(-)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..2dd0c2c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+caml-mode-*
+caml-mode.*/
diff --git a/Makefile b/Makefile
index e3b2289..5f12f22 100644
--- a/Makefile
+++ b/Makefile
@@ -12,16 +12,21 @@
#* *
#**************************************************************************
-ROOTDIR = ..
-
-include $(ROOTDIR)/Makefile.config
-include $(ROOTDIR)/Makefile.common
+VERSION = $(shell grep "^version" caml-mode.opam \
+ | sed -e 's/version: *"\([^"]*\)"/\1/')
+DESCRIPTION = $(shell grep ';;; caml.el ---' caml.el \
+ | sed 's/[^-]*--- *\(.*\)/\1/')
+DIST_DIR = caml-mode-$(VERSION)
+OPAM_DIR = caml-mode.$(VERSION)
+TARBALL = caml-mode-$(VERSION).tgz
# Files to install
FILES= caml-font.el caml-hilit.el caml.el camldebug.el \
inf-caml.el caml-compat.el caml-help.el caml-types.el \
caml-xemacs.el caml-emacs.el
+DIST_FILES = $(FILES) Makefile README* COPYING* CHANGES.md ocamltags.in
+
# Where to install. If empty, automatically determined.
#EMACSDIR=
@@ -79,9 +84,29 @@ ocamltags: ocamltags.in
install-ocamltags: ocamltags
$(INSTALL_DATA) ocamltags $(SCRIPTDIR)/ocamltags
+# OPAM
+.PHONY: opam
+opam: $(TARBALL)
+ mkdir -p $(OPAM_DIR)
+ cp -a caml-mode.opam $(OPAM_DIR)/opam
+ echo "url {" >> $(OPAM_DIR)/opam
+ echo " src:
\"`pwd`/https://github.com/ocaml/caml-mode/releases/download/$(VERSION)/$(TARBALL)\""
>> $(OPAM_DIR)/opam
+ echo " checksum: \"md5=`md5sum $(TARBALL) | cut -d ' ' -f 1`\"" \
+ >> $(OPAM_DIR)/opam
+ echo "}" >> $(OPAM_DIR)/opam
+
+$(TARBALL): $(DIST_FILES)
+ mkdir -p $(DIST_DIR)
+ for f in $(DIST_FILES); do cp $$f $(DIST_DIR); done
+ echo "(define-package \"caml\" \"$(VERSION)\" \"$(DESCRIPTION)\" \
+ )" > $(DIST_DIR)/caml-pkg.el
+ tar acvf $@ $(DIST_DIR)
+ $(RM) -rf $(DIST_DIR)
+
# This is for testing purposes
compile-only:
$(EMACS) --batch --eval '$(COMPILECMD)'
clean:
rm -f ocamltags *~ \#*# *.elc
+ $(RM) -r $(TARBALL) $(OPAM_DIR)
- [nongnu] externals/caml 4c414a0 180/197: Emacs: Improve colors on dark themes, (continued)
- [nongnu] externals/caml 4c414a0 180/197: Emacs: Improve colors on dark themes, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 07d301a 174/197: elisp: fixed grammar in docstrings and comments, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 2964c4d 162/197: Add another format to parse compiler output., Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 02f8809 184/197: Emacs: use symbol boundaries in regular expressions, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 4c8c8d3 176/197: makefiles: use 'install' instead of 'cp' in 'make install' targets, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml c9e7f57 186/197: Fix most CheckDoc errors., Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 78ec6be 185/197: Transform the README to Markdown, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 333d2f4 191/197: Improve syntax highlighting, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml adafe8a 190/197: Add OPAM file, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 466d703 194/197: Minor improvements to the README, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 1d6cd46 196/197: Add make target for opam release,
Stefan Monnier <=
- [nongnu] externals/caml 38ebde1 197/197: Generate a caml-mode-site-file, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 29aaf70 193/197: Move the changelog to CHANGES, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml bfa612b 195/197: Mention easy ways of installing this package, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml b6eebe4 192/197: Apply some recommendations of checkdoc, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 9d5dbfb 131/197: - Replaced setq by add-to-list in README, Stefan Monnier, 2020/11/21