[Omake] Files in subdirs
Chris Campbell
cyberdanx at gmail.com
Thu Jun 22 17:23:03 PDT 2006
Hi,
How do we use files in subdirectories without using a library? For
example, in the following tree, the files in tests are organised into
directories according to the corresponding directory in the main src
directory. This is just a convienance for myself.
Here, unit-tests.ml depends on maths/testMaths.ml, core/testCore.ml.
src/
OMakefile
core/
maths/
tests/
OMakefile
unit-tests.ml
core/
testCore.ml
maths/
testMaths.ml
I tried the following
src/tests/OMakefile:
OCAMLINCLUDES+=maths
TEST_MAIN = unit-tests
TEST_FILES = testUtils oUExt \
maths/testMaths $(TEST_MAIN)
.PHONY: clean
clean:
$(CLEAN) $(TEST_MAIN)
OCamlProgram($(TEST_MAIN), $(TEST_FILES))
.DEFAULT: $(TEST_MAIN)
This does not work. I understand why, but am not sure how to go about
fixing it. I thought of putting an implicit rule in the omakefile to
achieve this, but am wondering if there's an easier way as I'd
probably end up writing a horrible function that caters for whether we
use ocamlopt, ocamlfind, etc using the macros to fill in the flags as
necessary. Bleh. It's late so maybe I'm not seeing the obvious
solution (other than putting everything in one directory).
Cheers,
Chris
More information about the Omake
mailing list