From 60b4ddac2c5dcded4c13a47861631aa03c314838 Mon Sep 17 00:00:00 2001 From: Prashanth Mundkur Date: Wed, 6 May 2009 14:59:31 -0700 Subject: [PATCH] some cleanup of standalone build --- OMakefile | 3 +++ gen/json_conv/OMakefile | 6 ++---- gen/json_conv/tests/OMakefile | 6 ++---- gen/rpc/OMakefile | 6 +++--- gen/rpc/tests/OMakefile | 5 ++--- libs/http/OMakefile | 5 ++--- libs/http/tests/OMakefile | 5 ++--- libs/json/OMakefile | 5 ++--- libs/json/parser_tests/OMakefile | 7 ++++--- libs/jsonrpc/OMakefile | 6 ++---- 10 files changed, 24 insertions(+), 30 deletions(-) diff --git a/OMakefile b/OMakefile index c3a0fdd..04ccead 100644 --- a/OMakefile +++ b/OMakefile @@ -1,3 +1,6 @@ + +CLEAN = rm -f *.annot *.cmi *.cmo *.cmxa *.cmx *.o *.a *.opt + JSON_LIB_DIR = $(dir libs/json) JSON_GEN_CONV_DIR = $(dir gen/json_conv) JSON_RPC_LIB_DIR = $(dir libs/jsonrpc) diff --git a/gen/json_conv/OMakefile b/gen/json_conv/OMakefile index 982c926..c33bd91 100644 --- a/gen/json_conv/OMakefile +++ b/gen/json_conv/OMakefile @@ -1,5 +1,3 @@ -.PHONY: clean - GEN_FILES = parser.mli parser.ml lexer.ml OCamlGeneratedFiles($(GEN_FILES)) @@ -17,9 +15,9 @@ JSON_CONV = $(OCamlProgram $(JSON_CONV_PROG), $(CONV_FILES)) .DEFAULT: $(JSON_CONV) +.PHONY: clean clean: - rm -f $(filter-proper-targets $(ls R, .)) *.annot *.cmo + $(CLEAN) $(JSON_CONV) .SUBDIRS: tests -export JSON_CONV_PROG JSON_CONV diff --git a/gen/json_conv/tests/OMakefile b/gen/json_conv/tests/OMakefile index 440dda9..881c00f 100644 --- a/gen/json_conv/tests/OMakefile +++ b/gen/json_conv/tests/OMakefile @@ -1,5 +1,3 @@ -.PHONY: clean - OCAMLFLAGS += -I $(JSON_LIB_DIR) test_types_json_conv.ml: test_types.ml $(JSON_CONV) @@ -18,6 +16,6 @@ TESTER = $(OCamlProgram $(TESTER_PROG), $(TESTER_FILES)) .DEFAULT: $(TESTER) +.PHONY: clean clean: - rm -f $(filter-proper-targets $(ls R, .)) *.annot *.cmo - + $(CLEAN) $(TESTER) diff --git a/gen/rpc/OMakefile b/gen/rpc/OMakefile index c7ace70..77893a0 100644 --- a/gen/rpc/OMakefile +++ b/gen/rpc/OMakefile @@ -1,5 +1,3 @@ -.PHONY: clean - syntax_json_conv.ml: syntax.ml $(JSON_CONV) $(JSON_GEN_CONV_DIR)/$(JSON_CONV_PROG) -i $< -o $@ @@ -19,7 +17,9 @@ GEN_RPC = $(OCamlProgram $(GEN_RPC_PROG), $(GEN_RPC_FILES)) .DEFAULT: $(GEN_RPC) + +.PHONY: clean clean: - rm -f $(filter-proper-targets $(ls R, .)) *.annot *.cmo + $(CLEAN) $(GEN_RPC) syntax_json_conv.ml .SUBDIRS: tests diff --git a/gen/rpc/tests/OMakefile b/gen/rpc/tests/OMakefile index 021a835..fed949d 100644 --- a/gen/rpc/tests/OMakefile +++ b/gen/rpc/tests/OMakefile @@ -1,5 +1,3 @@ -.PHONY: clean - rpc_types_json_conv.ml: rpc_types.ml $(JSON_CONV) $(JSON_GEN_CONV_DIR)/$(JSON_CONV_PROG) -i $< -o $@ @@ -23,6 +21,7 @@ RPC_TEST = $(OCamlProgram $(RPC_TEST_PROG), $(RPC_TEST_FILES)) .DEFAULT: $(RPC_TEST) +.PHONY: clean clean: - rm -f $(filter-proper-targets $(ls R, .)) *.annot *.cmo rpc_defns_client.ml rpc_defns_server.ml + $(CLEAN) $(RPC_TEST) rpc_defns_client.ml rpc_defns_server.ml diff --git a/libs/http/OMakefile b/libs/http/OMakefile index 5f80d3e..ee93055 100644 --- a/libs/http/OMakefile +++ b/libs/http/OMakefile @@ -1,5 +1,3 @@ -.PHONY: clean - HTTP_FILES[] = http @@ -8,7 +6,8 @@ HTTP_LIB = $(OCamlLibrary $(LIB), $(HTTP_FILES)) .DEFAULT: $(HTTP_LIB) +.PHONY: clean clean: - rm -f $(filter-proper-targets $(ls R, .)) *.annot *.cmo + $(CLEAN) $(HTTP_LIB) .SUBDIRS: tests diff --git a/libs/http/tests/OMakefile b/libs/http/tests/OMakefile index 4986567..2be4f6c 100644 --- a/libs/http/tests/OMakefile +++ b/libs/http/tests/OMakefile @@ -1,5 +1,3 @@ -.PHONY: clean - OCAMLFLAGS += -I $(HTTP_LIB_DIR) OCAML_LIBS += $(HTTP_LIB_DIR)/http @@ -9,5 +7,6 @@ TEST_PARSER = $(OCamlProgram $(TEST_PARSER_PROG), test_http) .DEFAULT: $(TEST_PARSER) +.PHONY: clean clean: - rm -f $(filter-proper-targets $(ls R, .)) *.annot *.cmo + $(CLEAN) $(TEST_PARSER) diff --git a/libs/json/OMakefile b/libs/json/OMakefile index 5ce3b3d..879f503 100644 --- a/libs/json/OMakefile +++ b/libs/json/OMakefile @@ -1,5 +1,3 @@ -.PHONY: clean - JSON_FILES[] = json json_parse @@ -10,7 +8,8 @@ JSON_LIB = $(OCamlLibrary $(LIB), $(JSON_FILES)) .DEFAULT: $(JSON_LIB) +.PHONY: clean clean: - rm -f $(filter-proper-targets $(ls R, .)) *.annot *.cmo + $(CLEAN) $(JSON_LIB) .SUBDIRS: parser_tests diff --git a/libs/json/parser_tests/OMakefile b/libs/json/parser_tests/OMakefile index 1380ba8..ba38681 100644 --- a/libs/json/parser_tests/OMakefile +++ b/libs/json/parser_tests/OMakefile @@ -1,6 +1,3 @@ - -.PHONY: clean - OCAMLFLAGS += -I $(JSON_LIB_DIR) OCAML_LIBS += $(JSON_LIB_DIR)/json @@ -10,3 +7,7 @@ TEST_PARSER = $(OCamlProgram $(TEST_PARSER_PROG), test_parser) .DEFAULT: $(TEST_PARSER) + +.PHONY: clean +clean: + $(CLEAN) $(TEST_PARSER) diff --git a/libs/jsonrpc/OMakefile b/libs/jsonrpc/OMakefile index 7b88d3e..39066f9 100644 --- a/libs/jsonrpc/OMakefile +++ b/libs/jsonrpc/OMakefile @@ -1,5 +1,3 @@ -.PHONY: clean - OCAMLFLAGS += -I $(JSON_LIB_DIR) JSONRPC_FILES[] = @@ -10,6 +8,6 @@ JSONRPC_LIB = $(OCamlLibrary $(LIB), $(JSONRPC_FILES)) .DEFAULT: $(JSONRPC_LIB) +.PHONY: clean clean: - rm -f $(filter-proper-targets $(ls R, .)) *.annot *.cmo - + $(CLEAN) $(JSONRPC_LIB) -- 2.39.5