...
 
Commits (3)
all:
clean:
rm -f simple simple.exe *.cmi *.cmo *.cma *.cmx *.o *.a
rm -f simple simple.exe *.cmi *.cmo *.cma *.cmx *.o *.obj *.a *.lib
rm -f err.out
rm -f testdb*
......@@ -113,7 +113,7 @@ num_top.cma: $(NUMTOP_OBJECTS)
$(OCAMLC) -a -o num_top.cma $(NUMTOP_OBJECTS)
clean:
rm -f *.cmi *.cmo *.cma *.cmx *.a *.o *.cmxa \
rm -f *.cmi *.cmo *.cma *.cmx *.a *.lib *.o *.obj *.cmxa \
fl_meta.ml findlib_config.ml findlib.mml topfind.ml topfind \
ocamlfind$(EXEC_SUFFIX) ocamlfind_opt$(EXEC_SUFFIX)
......@@ -121,7 +121,7 @@ install: all
mkdir -p "$(prefix)$(OCAML_SITELIB)/$(NAME)"
mkdir -p "$(prefix)$(OCAMLFIND_BIN)"
test $(INSTALL_TOPFIND) -eq 0 || cp topfind "$(prefix)$(OCAML_CORE_STDLIB)"
files=`$(SH) $(TOP)/tools/collect_files $(TOP)/Makefile.config findlib.cmi findlib.mli findlib.cma findlib.cmxa findlib.a findlib.cmxs topfind.cmi topfind.mli fl_package_base.mli fl_package_base.cmi fl_metascanner.mli fl_metascanner.cmi fl_metatoken.cmi findlib_top.cma findlib_top.cmxa findlib_top.a findlib_top.cmxs findlib_dynload.cma findlib_dynload.cmxa findlib_dynload.a findlib_dynload.cmxs fl_dynload.mli fl_dynload.cmi META` && \
files=`$(SH) $(TOP)/tools/collect_files $(TOP)/Makefile.config findlib.cmi findlib.mli findlib.cma findlib.cmxa findlib$(LIB_SUFFIX) findlib.cmxs topfind.cmi topfind.mli fl_package_base.mli fl_package_base.cmi fl_metascanner.mli fl_metascanner.cmi fl_metatoken.cmi findlib_top.cma findlib_top.cmxa findlib_top$(LIB_SUFFIX) findlib_top.cmxs findlib_dynload.cma findlib_dynload.cmxa findlib_dynload$(LIB_SUFFIX) findlib_dynload.cmxs fl_dynload.mli fl_dynload.cmi META` && \
cp $$files "$(prefix)$(OCAML_SITELIB)/$(NAME)"
f="ocamlfind$(EXEC_SUFFIX)"; { test -f ocamlfind_opt$(EXEC_SUFFIX) && f="ocamlfind_opt$(EXEC_SUFFIX)"; }; \
cp $$f "$(prefix)$(OCAMLFIND_BIN)/ocamlfind$(EXEC_SUFFIX)"
......
......@@ -1869,6 +1869,12 @@ let create_owner_file pkg file =
exc -> close_out f; raise exc
;;
let trim_cr s =
let len = String.length s in
if len > 0 && String.get s (len-1) = '\r' then
String.sub s 0 (len-1)
else
s
let find_owned_files pkg dir =
let files = Array.to_list(Sys.readdir dir) in
......@@ -1886,7 +1892,7 @@ let find_owned_files pkg dir =
let f =
Unix.in_channel_of_descr fd in
try
let line = input_line f in
let line = trim_cr (input_line f) in
let is_my_file = (line = pkg) in
close_in f;
is_my_file
......