lib: Don't include whenproto_aux.{ml,mli} in the tarball.
[whenjobs.git] / lib / Makefile.am
index 1421da3..70d84fa 100644 (file)
@@ -20,29 +20,46 @@ EXTRA_DIST = whenproto.x pa_when.ml $(SOURCES)
 libwhenjobsdir = $(libdir)/$(PACKAGE_NAME)
 libwhenjobs_SCRIPTS = whenlib.cma pa_when.cmo $(CMI_FILES)
 
 libwhenjobsdir = $(libdir)/$(PACKAGE_NAME)
 libwhenjobs_SCRIPTS = whenlib.cma pa_when.cmo $(CMI_FILES)
 
+if HAVE_OCAMLOPT
+libwhenjobs_SCRIPTS += whenlib.cmxa
+endif
+
 OCAMLPACKAGES = -package unix,num,camlp4.lib,calendar,rpc
 
 OCAMLCFLAGS = -g -warn-error CDEFLMPSUVYZX $(OCAMLPACKAGES)
 OCAMLOPTFLAGS = $(OCAMLCFLAGS)
 
 # These should be in alphabetical order. 
 OCAMLPACKAGES = -package unix,num,camlp4.lib,calendar,rpc
 
 OCAMLCFLAGS = -g -warn-error CDEFLMPSUVYZX $(OCAMLPACKAGES)
 OCAMLOPTFLAGS = $(OCAMLCFLAGS)
 
 # These should be in alphabetical order. 
+#
+# NB. whenproto_aux.{ml,mli} are not included here.  These generated
+# files are not compatible across different versions of ocamlnet, so
+# must not be included in the tarball and should be regenerated by the
+# user each time.
 SOURCES = \
        config.ml \
        config.mli \
 SOURCES = \
        config.ml \
        config.mli \
+       whenexpr.ml \
+       whenexpr.mli \
        whenfile.ml \
        whenfile.mli \
        whenlock.ml \
        whenlock.mli \
        whenfile.ml \
        whenfile.mli \
        whenlock.ml \
        whenlock.mli \
-       whenproto_aux.ml \
-       whenproto_aux.mli \
-       whenutils.mli \
-       whenutils.ml
-
+       whenstate.ml \
+       whenstate.mli \
+       whentools.ml \
+       whentools.mli \
+       whenutils.ml \
+       whenutils.mli
+
+# In alphabetical order.
 CMI_FILES = \
        config.cmi \
 CMI_FILES = \
        config.cmi \
+       whenexpr.cmi \
        whenfile.cmi \
        whenlock.cmi \
        whenproto_aux.cmi \
        whenfile.cmi \
        whenlock.cmi \
        whenproto_aux.cmi \
+       whenstate.cmi \
+       whentools.cmi \
        whenutils.cmi
 
 # In dependency order.
        whenutils.cmi
 
 # In dependency order.
@@ -50,9 +67,14 @@ OBJECTS = \
        config.cmo \
        whenproto_aux.cmo \
        whenutils.cmo \
        config.cmo \
        whenproto_aux.cmo \
        whenutils.cmo \
+       whenexpr.cmo \
+       whenstate.cmo \
        whenfile.cmo \
        whenfile.cmo \
+       whentools.cmo \
        whenlock.cmo
 
        whenlock.cmo
 
+XOBJECTS = $(OBJECTS:.cmo=.cmx)
+
 # Library.
 noinst_LIBRARIES = liblibrary.a
 liblibrary_a_SOURCES = flock.c
 # Library.
 noinst_LIBRARIES = liblibrary.a
 liblibrary_a_SOURCES = flock.c
@@ -61,6 +83,9 @@ liblibrary_a_CFLAGS = -I$(shell $(OCAMLC) -where)
 whenlib.cma: $(OBJECTS) liblibrary.a
        $(OCAMLFIND) c -a $(OCAMLCFLAGS) $(OBJECTS) -cclib -llibrary -o $@
 
 whenlib.cma: $(OBJECTS) liblibrary.a
        $(OCAMLFIND) c -a $(OCAMLCFLAGS) $(OBJECTS) -cclib -llibrary -o $@
 
+whenlib.cmxa: $(XOBJECTS) liblibrary.a
+       $(OCAMLFIND) opt -a $(OCAMLOPTFLAGS) $(XOBJECTS) -cclib -llibrary -o $@
+
 whenproto_aux.ml whenproto_aux.mli: whenproto.x
        $(OCAMLRPCGEN) -int int32 -hyper int64 -aux $<
 
 whenproto_aux.ml whenproto_aux.mli: whenproto.x
        $(OCAMLRPCGEN) -int int32 -hyper int64 -aux $<