X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=generator%2FMakefile.am;h=cb0a9878071617bcf40b736a72aae1402570ed37;hp=919fb5025024d7d9eb7494a1231e3ec6541c8600;hb=bf3b9e2e236b4dd2216200993ba39545ad5160bb;hpb=b42262c3db6013c363e2532cf7a466ccaf4d49f0 diff --git a/generator/Makefile.am b/generator/Makefile.am index 919fb50..cb0a987 100644 --- a/generator/Makefile.am +++ b/generator/Makefile.am @@ -23,6 +23,8 @@ SOURCES = \ generator_actions.ml \ generator_structs.mli \ generator_structs.ml \ + generator_api_versions.mli \ + generator_api_versions.ml \ generator_optgroups.ml \ generator_prepopts.mli \ generator_prepopts.ml \ @@ -44,6 +46,7 @@ SOURCES = \ generator_csharp.ml \ generator_php.ml \ generator_bindtests.ml \ + generator_errnostring.ml \ generator_main.ml SOURCES_ML = $(filter %.ml,$(SOURCES)) @@ -51,11 +54,13 @@ OBJECTS = $(SOURCES_ML:.ml=.cmo) EXTRA_DIST = $(SOURCES) -OCAMLCFLAGS = -I +xml-light -I +../pkg-lib/xml-light +OCAMLCFLAGS = -I +xml-light -I +../pkg-lib/xml-light -warn-error CDEFLMPSUVYZX OCAMLCLIBS = xml-light.cma unix.cma str.cma noinst_PROGRAM = generator +if HAVE_OCAML + generator: $(OBJECTS) $(OCAMLC) -o generator $(OCAMLCFLAGS) $(OCAMLCLIBS) $(OBJECTS) @@ -74,6 +79,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.