git.annexia.org
/
libguestfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2fbac04
)
generator: Provide no-op generator if no OCaml compiler.
author
Richard Jones
<rjones@redhat.com>
Sat, 11 Sep 2010 12:20:59 +0000
(13:20 +0100)
committer
Richard Jones
<rjones@redhat.com>
Sat, 11 Sep 2010 12:42:00 +0000
(13:42 +0100)
generator/Makefile.am
patch
|
blob
|
history
diff --git
a/generator/Makefile.am
b/generator/Makefile.am
index
919fb50
..
f6dfd6b
100644
(file)
--- a/
generator/Makefile.am
+++ b/
generator/Makefile.am
@@
-56,6
+56,8
@@
OCAMLCLIBS = xml-light.cma unix.cma str.cma
noinst_PROGRAM = generator
noinst_PROGRAM = generator
+if HAVE_OCAML
+
generator: $(OBJECTS)
$(OCAMLC) -o generator $(OCAMLCFLAGS) $(OCAMLCLIBS) $(OBJECTS)
generator: $(OBJECTS)
$(OCAMLC) -o generator $(OCAMLCFLAGS) $(OCAMLCLIBS) $(OBJECTS)
@@
-74,6
+76,20
@@
depend: .depend
include .depend
include .depend
+else
+
+# No OCaml compiler. Just replace the generator with a script that
+# touches stamp-generator and prints a warning.
+
+generator: $(SOURCES)
+ rm -f $@ $@-t
+ echo 'echo Warning: Install OCaml compiler in order to rebuild the generated files.' >> $@-t
+ echo 'touch generator/stamp-generator' >> $@-t
+ chmod +x $@-t
+ mv $@-t $@
+
+endif
+
noinst_DATA = stamp-generator
# Run the generator.
noinst_DATA = stamp-generator
# Run the generator.