Permalink
Browse files

Removed lib/compilation.ml

  • Loading branch information...
sagotch committed Feb 1, 2019
1 parent 44dfd49 commit f93ab02d117effdd1b49490cf566cf0bddf9d31f
@@ -119,22 +119,12 @@ lib/gwlib.ml:
echo " try Sys.getenv \"GWPREFIX\"" >> $@
echo " with Not_found -> \"$(PREFIX)\"" | sed -e 's|\\|/|g' >> $@

lib/compilation.ml:
echo "let scan_dmy s =" > $@
echo "let open Adef in" >> $@
echo "Scanf.sscanf s \"%d %d %d\" @@ fun day month year ->" >> $@
echo "Dgreg({day;month;year;prec=Sure;delta=0},Dgregorian)" >> $@
echo "let compilation_time = scan_dmy \"$$(date "+%d %m %Y")\"" >> $@
echo "let commit = \"$$(git show -s --pretty=format:%h)\"" >> $@
echo "let commit_date = scan_dmy \"$$(git show -s --pretty=format:%cd --date=format:'%d %m %Y')\"" >> $@
.PHONY:lib/compilation.ml

%/dune: %/dune.in
sed -e "s/%%%API%%%/$(API)/g" -e "s/%%%API_DEP%%%/$(API_DEP)/g" $< > $@

###### [End] Generated files section

GENERATED_FILES_DEP = lib/gwlib.ml $(CAMLP5_FILES:=.ml) lib/dune lib/compilation.ml
GENERATED_FILES_DEP = lib/gwlib.ml $(CAMLP5_FILES:=.ml) lib/dune

ifdef API
piqi:
@@ -3673,8 +3673,6 @@ let speclist =
["-o", Arg.String (fun s -> out_file := s),
"<file>\n Output database (default: \"a\").";
"-f", Arg.Set force, "\n Remove database if already existing";
"-version", Arg.Unit Util.print_version_commit,
"\n Print version and commit numbers";
"-log", Arg.String (fun s -> log_oc := open_out s),
"<file>\n Redirect log trace to this file.";
"-lf", Arg.Set lowercase_first_names,
@@ -3116,8 +3116,6 @@ let speclist =
["-o", Arg.String (fun s -> out_file := s),
"<file>\n Output database (default: \"a\").";
"-f", Arg.Set force, "\n Remove database if already existing";
"-version", Arg.Unit Util.print_version_commit,
"\n Print version and commit numbers";
"-log", Arg.String (fun s -> log_oc := open_out s),
"<file>\n Redirect log trace to this file.";
"-lf", Arg.Set lowercase_first_names,
@@ -792,7 +792,6 @@ let speclist =
"-nopicture", Arg.Set no_picture, ": Don't extract individual picture.";
"-picture-path", Arg.Set picture_path, ": Extract pictures path.";
"-indexes", Arg.Set with_indexes, ": Export indexes in gedcom.";
"-version", Arg.Unit Util.print_version_commit, ": print version and commit numbers.";
"-c", Arg.Int (fun i -> censor := i),
"<num> :\n \
When a person is born less than <num> years ago, it is not exported \
@@ -93,7 +93,6 @@ let speclist =
"-nopicture", Arg.Set Gwcomp.no_picture,
" do not create associative pictures";
"-q", Arg.Clear Mutil.verbose, " no verbose";
"-version", Arg.Unit Util.print_version_commit, " print version and commit numbers";
"-v", Arg.Set Mutil.verbose, " verbose"]

let anonfun x =
@@ -116,7 +116,6 @@ let speclist =
"-nopicture", Arg.Set Gwcomp.no_picture,
" do not create associative pictures";
"-q", Arg.Clear Mutil.verbose, " no verbose";
"-version", Arg.Unit Util.print_version_commit, " print version and commit numbers";
"-v", Arg.Set Mutil.verbose, " verbose"]

let anonfun x =
@@ -17,8 +17,6 @@ let speclist =
"-i", Arg.Set indexes, ": build the indexes again";
"-t", Arg.Int (fun i -> tlim := i), " <int>: time limit in seconds";
"-scratch", Arg.Set scratch, ": from scratch";
"-version", Arg.Unit Util.print_version_commit,
": Print version and commit numbers";
"-mem", Arg.Set Outbase.save_mem,
": Save memory, but slower when rewritting database";
"-nolock", Arg.Set Lock.no_lock_flag, ": do not lock database."]
@@ -7,9 +7,7 @@ open Gwdb
let fname = ref ""

let errmsg = "usage: " ^ Sys.argv.(0) ^ " [options] <file_name>"
let speclist = [
"-version", Arg.Unit Util.print_version_commit, " print version and commit numbers"
]
let speclist = []
let anonfun s =
if !fname = "" then fname := s
else raise (Arg.Bad "Cannot treat several databases")
@@ -1883,8 +1883,6 @@ let main ~speclist () =
Print the failed passwords in log (except if option -digest is set) ") ::
("-nolock", Arg.Set Lock.no_lock_flag,
"\n Do not lock files before writing.") ::
("-version", Arg.Unit Util.print_version_commit,
"\n Print version and commit number.") ::
(if Sys.unix then
( "-max_clients"
, Arg.Int (fun x -> max_clients := Some x)
@@ -1905,8 +1905,6 @@ module Make (Select : Select) =
"-odir", Arg.String (fun s -> out_dir := s),
"<dir> create files from original name in directory (else on -o file)";
"-mem", Arg.Set mem, " save memory space, but slower";
"-version", Arg.Unit Util.print_version_commit,
": Print version and commit numbers";
"-a", Arg.String (fun s -> anc_1st := s; arg_state := ASwaitAncOcc),
"\"<1st_name>\" [num] \"<surname>\" : select ancestors of...";
"-d", Arg.String (fun s -> desc_1st := s; arg_state := ASwaitDescOcc),
@@ -3557,10 +3557,6 @@ let rec rev_iter fn = function
| [] -> ()
| hd :: tl -> let () = rev_iter fn tl in fn hd

let print_version_commit () =
Printf.eprintf "GeneWeb %s, commit %s\n" Version.txt Compilation.commit;
exit 0

let groupby ~key ~value list =
let h = Hashtbl.create (List.length list) in
List.iter
@@ -332,11 +332,6 @@ val filter_map : ('a -> 'b option) -> 'a list -> 'b list
*)
val rev_iter : ('a -> unit) -> 'a list -> unit

(** [print_version_commit]
Print geneweb version and commit number on stdout and exit.
*)
val print_version_commit : unit -> unit

(** [group_by ~key ~value list]
Group the elements returning the same key together.
Ordering of elements is unspecified.

0 comments on commit f93ab02

Please sign in to comment.