X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=generator%2FMakefile.am;h=f6dfd6b7d09fefbd7b74c25d44cc01c94423364f;hp=919fb5025024d7d9eb7494a1231e3ec6541c8600;hb=a81bf3f3ef24c8b6d66aea1038f7a16a382ff375;hpb=b42262c3db6013c363e2532cf7a466ccaf4d49f0 diff --git a/generator/Makefile.am b/generator/Makefile.am index 919fb50..f6dfd6b 100644 --- a/generator/Makefile.am +++ b/generator/Makefile.am @@ -56,6 +56,8 @@ OCAMLCLIBS = xml-light.cma unix.cma str.cma noinst_PROGRAM = generator +if HAVE_OCAML + generator: $(OBJECTS) $(OCAMLC) -o generator $(OCAMLCFLAGS) $(OCAMLCLIBS) $(OBJECTS) @@ -74,6 +76,20 @@ depend: .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.