ocamlbricks-0.90+bzr400.orig/ 0000700 0001750 0001750 00000000000 12356732461 014706 5 ustar lucas lucas ocamlbricks-0.90+bzr400.orig/Makefile.local 0000600 0001750 0001750 00000013332 12356732460 017442 0 ustar lucas lucas # This -*- makefile -*- is part of our reusable OCaml BRICKS library
# Copyright (C) 2008, 2011 Luca Saiu
# Copyright (C) 2008, 2010, 2011 Jean-Vincent Loddo
# Copyright (C) 2008, 2010, 2011 Université Paris 13
# 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, see .
# BYTE_COMPILE_OPTIONS += -custom -ccopt -L./ -cclib -L./
COMPILE_OPTIONS += -g -thread
DIRECTORIES_TO_INCLUDE = threads lablgtk2 camlp4
LIBRARIES_TO_LINK = str unix threads lablgtk
NATIVE_PROGRAMS += mutexExtra_test.native
BYTE_PROGRAMS += mutexExtra_test.byte
NATIVE_LIBRARY_NAME = ocamlbricks.cmxa
BYTE_LIBRARY_NAME = ocamlbricks.cma
NATIVE_LIBRARIES = $(shell \
if which ocamlopt.opt &>/dev/null || which ocamlopt &>/dev/null;\
then echo $(NATIVE_LIBRARY_NAME); fi)
BYTE_LIBRARIES = $(shell \
if which ocamlc.opt &>/dev/null || which ocamlc &>/dev/null;\
then echo $(BYTE_LIBRARY_NAME); fi)
PP_OPTION = camlp4of
GETTEXT=GETTEXT
C_OBJECTS_TO_LINK = gettext-c-wrapper does-process-exist-c-wrapper waitpid-c-wrapper
OTHER_LIBRARY_FILES_TO_INSTALL = _build/{gettext-c-wrapper.o,does-process-exist-c-wrapper.o,gettext_extract_pot_p4.cmo,waitpid-c-wrapper.o,include_type_definitions_p4.cmo,include_as_string_p4.cmo,where_p4.cmo,option_extract_p4.cmo,raise_p4.cmo,log_module_loading_p4.cmo}
MANUALLY_PRE_COPY_IN_build = \
GETTEXT/gettext_extract_pot_p4.ml{,i} \
GETTEXT/gettext-c-wrapper.c \
EXTRA/does-process-exist-c-wrapper.c \
EXTRA/waitpid-c-wrapper.c \
CAMLP4/include_type_definitions_p4.ml{,i} \
CAMLP4/include_as_string_p4.ml{,i} \
CAMLP4/where_p4.ml{,i} \
CAMLP4/option_extract_p4.ml{,i} \
CAMLP4/common_tools_for_preprocessors.ml{,i} \
CAMLP4/raise_p4.ml{,i} \
CAMLP4/log_module_loading_p4.ml{,i}
MANUALLY_PRE_MAKE_IN_build = \
gettext_extract_pot_p4.cm{i,o} \
include_type_definitions_p4.cm{i,o} \
include_as_string_p4.cm{i,o} \
where_p4.cm{i,o} \
option_extract_p4.cm{i,o} \
raise_p4.cm{i,o} \
log_module_loading_p4.cm{i,o} \
libocamlbricks_stubs.a
main-local: meta_ocamlbricks.ml
meta_ocamlbricks.ml: meta.ml
cp $< meta_ocamlbricks.ml
EXCLUDE_FROM_EDITING=meta_ocamlbricks.ml
# include_type_definitions_p4
_build/include_type_definitions_p4.cmi: CAMLP4/include_type_definitions_p4.mli
ocamlc -c -I +camlp4 -pp camlp4of -o $@ $<
_build/include_type_definitions_p4.cmo: CAMLP4/include_type_definitions_p4.ml
ocamlc -c -I +camlp4 -I _build/ -pp camlp4of -o $@ $<
# include_as_string_p4
_build/include_as_string_p4.cmi: CAMLP4/include_as_string_p4.mli
ocamlc -c -I +camlp4 -pp camlp4of -o $@ $<
_build/include_as_string_p4.cmo: CAMLP4/include_as_string_p4.ml
ocamlc -c -I +camlp4 -I _build/ -pp camlp4of -o $@ $<
_build/where_p4.cmi: CAMLP4/where_p4.mli
ocamlc -c -I +camlp4 -pp camlp4of -o $@ $<
_build/where_p4.cmo: CAMLP4/where_p4.ml
ocamlc -c -I +camlp4 -I _build/ -pp camlp4of -o $@ $<
_build/option_extract_p4.cmi: CAMLP4/option_extract_p4.mli
ocamlc -c -I +camlp4 -I _build/ -pp camlp4of -o $@ $<
_build/option_extract_p4.cmo: CAMLP4/option_extract_p4.ml
ocamlc -c -I +camlp4 -I _build/ -pp camlp4of -o $@ $<
_build/raise_p4.cmi: CAMLP4/raise_p4.mli
ocamlc -c -I +camlp4 -I _build/ -pp camlp4of -o $@ $<
_build/raise_p4.cmo: CAMLP4/raise_p4.ml
ocamlc -c -I +camlp4 -I _build/ -pp camlp4of -o $@ $<
_build/log_module_loading_p4.cmi: CAMLP4/log_module_loading_p4.mli
ocamlc -c -I +camlp4 -I _build/ -pp camlp4of -o $@ $<
_build/log_module_loading_p4.cmo: CAMLP4/log_module_loading_p4.ml
ocamlc -c -I +camlp4 -I _build/ -pp camlp4of -o $@ $<
# gettext_extract_pot_p4
_build/gettext_extract_pot_p4.cmi: $(GETTEXT)/gettext_extract_pot_p4.mli
ocamlc -c -I +camlp4 -pp camlp4of camlp4lib.cma -o $@ $<
_build/gettext_extract_pot_p4.cmo: $(GETTEXT)/gettext_extract_pot_p4.ml
ocamlc -c -I +camlp4 -I _build/ -pp camlp4of camlp4lib.cma -o $@ $<
_build/libocamlbricks_stubs.a: $(GETTEXT)/gettext-c-wrapper.c EXTRA/does-process-exist-c-wrapper.c EXTRA/waitpid-c-wrapper.c
@(mkdir _build &> /dev/null || true); \
cd _build; \
ocamlc -c -verbose $(GETTEXT)/gettext-c-wrapper.c; \
ocamlc -c -verbose EXTRA/does-process-exist-c-wrapper.c; \
ocamlc -c -verbose EXTRA/waitpid-c-wrapper.c; \
ocamlmklib -verbose -oc ocamlbricks_stubs gettext-c-wrapper.o does-process-exist-c-wrapper.o waitpid-c-wrapper.o
# idempotent
rebuilding:
@chmod +x Makefile.d/ocamlmklib_wrapper.sh
@Makefile.d/ocamlmklib_wrapper.sh $(C_OBJECTS_TO_LINK)
preprocessors: _build/gettext_extract_pot_p4.cmo
install-libraries-local: rebuilding preprocessors
# Remove the automatically-generated documentation on clean:
clean-local:
@(rm -rf doc/html)
rm -f meta_ocamlbrics.ml _build/meta_ocamlbrics.ml
rm -rf _build/does_process_exist.o
rm -rf _build/waitpid-c-wrapper.o
compile_for_testing:
@if grep -q "DDOCUMENTATION_OR_DEBUGGING" $(LOGFILE); then echo "Fine, already compiled for testing."; else make clean; fi; \
make PP_OPTION="$(PP_OPTION) -DDOCUMENTATION_OR_DEBUGGING"
# Test without installation
LIBRARY_TO_TEST=_build/ocamlbricks.cma
test: compile_for_testing rebuilding
@chmod +x Makefile.d/test_with.sh
@Makefile.d/test_with.sh "ocaml"
# Test without installation with the utop toplevel
test_with_utop: compile_for_testing rebuilding
@chmod +x Makefile.d/test_with.sh
@Makefile.d/test_with.sh "utop"
ocamlbricks-0.90+bzr400.orig/meta_ocamlbricks.mli 0000600 0001750 0001750 00000000523 12356732460 020711 0 ustar lucas lucas val name : string
val version : string
val prefix : string
val ocaml_libraryprefix : string
val libraryprefix : string
val configurationprefix : string
val localeprefix : string
val documentationprefix : string
val uname : string
val build_date : string
val revision : string
val source_date : string
val source_date_utc_yy_mm_dd : string
ocamlbricks-0.90+bzr400.orig/MAKE/ 0000700 0001750 0001750 00000000000 12356732460 015422 5 ustar lucas lucas ocamlbricks-0.90+bzr400.orig/MAKE/crep.ml 0000600 0001750 0001750 00000002371 12356732460 016712 0 ustar lucas lucas (* This file is part of our reusable OCaml BRICKS library
Copyright (C) 2007 Jean-Vincent Loddo
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, see . *)
(** This simple program run as the famous {b grep} command but taking a regular expression in the [Str] O'Caml library format.
The regular expression must be given as the first and unique argument. The parsed file is the standard input. *)
let main () =
let re = Str.regexp (Sys.argv.(1)) in
let rec boucle () =
try begin
let line = read_line () in
(match Str.string_match re line 0 with
| true -> print_endline line
| false -> ());
boucle ()
end with End_of_file -> ()
in boucle ()
;;
main ()
;;
ocamlbricks-0.90+bzr400.orig/configure 0000600 0001750 0001750 00000002225 12356732460 016614 0 ustar lucas lucas #!/bin/sh
# This file is part of our build system for OCaml projects
# Copyright (C) 2008 Luca Saiu
# 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, see .
# To do: this should be copied to buildsystem/
echo "Sorry, there is no automatic configuration system, as of now."
echo
if [ -e etc ]; then
echo "Now please edit the \"CONFIGME\" file and the files in etc/, using"
echo "your favorite text editor."
else
echo "Now please edit the \"CONFIGME\" file, using your favorite text editor."
fi
# Exit with failure: it should be evident that the configuration is not
# automatic:
exit -1
ocamlbricks-0.90+bzr400.orig/Makefile.d/ 0000700 0001750 0001750 00000000000 12356732460 016644 5 ustar lucas lucas ocamlbricks-0.90+bzr400.orig/Makefile.d/test_with.sh 0000700 0001750 0001750 00000003744 12356732460 021225 0 ustar lucas lucas #!/bin/bash
# This file is part of our reusable OCaml BRICKS library
# Copyright (C) 2013 Jean-Vincent Loddo
# Copyright (C) 2013 Université Paris 13
#
# 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, see .
TOPLEVEL=${1:-utop}
which $TOPLEVEL &>/dev/null || {
echo "Error: $0: $TOPLEVEL not found; install it please."
exit 2
}
FLATTENED_DIRECTORY=_build/_build.flattened
mkdir -p $FLATTENED_DIRECTORY
find _build -path $FLATTENED_DIRECTORY -prune -o -type f -exec cp -fl {} $FLATTENED_DIRECTORY/ \;
PREAMBLE=$(mktemp)
cat > $PREAMBLE </dev/null; then
rlwrap $CMD || CODE=$?
else
echo "Suggestion: install rlwrap for testing with readline (on a debian/ubuntu: apt-get install rlwrap)"
$CMD || CODE=$?
fi
;;
esac
rm -f $PREAMBLE
exit $CODE
ocamlbricks-0.90+bzr400.orig/Makefile.d/doc.sh 0000700 0001750 0001750 00000007474 12356732460 017764 0 ustar lucas lucas #!/bin/bash -e
# This -*- makefile -*- is part of our build system for OCaml projects
# Copyright (C) 2009 Jean-Vincent Loddo
# 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, see .
# Usage:
# doc.sh -pp "$(PP_OPTION)" -e "$(UNDOCUMENTED)" -i $(DIRECTORIES_TO_INCLUDE)
################################
# Set ocamldoc parameters #
################################
UNDOCUMENTED="meta.ml myocamlbuild.ml"
function usage {
echo 'Usage (in a Makefile):'
echo 'doc.sh -pp "$(PP_OPTION)" -e "$(UNDOCUMENTED)" -i $(DIRECTORIES_TO_INCLUDE)'
exit 1
}
set -x
# The first argument may be empty but must be present.
[[ $1 = "-pp" ]] || usage
PP_OPTION=$(echo $2)
if [[ $PP_OPTION != "" ]]; then
PP_OPTION="-pp '$2 -DDOCUMENTATION_OR_DEBUGGING'"
fi
shift 2
[[ $1 = "-e" ]] || usage
UNDOCUMENTED+=" "$(echo $2)
for i in $UNDOCUMENTED; do
UNDOCUMENTED_FILTER+=" -a ! -name $i"
done
shift 2
[[ $1 = "-i" ]] || usage
shift
for i in "$@"; do
INCLUDE_LIBS+=" -I +$i"
done
# ocamldoc parameters:
set -x
SOURCES=$(builtin cd _build/ &>/dev/null && find . \( -name "*.ml" -o -name "*.mli" \) $UNDOCUMENTED_FILTER)
INCLUDES=$(builtin cd _build/ &>/dev/null && find . -type d -printf "-I %p\n")
PROJECT=$(basename $PWD)
set +x
################################
# Make header and footer #
################################
cd _build/
mkdir -p doc/html
# Make header.gif
function enrich_index_html {
which dot || {
echo "Warning: you need dot (graphviz) in order to generated the documentation header.";
return 0
}
# Get user-defined header and footer
[[ -f ../header.html ]] && HEADER_FILE=$(< ../header.html)
[[ -f ../footer.html ]] && FOOTER_FILE=$(< ../footer.html)
[[ -f ../AUTHORS ]] && AUTHORS_FILE=$(< ../AUTHORS)
[[ -f ../AUTHORS ]] && AUTHORS_FILE=$(awk <../AUTHORS '/$/ {print; print "
"; }')
# Make dependencies graph
set -x;
eval ocamldoc $PP_OPTION -dot -d doc/html/ -o doc/html/header0.dot -colorize-code $INCLUDES $INCLUDE_LIBS $SOURCES
set +x
echo 'Ok, the dependencies graph was built with success.'
pushd doc/html >/dev/null
grep -v "rankdir=\|size=\|rotate=" header0.dot > header.dot
dot header.dot -Tgif -o header.gif
HEADER=$(cat <
Project
$PROJECT
Dependencies
License and authors
$HEADER_FILE
EOF
)
FOOTER=$(cat <
Dependencies
$FOOTER_FILE
License and authors
$AUTHORS_FILE
EOF
)
cat index.html | awk -v h="$HEADER" -v f="$FOOTER" '
/^.*<.h1><.center>/ {print h; next}
/^<\/body>/ {print f "