Debian Codegraph @

Makefile

raw
1 ################################################################################
2 # ocamlmod: Generate OCaml modules from source files #
3 # #
4 # Copyright (C) 2011, OCamlCore SARL #
5 # Copyright (C) 2013, Sylvain Le Gall #
6 # #
7 # This library is free software; you can redistribute it and/or modify it #
8 # under the terms of the GNU Lesser General Public License as published by #
9 # the Free Software Foundation; either version 2.1 of the License, or (at #
10 # your option) any later version, with the OCaml static compilation #
11 # exception. #
12 # #
13 # This library is distributed in the hope that it will be useful, but #
14 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY #
15 # or FITNESS FOR A PARTICULAR PURPOSE. See the file COPYING for more #
16 # details. #
17 # #
18 # You should have received a copy of the GNU Lesser General Public License #
19 # along with this library; if not, write to the Free Software Foundation, #
20 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #
21 ################################################################################
22
23 default: test
24
25 # OASIS_START
26 # DO NOT EDIT (digest: a3c674b4239234cbbe53afe090018954)
27
28 SETUP = ocaml setup.ml
29
30 build: setup.data
31 $(SETUP) -build $(BUILDFLAGS)
32
33 doc: setup.data build
34 $(SETUP) -doc $(DOCFLAGS)
35
36 test: setup.data build
37 $(SETUP) -test $(TESTFLAGS)
38
39 all:
40 $(SETUP) -all $(ALLFLAGS)
41
42 install: setup.data
43 $(SETUP) -install $(INSTALLFLAGS)
44
45 uninstall: setup.data
46 $(SETUP) -uninstall $(UNINSTALLFLAGS)
47
48 reinstall: setup.data
49 $(SETUP) -reinstall $(REINSTALLFLAGS)
50
51 clean:
52 $(SETUP) -clean $(CLEANFLAGS)
53
54 distclean:
55 $(SETUP) -distclean $(DISTCLEANFLAGS)
56
57 setup.data:
58 $(SETUP) -configure $(CONFIGUREFLAGS)
59
60 configure:
61 $(SETUP) -configure $(CONFIGUREFLAGS)
62
63 .PHONY: build doc test all install uninstall reinstall clean distclean configure
64
65 # OASIS_STOP
66
67 # Precommit target
68 # Check style of code.
69 PRECOMMIT_ARGS= \
70 --exclude myocamlbuild.ml \
71 --exclude setup.ml \
72 --exclude README.txt \
73 --exclude INSTALL.txt \
74 --exclude Makefile \
75 --exclude configure \
76 --exclude _tags
77
78 precommit:
79 -@if command -v OCamlPrecommit > /dev/null; then \
80 OCamlPrecommit $(PRECOMMIT_ARGS); \
81 else \
82 echo "Skipping precommit checks.";\
83 fi
84
85 precommit-full:
86 OCamlPrecommit --full $(PRECOMMIT_ARGS)
87
88 test: precommit
89
90 .PHONY: precommit
91
92 # Fix perms target
93 # Fix missing permission for darcs VCS files.
94 fix-perms:
95 # TODO: chmod +x doc-dist.sh
96
97 .PHONY: fix-perms
98
99 # Headache target
100 # Fix license header of file.
101
102 headache:
103 find ./ \
104 -name _darcs -prune -false \
105 -o -name .git -prune -false \
106 -o -name .svn -prune -false \
107 -o -name _build -prune -false \
108 -o -name dist -prune -false \
109 -o -name '*[^~]' -type f \
110 | xargs /usr/bin/headache -h _header -c _headache.config
111
112 .PHONY: headache
113
114 # Deploy target
115 # Deploy/release the software.
116
117 deploy: headache fix-perms
118 # TODO: create a plugin to create documentation.
119 # oasis doc-dist
120 admin-gallu-deploy --verbose \
121 --forge_upload --forge_group ocamlmod --forge_user gildor-admin
122 # TODO: when oasis doc-dist will work, re-add.
123 # --forge_extra_file "dist/ocamlmod-doc-$(shell oasis query version).tar.gz"
124 # TODO: create a plugin to send announcement.
125 # oasis announce
126 admin-gallu-oasis-increment \
127 --setup_run --setup_args "-setup-update dynamic" --use_vcs
128
129 .PHONY: deploy