2 # Copyright (C) 2016 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 include common-rules.mk
20 ACLOCAL_AMFLAGS = -I m4
27 all_sources = $(TODO_SOURCES_ML) $(POLL_BUGZILLA_SOURCES_ML)
29 # You must adjust this to point to the right database host. The
30 # database itself is hard-coded as 'todo'. Setting the environment
31 # variable here merely tells PG'OCaml that.
33 export PGDATABASE=todo
35 bin_PROGRAMS = todo poll-bugzilla
50 TODO_OBJECTS = $(TODO_SOURCES_ML:.ml=.cmo)
52 TODO_OBJECTS = $(TODO_SOURCES_ML:.ml=.cmx)
55 todo_SOURCES = dummy.c
56 todo_DEPENDENCIES = $(TODO_OBJECTS) $(top_srcdir)/ocaml-link.sh
58 $(top_srcdir)/ocaml-link.sh -- \
59 $(OCAMLFIND) $(OCAMLBEST) $(OCAMLFLAGS) $(OCAMLPACKAGES) \
60 $(OCAMLLINKFLAGS) $(TODO_OBJECTS) -o $@
62 POLL_BUGZILLA_SOURCES_ML = \
65 POLL_BUGZILLA_OBJECTS = $(POLL_BUGZILLA_SOURCES_ML:.ml=.cmo)
67 POLL_BUGZILLA_OBJECTS = $(POLL_BUGZILLA_SOURCES_ML:.ml=.cmx)
70 poll_bugzilla_SOURCES = dummy.c
71 poll_bugzilla_DEPENDENCIES = $(POLL_BUGZILLA_OBJECTS) $(top_srcdir)/ocaml-link.sh
72 poll_bugzilla_LINK = \
73 $(top_srcdir)/ocaml-link.sh -- \
74 $(OCAMLFIND) $(OCAMLBEST) $(OCAMLFLAGS) $(OCAMLPACKAGES) \
75 $(OCAMLLINKFLAGS) $(POLL_BUGZILLA_OBJECTS) -o $@
77 BUILT_SOURCES = dummy.c
85 .depend: $(all_sources)
87 $(OCAMLFIND) ocamldep $(OCAMLPACKAGES) -I $(abs_srcdir) $^ | \
89 $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \
90 $(SED) -e 's,$(abs_srcdir)/,$(builddir)/,g' | \
98 rpmbuild -ta $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz
104 #goaljobs.1: goaljobs.pod
105 # $(POD2MAN) -c "Goaljobs" --release $(PACKAGE)-$(VERSION) $< > $@-t