X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=generator%2FMakefile.am;h=469265b66e43b08a4588877d17fef25ac92b3a10;hp=919fb5025024d7d9eb7494a1231e3ec6541c8600;hb=d859c283c469b9d9124d90d0ac32024671372ed5;hpb=b42262c3db6013c363e2532cf7a466ccaf4d49f0 diff --git a/generator/Makefile.am b/generator/Makefile.am index 919fb50..469265b 100644 --- a/generator/Makefile.am +++ b/generator/Makefile.am @@ -44,6 +44,7 @@ SOURCES = \ generator_csharp.ml \ generator_php.ml \ generator_bindtests.ml \ + generator_errnostring.ml \ generator_main.ml SOURCES_ML = $(filter %.ml,$(SOURCES)) @@ -56,6 +57,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 +77,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.