Add unpackaged file /usr/bin/goaljobs-memory to spec.
[goaljobs.git] / Makefile.am
index 11d4fbd..7ed61d1 100644 (file)
@@ -25,10 +25,13 @@ EXTRA_DIST = \
        goaljobs_config.ml.in \
        goaljobs.ml \
        goaljobs.mli \
+       goaljobs_memory.ml \
+       goaljobs.pod \
+       goaljobs-reference.pod \
        goaljobs.spec \
        goaljobs.spec.in \
+       html/.gitignore \
        META.in \
-       NOTES \
        pa_goal.ml \
        README \
        TODO
@@ -38,9 +41,10 @@ SUBDIRS = . examples tests
 sources = \
        goaljobs_config.ml \
        goaljobs.ml \
-       goaljobs.mli
+       goaljobs.mli \
+       goaljobs_memory.ml
 
-bin_SCRIPTS = goaljobs
+bin_SCRIPTS = goaljobs goaljobs-memory
 
 # These targets are noinst because we use a custom install hook to
 # install them, and are _SCRIPTS because automake doesn't know how to
@@ -59,6 +63,11 @@ pa_goal.cmo: pa_goal.ml
        $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -package camlp4.lib -linkpkg \
            -pp $(CAMLP4OF) -c $< -o $@
 
+# Standalone program for examining the goaljobs memory.
+goaljobs-memory: goaljobs_config.cmx goaljobs.cmx goaljobs_memory.cmx
+       $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) $(OCAMLOPTPACKAGES) \
+         $^ -linkpkg -o $@
+
 # Install.
 install-data-hook:
        mkdir -p $(DESTDIR)$(OCAMLLIB)
@@ -85,6 +94,28 @@ depend: .depend
 rpm: dist
        rpmbuild -ta $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz
 
+if HAVE_POD2MAN
+
+man_MANS = goaljobs.1 goaljobs-reference.1
+
+goaljobs.1: goaljobs.pod
+       $(POD2MAN) -c "Goaljobs" --release $(PACKAGE)-$(VERSION) $< > $@-t
+       mv $@-t $@
+
+goaljobs-reference.1: goaljobs-reference.pod
+       $(POD2MAN) -c "Goaljobs" --release $(PACKAGE)-$(VERSION) $< > $@-t
+       mv $@-t $@
+
+goaljobs.1.txt: goaljobs.pod
+       pod2text $< > $@-t
+       mv $@-t $@
+
+goaljobs-reference.1.txt: goaljobs-reference.pod
+       pod2text $< > $@-t
+       mv $@-t $@
+
+endif
+
 if HAVE_OCAMLDOC
 
 # HTML library documentation.