/daemon/wrappid
/depcomp
/examples/remote
-/generator-lib/config.ml
+/generator/config.ml
/generator/generator
/generator/stamp-generator
/install-sh
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-OCAMLCFLAGS = -g -warn-error CDEFLMPSUVYZX -I +camlp4 -I ../generator-lib
+OCAMLCFLAGS = -g -warn-error CDEFLMPSUVYZX -I +camlp4 -I ../generator
OCAMLOPTFLAGS = $(OCAMLCFLAGS)
-PP = -pp '$(CAMLP4O) ../generator-macros/pa_wrap.cmo -impl'
+PP = -pp '$(CAMLP4O) ../generator/pa_wrap.cmo -impl'
API_FILES = $(wildcard *.api)
OBJECTS = $(patsubst %.api,%.cmo,$(API_FILES))
-noinst_SCRIPTS = apis.cma
-
-apis.cma: $(OBJECTS) ../generator-lib/generator_lib.cma
+# Note this target is built by a recursive call from generator/Makefile.am.
+apis.cma: $(OBJECTS) ../generator/generator_lib.cma
$(OCAMLFIND) ocamlc -linkall -a $(OBJECTS) -o apis.cma
-%.cmo: %.api ../generator-lib/generator_lib.cma ../generator-macros/pa_wrap.cmo
+%.cmo: %.api ../generator/generator_lib.cma ../generator/pa_wrap.cmo
$(OCAMLFIND) ocamlc $(OCAMLOPTFLAGS) $(PP) -impl $< -c -o $@
CLEANFILES = *.cmi *.cmo *.cmx *.cma *.cmxa *~
# wrappi
-# Copyright (C) 2011 Red Hat Inc.
+# Copyright (C) 2011-2012 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
ACLOCAL_AMFLAGS = -I m4
-# The API files are actually linked into the generator, but an extra
-# camlp4-based preprocessor must be compiled first before we can
-# compile the rest of the generator. Hence the rather convoluted set
-# of subdirectories here.
-SUBDIRS = generator-lib generator-macros APIs generator
+SUBDIRS = generator APIs
# The C library.
SUBDIRS += lib
daemon/Makefile
examples/Makefile
generator/Makefile
- generator-lib/config.ml
- generator-lib/Makefile
- generator-macros/Makefile
+ generator/config.ml
lib/Makefile])
AC_OUTPUT
+++ /dev/null
-config.cmo:
-config.cmx:
-wrappi_accumulator.cmi: wrappi_types.cmi
-wrappi_accumulator.cmo: wrappi_utils.cmi wrappi_types.cmi wrappi_accumulator.cmi
-wrappi_accumulator.cmx: wrappi_utils.cmx wrappi_types.cmx wrappi_accumulator.cmi
-wrappi_types.cmi: wrappi_utils.cmi
-wrappi_types.cmo: wrappi_utils.cmi wrappi_types.cmi
-wrappi_types.cmx: wrappi_utils.cmx wrappi_types.cmi
-wrappi_utils.cmi:
-wrappi_utils.cmo: wrappi_utils.cmi
-wrappi_utils.cmx: wrappi_utils.cmi
+++ /dev/null
-# wrappi
-# Copyright (C) 2011 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-OCAMLPACKAGES = -package unix,camlp4.lib
-
-OCAMLCFLAGS = \
- -g -warn-error CDEFLMPSUVYZX \
- $(OCAMLPACKAGES)
-OCAMLOPTFLAGS = $(OCAMLCFLAGS)
-
-# In alphabetical order.
-SOURCES = \
- config.ml \
- wrappi_accumulator.mli \
- wrappi_accumulator.ml \
- wrappi_types.mli \
- wrappi_types.ml \
- wrappi_utils.mli \
- wrappi_utils.ml
-
-# In dependency order.
-OBJECTS = \
- config.cmo \
- wrappi_utils.cmo \
- wrappi_types.cmo \
- wrappi_accumulator.cmo
-
-noinst_SCRIPTS = generator_lib.cma
-
-generator_lib.cma: $(OBJECTS)
- $(OCAMLFIND) ocamlc -a $^ -o generator_lib.cma
-
-%.cmi: %.mli
- $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $@
-%.cmo: %.ml
- $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $@
-%.cmx: %.ml
- $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) -c $< -o $@
-
-CLEANFILES = *.cmi *.cmo *.cmx *.cma *.cmxa *~
-
-depend: .depend
-
-.depend: $(SOURCES)
- rm -f $@ $@-t
- $(OCAMLFIND) ocamldep $^ | \
- $(SED) -e 's/ *$$//' | \
- $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \
- LANG=C sort > $@-t
- mv $@-t $@
-
-include .depend
-
-SUFFIXES = .cmo .cmi .cmx .ml .mli .mll .mly
+++ /dev/null
-pa_wrap.cmo:
-pa_wrap.cmx:
+++ /dev/null
-# wrappi
-# Copyright (C) 2011 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-OCAMLPACKAGES = -package unix,camlp4.lib
-
-OCAMLCFLAGS = \
- -g -warn-error CDEFLMPSUVYZX \
- -I ../generator-lib $(OCAMLPACKAGES)
-OCAMLOPTFLAGS = $(OCAMLCFLAGS)
-
-noinst_SCRIPTS = pa_wrap.cmo
-
-pa_wrap.cmo: pa_wrap.ml ../generator-lib/generator_lib.cma
- $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) \
- -linkpkg generator_lib.cma \
- -pp $(CAMLP4OF) \
- -c $< -o $@
-
-%.cmi: %.mli
- $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $@
-%.cmo: %.ml
- $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $@
-%.cmx: %.ml
- $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) -c $< -o $@
-
-CLEANFILES = *.cmi *.cmo *.cmx *~
-
-depend: .depend
-
-.depend: $(wildcard *.mli) $(wildcard *.ml)
- rm -f $@ $@-t
- $(OCAMLFIND) ocamldep -pp $(CAMLP4OF) $^ | \
- $(SED) -e 's/ *$$//' | \
- $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \
- LANG=C sort > $@-t
- mv $@-t $@
-
-include .depend
-
-SUFFIXES = .cmo .cmi .cmx .ml .mli .mll .mly
+config.cmo:
+config.cmx:
+wrappi_accumulator.cmi: wrappi_types.cmi
+wrappi_accumulator.cmo: wrappi_utils.cmi wrappi_types.cmi wrappi_accumulator.cmi
+wrappi_accumulator.cmx: wrappi_utils.cmx wrappi_types.cmx wrappi_accumulator.cmi
wrappi_boilerplate.cmi:
wrappi_boilerplate.cmo: wrappi_pr.cmi wrappi_boilerplate.cmi
wrappi_boilerplate.cmx: wrappi_pr.cmx wrappi_boilerplate.cmi
-wrappi_c.cmi:
-wrappi_c.cmo: wrappi_pr.cmi wrappi_boilerplate.cmi wrappi_c.cmi
-wrappi_c.cmx: wrappi_pr.cmx wrappi_boilerplate.cmx wrappi_c.cmi
-wrappi_c_impl.cmi:
-wrappi_c_impl.cmo: wrappi_pr.cmi wrappi_boilerplate.cmi wrappi_c_impl.cmi
-wrappi_c_impl.cmx: wrappi_pr.cmx wrappi_boilerplate.cmx wrappi_c_impl.cmi
-wrappi_c_xdr.cmi:
-wrappi_c_xdr.cmo: wrappi_pr.cmi wrappi_boilerplate.cmi wrappi_c_xdr.cmi
-wrappi_c_xdr.cmx: wrappi_pr.cmx wrappi_boilerplate.cmx wrappi_c_xdr.cmi
-wrappi_enums.cmi:
-wrappi_enums.cmo: wrappi_enums.cmi
-wrappi_enums.cmx: wrappi_enums.cmi
-wrappi_main.cmo: wrappi_structs.cmi wrappi_pr.cmi wrappi_enums.cmi wrappi_c_xdr.cmi wrappi_c_impl.cmi wrappi_c.cmi
-wrappi_main.cmx: wrappi_structs.cmx wrappi_pr.cmx wrappi_enums.cmx wrappi_c_xdr.cmx wrappi_c_impl.cmx wrappi_c.cmx
+wrappi_c.cmi: wrappi_types.cmi
+wrappi_c.cmo: wrappi_utils.cmi wrappi_types.cmi wrappi_pr.cmi wrappi_boilerplate.cmi wrappi_c.cmi
+wrappi_c.cmx: wrappi_utils.cmx wrappi_types.cmx wrappi_pr.cmx wrappi_boilerplate.cmx wrappi_c.cmi
+wrappi_c_impl.cmi: wrappi_types.cmi
+wrappi_c_impl.cmo: wrappi_utils.cmi wrappi_types.cmi wrappi_pr.cmi wrappi_boilerplate.cmi wrappi_c_impl.cmi
+wrappi_c_impl.cmx: wrappi_utils.cmx wrappi_types.cmx wrappi_pr.cmx wrappi_boilerplate.cmx wrappi_c_impl.cmi
+wrappi_c_xdr.cmi: wrappi_types.cmi
+wrappi_c_xdr.cmo: wrappi_utils.cmi wrappi_types.cmi wrappi_pr.cmi wrappi_boilerplate.cmi wrappi_c_xdr.cmi
+wrappi_c_xdr.cmx: wrappi_utils.cmx wrappi_types.cmx wrappi_pr.cmx wrappi_boilerplate.cmx wrappi_c_xdr.cmi
+wrappi_enums.cmi: wrappi_types.cmi
+wrappi_enums.cmo: wrappi_utils.cmi wrappi_types.cmi wrappi_enums.cmi
+wrappi_enums.cmx: wrappi_utils.cmx wrappi_types.cmx wrappi_enums.cmi
+wrappi_main.cmo: wrappi_utils.cmi wrappi_types.cmi wrappi_structs.cmi wrappi_pr.cmi wrappi_enums.cmi wrappi_c_xdr.cmi wrappi_c_impl.cmi wrappi_c.cmi wrappi_accumulator.cmi config.cmo
+wrappi_main.cmx: wrappi_utils.cmx wrappi_types.cmx wrappi_structs.cmx wrappi_pr.cmx wrappi_enums.cmx wrappi_c_xdr.cmx wrappi_c_impl.cmx wrappi_c.cmx wrappi_accumulator.cmx config.cmx
wrappi_pr.cmi:
-wrappi_pr.cmo: wrappi_pr.cmi
-wrappi_pr.cmx: wrappi_pr.cmi
-wrappi_structs.cmi:
-wrappi_structs.cmo: wrappi_structs.cmi
-wrappi_structs.cmx: wrappi_structs.cmi
+wrappi_pr.cmo: wrappi_utils.cmi wrappi_pr.cmi
+wrappi_pr.cmx: wrappi_utils.cmx wrappi_pr.cmi
+wrappi_structs.cmi: wrappi_types.cmi
+wrappi_structs.cmo: wrappi_utils.cmi wrappi_types.cmi wrappi_structs.cmi
+wrappi_structs.cmx: wrappi_utils.cmx wrappi_types.cmx wrappi_structs.cmi
+wrappi_types.cmi: wrappi_utils.cmi
+wrappi_types.cmo: wrappi_utils.cmi wrappi_types.cmi
+wrappi_types.cmx: wrappi_utils.cmx wrappi_types.cmi
+wrappi_utils.cmi:
+wrappi_utils.cmo: wrappi_utils.cmi
+wrappi_utils.cmx: wrappi_utils.cmi
# wrappi
-# Copyright (C) 2011 Red Hat Inc.
+# Copyright (C) 2011-2012 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
OCAMLCFLAGS = \
-g -warn-error CDEFLMPSUVYZX \
- -I ../generator-lib $(OCAMLPACKAGES)
+ $(OCAMLPACKAGES)
OCAMLOPTFLAGS = $(OCAMLCFLAGS)
# In alphabetical order.
SOURCES = \
+ config.ml \
+ wrappi_accumulator.mli \
+ wrappi_accumulator.ml \
wrappi_boilerplate.mli \
wrappi_boilerplate.ml \
wrappi_c_impl.mli \
wrappi_pr.mli \
wrappi_pr.ml \
wrappi_structs.mli \
- wrappi_structs.ml
+ wrappi_structs.ml \
+ wrappi_types.mli \
+ wrappi_types.ml \
+ wrappi_utils.mli \
+ wrappi_utils.ml
+# The difference between LIB_OBJECTS and OBJECTS is just that
+# functions and types in LIB_OBJECTS can be used in pa_wrap and in the
+# code generated from the API objects (../APIs/*.api). LIB_OBJECTS
+# are built into generator_lib.cma which is linked to pa_wrap, and to
+# the APIs, and into the generator.
+#
# In dependency order.
+LIB_OBJECTS = \
+ config.cmo \
+ wrappi_utils.cmo \
+ wrappi_types.cmo \
+ wrappi_accumulator.cmo
+
OBJECTS = \
wrappi_pr.cmo \
wrappi_boilerplate.cmo \
wrappi_c.cmo \
wrappi_main.cmo
-noinst_SCRIPTS = generator
+noinst_SCRIPTS = generator_lib.cma pa_wrap.cmo generator
+
+generator_lib.cma: $(LIB_OBJECTS)
+ $(OCAMLFIND) ocamlc -a $^ -o $@
-generator: $(OBJECTS) ../generator-lib/generator_lib.cma ../APIs/apis.cma
- $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -linkpkg \
- ../generator-lib/generator_lib.cma ../APIs/apis.cma \
- $(OBJECTS) \
+pa_wrap.cmo: pa_wrap.ml generator_lib.cma
+ $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) \
+ -linkpkg generator_lib.cma \
+ -pp $(CAMLP4OF) \
+ -c $< -o $@
+
+generator: generator_lib.cma $(OBJECTS) ../APIs/apis.cma
+ $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) \
+ -linkpkg generator_lib.cma ../APIs/apis.cma $(OBJECTS) \
-o $@
-%.cmi: %.mli ../generator-lib/generator_lib.cma
+../APIs/apis.cma: generator_lib.cma pa_wrap.cmo
+ $(MAKE) -C ../APIs apis.cma
+
+%.cmi: %.mli
$(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $@
%.cmo: %.ml
$(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $@
include .depend
-CLEANFILES = *.cmi *.cmo *.cmx *~ generator
+CLEANFILES = *.cmi *.cmo *.cmx *.cma *.cmxa *~ generator
SUFFIXES = .cmo .cmi .cmx .ml .mli .mll .mly
(* wrappi
- * Copyright (C) 2011 Red Hat Inc.
+ * Copyright (C) 2011-2012 Red Hat Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by