From 320eb376e6e83ef16e49f65fbb29ef256584e0d8 Mon Sep 17 00:00:00 2001 From: pad Date: Wed, 13 Nov 2013 15:59:41 -0800 Subject: [PATCH] make install-findlib for more parsers --- Makefile | 8 ++++++-- lang_cpp/parsing/META | 4 ++++ lang_cpp/parsing/Makefile | 15 ++++++++++----- lang_css/parsing/META | 4 ++++ lang_css/parsing/Makefile | 16 +++++++++++----- lang_html/parsing/META | 4 ++++ lang_html/parsing/Makefile | 15 ++++++++++----- lang_java/parsing/META | 4 ++++ lang_java/parsing/Makefile | 14 ++++++++++---- lang_ml/parsing/META | 4 ++++ lang_ml/parsing/Makefile | 15 ++++++++++----- lang_php/parsing/META | 4 ++++ lang_php/parsing/Makefile | 12 ++++++++++-- 13 files changed, 91 insertions(+), 28 deletions(-) create mode 100644 lang_cpp/parsing/META create mode 100644 lang_css/parsing/META create mode 100644 lang_html/parsing/META create mode 100644 lang_java/parsing/META create mode 100644 lang_ml/parsing/META create mode 100644 lang_php/parsing/META diff --git a/Makefile b/Makefile index e9131237e..144ab793c 100644 --- a/Makefile +++ b/Makefile @@ -475,8 +475,12 @@ uninstall: INSTALL_SUBDIRS= \ - commons h_program-lang matcher \ - lang_js/parsing + commons \ + h_program-lang matcher \ + lang_ml/parsing \ + lang_php/parsing \ + lang_cpp/parsing lang_java/parsing \ + lang_js/parsing lang_css/parsing lang_html/parsing \ LIBNAME=pfff install-findlib:: diff --git a/lang_cpp/parsing/META b/lang_cpp/parsing/META new file mode 100644 index 000000000..a3b8cae02 --- /dev/null +++ b/lang_cpp/parsing/META @@ -0,0 +1,4 @@ +description = "C/C++ parser" +requires = "unix num" +archive(byte) = "lib.cma" +archive(native) = "lib.cmxa" diff --git a/lang_cpp/parsing/Makefile b/lang_cpp/parsing/Makefile index fc0702004..7d9235250 100644 --- a/lang_cpp/parsing/Makefile +++ b/lang_cpp/parsing/Makefile @@ -86,9 +86,14 @@ parsing_hacks_typedef.cmo: parsing_hacks_typedef.ml ############################################################################## -# Generic rules -############################################################################## - -############################################################################## -# Literate Programming rules +# install ############################################################################## +LIBNAME=pfff-lang_cpp +EXPORTSRC=meta_ast_cpp.mli \ + parser_cpp.mli parse_cpp.mli \ + lib_parsing_cpp.mli visitor_cpp.mli \ + +install-findlib: + ocamlfind install $(LIBNAME) META lib.cma lib.cmxa lib.a \ + $(EXPORTSRC) $(EXPORTSRC:%.mli=%.cmi) $(EXPORTSRC:%.mli=%.cmt) \ + ast_cpp.ml ast_cpp.cmi diff --git a/lang_css/parsing/META b/lang_css/parsing/META new file mode 100644 index 000000000..7c9353954 --- /dev/null +++ b/lang_css/parsing/META @@ -0,0 +1,4 @@ +description = "CSS parser" +requires = "unix num" +archive(byte) = "lib.cma" +archive(native) = "lib.cmxa" diff --git a/lang_css/parsing/Makefile b/lang_css/parsing/Makefile index b4f5a53e8..32abaebed 100644 --- a/lang_css/parsing/Makefile +++ b/lang_css/parsing/Makefile @@ -71,11 +71,17 @@ beforedepend:: parser_css.ml parser_css.mli visitor_css.cmo: visitor_css.ml $(OCAMLC) -w y -c $< - ############################################################################## -# Generic rules +# install ############################################################################## +LIBNAME=pfff-lang_css +EXPORTSRC=meta_ast_css.mli \ + parser_css.mli parse_css.mli \ + lib_parsing_css.mli -############################################################################## -# Literate Programming rules -############################################################################## +# visitor_css.mli \ + +install-findlib: + ocamlfind install $(LIBNAME) META lib.cma lib.cmxa lib.a \ + $(EXPORTSRC) $(EXPORTSRC:%.mli=%.cmi) $(EXPORTSRC:%.mli=%.cmt) \ + ast_css.ml ast_css.cmi diff --git a/lang_html/parsing/META b/lang_html/parsing/META new file mode 100644 index 000000000..b11d870d1 --- /dev/null +++ b/lang_html/parsing/META @@ -0,0 +1,4 @@ +description = "HTML parser" +requires = "unix num" +archive(byte) = "lib.cma" +archive(native) = "lib.cmxa" diff --git a/lang_html/parsing/Makefile b/lang_html/parsing/Makefile index dc55b95cb..dfd703e36 100644 --- a/lang_html/parsing/Makefile +++ b/lang_html/parsing/Makefile @@ -80,9 +80,14 @@ visitor_html.cmo: visitor_html.ml ############################################################################## -# Generic rules -############################################################################## - -############################################################################## -# Literate Programming rules +# install ############################################################################## +LIBNAME=pfff-lang_html +EXPORTSRC=meta_ast_html.mli \ + parser_html.mli parse_html.mli \ + lib_parsing_html.mli visitor_html.mli \ + +install-findlib: + ocamlfind install $(LIBNAME) META lib.cma lib.cmxa lib.a \ + $(EXPORTSRC) $(EXPORTSRC:%.mli=%.cmi) $(EXPORTSRC:%.mli=%.cmt) \ + ast_html.ml ast_html.cmi diff --git a/lang_java/parsing/META b/lang_java/parsing/META new file mode 100644 index 000000000..7a36fda59 --- /dev/null +++ b/lang_java/parsing/META @@ -0,0 +1,4 @@ +description = "Java parser" +requires = "unix num" +archive(byte) = "lib.cma" +archive(native) = "lib.cmxa" diff --git a/lang_java/parsing/Makefile b/lang_java/parsing/Makefile index 4556996d3..f84c2d7bc 100644 --- a/lang_java/parsing/Makefile +++ b/lang_java/parsing/Makefile @@ -14,8 +14,6 @@ SRC= flag_parsing_java.ml \ visitor_java.ml \ test_parsing_java.ml unit_parsing_java.ml - - SYSLIBS= str.cma unix.cma LIBS= $(TOP)/commons/lib.cma \ @@ -26,7 +24,6 @@ INCLUDEDIRS= $(TOP)/commons $(TOP)/commons/ocamlextra \ $(TOP)/matcher \ $(TOP)/globals \ - ############################################################################## # Generic variables ############################################################################## @@ -69,5 +66,14 @@ visitor_java.cmo: visitor_java.ml $(OCAMLC) -w y -c $< ############################################################################## -# Generic rules +# install ############################################################################## +LIBNAME=pfff-lang_java +EXPORTSRC=meta_ast_java.mli \ + parser_java.mli parse_java.mli \ + lib_parsing_java.mli visitor_java.mli \ + +install-findlib: + ocamlfind install $(LIBNAME) META lib.cma lib.cmxa lib.a \ + $(EXPORTSRC) $(EXPORTSRC:%.mli=%.cmi) $(EXPORTSRC:%.mli=%.cmt) \ + ast_java.ml ast_java.cmi diff --git a/lang_ml/parsing/META b/lang_ml/parsing/META new file mode 100644 index 000000000..d518509d2 --- /dev/null +++ b/lang_ml/parsing/META @@ -0,0 +1,4 @@ +description = "OCaml parser" +requires = "unix num" +archive(byte) = "lib.cma" +archive(native) = "lib.cmxa" diff --git a/lang_ml/parsing/Makefile b/lang_ml/parsing/Makefile index a17a64fb0..0d16e0bef 100644 --- a/lang_ml/parsing/Makefile +++ b/lang_ml/parsing/Makefile @@ -70,9 +70,14 @@ visitor_ml.cmo: visitor_ml.ml $(OCAMLC) -w y -c $< ############################################################################## -# Generic rules -############################################################################## - -############################################################################## -# Literate Programming rules +# install ############################################################################## +LIBNAME=pfff-lang_ml +EXPORTSRC=meta_ast_ml.mli \ + parser_ml.mli parse_ml.mli \ + lib_parsing_ml.mli visitor_ml.mli \ + +install-findlib: + ocamlfind install $(LIBNAME) META lib.cma lib.cmxa lib.a \ + $(EXPORTSRC) $(EXPORTSRC:%.mli=%.cmi) $(EXPORTSRC:%.mli=%.cmt) \ + ast_ml.ml ast_ml.cmi diff --git a/lang_php/parsing/META b/lang_php/parsing/META new file mode 100644 index 000000000..7d3103a26 --- /dev/null +++ b/lang_php/parsing/META @@ -0,0 +1,4 @@ +description = "PHP parser" +requires = "unix num" +archive(byte) = "lib.cma" +archive(native) = "lib.cmxa" diff --git a/lang_php/parsing/Makefile b/lang_php/parsing/Makefile index 65a1b54bc..55d3c549c 100644 --- a/lang_php/parsing/Makefile +++ b/lang_php/parsing/Makefile @@ -72,10 +72,18 @@ visitor_php.cmo: visitor_php.ml pretty_print_php.cmo: pretty_print_php.ml $(OCAMLC) -w y -c $< - ############################################################################## -# Generic rules +# install ############################################################################## +LIBNAME=pfff-lang_php +EXPORTSRC=meta_ast_php.mli \ + parser_php.mli parse_php.mli \ + lib_parsing_php.mli visitor_php.mli \ + +install-findlib: + ocamlfind install $(LIBNAME) META lib.cma lib.cmxa lib.a \ + $(EXPORTSRC) $(EXPORTSRC:%.mli=%.cmi) $(EXPORTSRC:%.mli=%.cmt) \ + ast_php.ml ast_php.cmi ############################################################################## # Literate Programming rules