2 # Copyright (C) 2012 Red Hat Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 bin_SCRIPTS = whenjobs
20 OCAMLPACKAGES = -package unix,num,camlp4.lib,calendar,rpc -I ../lib
22 OCAMLCFLAGS = -g -warn-error CDEFLMPSUVYZX $(OCAMLPACKAGES)
23 OCAMLOPTFLAGS = $(OCAMLCFLAGS)
25 # These should be in alphabetical order.
33 # In dependency order.
42 echo 'let libdir = "$(libdir)/$(PACKAGE_NAME)"' > $@-t
45 whenproto_clnt.ml whenproto_clnt.mli: whenproto.x
46 $(OCAMLRPCGEN) -int int32 -hyper int64 -clnt $<
48 whenproto.x: ../lib/whenproto.x
51 whenjobs: ../lib/whenlib.cma $(OBJECTS)
52 $(OCAMLFIND) ocamlc -custom $(OCAMLCFLAGS) -ccopt -L../lib \
53 -linkpkg whenlib.cma $(OBJECTS) -o $@
55 # Rules for all OCaml files.
56 %.cmi: %.mli ../lib/whenlib.cma
57 $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $@
58 %.cmo: %.ml ../lib/whenlib.cma
59 $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $@
60 %.cmx: %.ml ../lib/whenlib.cma
61 $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) -c $< -o $@
63 SUFFIXES = .cmo .cmi .cmx .ml .mli .mll .mly
70 $(OCAMLFIND) ocamldep $^ | \
71 $(SED) -e 's/ *$$//' | \
72 $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \
81 whenjobs.1: whenjobs.pod
84 --release "$(PACKAGE)-$(VERSION)" \
90 *.cmi *.cmo *.cmx *.cma *.cmxa *~ \
93 whenproto_clnt.ml whenproto_clnt.mli \