# goaljobs # Copyright (C) 2013 Red Hat Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. include common-rules.mk ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = \ COPYING \ goaljobs \ goaljobs_config.ml.in \ goaljobs.ml \ goaljobs.mli \ goaljobs.spec \ goaljobs.spec.in \ META.in \ NOTES \ pa_goal.ml \ README \ TODO SUBDIRS = . examples tests sources = \ goaljobs_config.ml \ goaljobs.ml \ goaljobs.mli bin_SCRIPTS = goaljobs # These targets are noinst because we use a custom install hook to # install them, and are _SCRIPTS because automake doesn't know how to # compile OCaml code. noinst_SCRIPTS = goaljobs.cma goaljobs.cmxa pa_goal.cmo # Library. goaljobs.cma: goaljobs_config.cmo goaljobs.cmo $(OCAMLFIND) ocamlc -a -o $@ $(OCAMLCFLAGS) $(OCAMLCPACKAGES) $^ goaljobs.cmxa: goaljobs_config.cmx goaljobs.cmx $(OCAMLFIND) ocamlopt -a -o $@ $(OCAMLOPTFLAGS) $(OCAMLOPTPACKAGES) $^ # Preprocessor for goaljobs scripts. pa_goal.cmo: pa_goal.ml $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -package camlp4.lib -linkpkg \ -pp $(CAMLP4OF) -c $< -o $@ # Install. install-data-hook: mkdir -p $(DESTDIR)$(OCAMLLIB) $(OCAMLFIND) install \ -ldconf ignore -destdir $(DESTDIR)$(OCAMLLIB) \ goaljobs \ META goaljobs.cma goaljobs.cmxa pa_goal.cmo *.cmi $(srcdir)/*.mli rm $(DESTDIR)$(OCAMLLIB)/goaljobs/pa_goal.cmi # Dependencies. depend: .depend .depend: $(sources) rm -f $@ $@-t $(OCAMLFIND) ocamldep -I $(abs_srcdir) $^ | \ $(SED) 's/ *$$//' | \ $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \ $(SED) -e 's,$(abs_srcdir)/,$(builddir)/,g' | \ sort > $@-t mv $@-t $@ -include .depend rpm: dist rpmbuild -ta $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz # License check. licensecheck: licensecheck $$(git ls-files)