Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
zypp: Only compile zypper support if OCaml inifiles module is found.
  • Loading branch information
rwmjones committed Jun 4, 2013
1 parent bf784ff commit e1dda9f
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 10 deletions.
2 changes: 2 additions & 0 deletions README
Expand Up @@ -60,6 +60,8 @@ For Debian/Ubuntu:
Optional
--------

ocaml inifiles library (needed for zypper only)

These are only needed if you plan to boot the supermin appliances you
are building:

Expand Down
4 changes: 4 additions & 0 deletions configure.ac
Expand Up @@ -56,6 +56,10 @@ if test "$OCAMLFIND" = "no"; then
AC_MSG_ERROR([You must install OCaml findlib (the ocamlfind command)])
fi

dnl Optional OCaml packages.
AC_CHECK_OCAML_PKG([inifiles])
AM_CONDITIONAL([HAVE_OCAML_INIFILES], [test "x$OCAML_PKG_inifiles" != "xno"])

dnl Optional programs.
AC_CHECK_PROG(PERLDOC,[perldoc],[perldoc],[no])
if test "x$PERLDOC" = "xno" ; then
Expand Down
2 changes: 0 additions & 2 deletions src/.depend
Expand Up @@ -17,5 +17,3 @@ supermin_utils.cmo: supermin_cmdline.cmi supermin_utils.cmi
supermin_utils.cmx: supermin_cmdline.cmx supermin_utils.cmi
supermin_yum_rpm.cmo: supermin_utils.cmi supermin_package_handlers.cmi supermin_cmdline.cmi config.cmo
supermin_yum_rpm.cmx: supermin_utils.cmx supermin_package_handlers.cmx supermin_cmdline.cmx config.cmx
supermin_zypp_rpm.cmo: supermin_utils.cmi supermin_package_handlers.cmi supermin_cmdline.cmi config.cmo
supermin_zypp_rpm.cmx: supermin_utils.cmx supermin_package_handlers.cmx supermin_cmdline.cmx config.cmx
36 changes: 28 additions & 8 deletions src/Makefile.am
Expand Up @@ -17,6 +17,22 @@
#
# Written by Richard W.M. Jones <rjones@redhat.com>

EXTRA_DIST = \
config.ml \
supermin.8 \
supermin.pod \
supermin.ml \
supermin_cmdline.mli \
supermin_cmdline.ml \
supermin_debian.ml \
supermin_package_handlers.mli \
supermin_package_handlers.ml \
supermin_pacman.ml \
supermin_utils.mli \
supermin_utils.ml \
supermin_yum_rpm.ml \
supermin_zypp_rpm.ml

# Note these must be in build dependency order.
SOURCES = \
config.ml \
Expand All @@ -25,20 +41,21 @@ SOURCES = \
supermin_utils.mli \
supermin_utils.ml \
supermin_package_handlers.mli \
supermin_package_handlers.ml \
supermin_zypp_rpm.ml \
supermin_package_handlers.ml

if HAVE_OCAML_INIFILES
SOURCES += \
supermin_zypp_rpm.ml
endif

SOURCES += \
supermin_yum_rpm.ml \
supermin_debian.ml \
supermin_pacman.ml \
supermin.ml

CLEANFILES = *~ *.cmi *.cmo *.cmx *.o supermin

EXTRA_DIST = \
supermin.8 \
supermin.pod \
$(SOURCES)

man_MANS = \
supermin.8

Expand All @@ -56,7 +73,10 @@ OBJECTS = $(XOBJECTS)
BEST = opt
endif

OCAMLPACKAGES = -package unix,str,inifiles
OCAMLPACKAGES = -package unix,str
if HAVE_OCAML_INIFILES
OCAMLPACKAGES += -package inifiles
endif
OCAMLFLAGS = -warn-error CDEFLMPSUVXYZ

supermin: $(OBJECTS)
Expand Down

0 comments on commit e1dda9f

Please sign in to comment.