NAME = http_getter
REQUIRES = helm-getter helm-logger helm-registry
-COMMONOPTS = -package "$(REQUIRES)" -pp camlp4o
+COMMONOPTS = -package "$(REQUIRES)" -pp camlp4o -thread
OCAMLFIND = ocamlfind
OCAMLC = $(OCAMLFIND) ocamlc -g $(COMMONOPTS)
OCAMLOPT = $(OCAMLFIND) opt $(COMMONOPTS)
opt: $(NAME).opt
world: byte opt
-$(NAME): main.ml
- $(OCAMLC) -linkpkg -thread -o $@ $^
-$(NAME).opt: main.ml
- $(OCAMLOPT) -linkpkg -thread -o $@ $^
+$(NAME): buildTimeOpts.cmo main.ml
+ $(OCAMLC) -linkpkg -o $@ $^
+$(NAME).opt: buildTimeOpts.cmx main.ml
+ $(OCAMLOPT) -linkpkg -o $@ $^
+
+%.cmo: %.ml
+ $(OCAMLC) -c $<
+%.cmx: %.ml
+ $(OCAMLOPT) -c $<
distclean: clean
+ rm -f buildTimeOpts.ml
clean:
rm -f *.cm[aiox] *.o $(NAME){,.opt} *.dot
--- /dev/null
+AC_INIT(main.ml)
+
+AC_ARG_WITH(conffile,
+ AS_HELP_STRING([--with-conffile=fname],
+ [set default run time configuration file (default is /etc/http_getter.conf.xml]),
+ [GETTER_CONF_FILE=$withval], [GETTER_CONF_FILE=/etc/http_getter.conf.xml])
+
+AC_SUBST(GETTER_CONF_FILE)
+
+AC_OUTPUT([
+ buildTimeOpts.ml
+])
+
(* constants *)
-(* let configuration_file = "/projects/helm/etc/http_getter.conf.xml" *)
-let configuration_file = "http_getter.conf.xml"
+let configuration_file = BuildTimeOpts.conffile
let common_headers = [
"Cache-Control", "no-cache";