I have created a simple Ocsigen project from basic template. Everything was fine until I decided I'd like to put all my source files in src
directory and create more subdirectiories inside it too, so that my source code is partitioned into modules and arranged nicely.
Unfortunately when I try to compile the project, only the files in the main directory get compiled and the src
directory is not searched for source files. I have read the makefiles generated by the project template and tried to figure out a way to make it work, but with no success. Specifically it's not sufficient just to change values of CLIENT_FILES
and SERVER_FILES
in Makefile.options
. I tried to impose recursive search like so:
SERVER_FILES := $(shell find src -name "*.eliom" -or -name "*.eliomi")
but it didn't work. Makefile
apparently requires much more changes to accept that. I also tried with flat structure using $(wildcard src/*.eliom)
, but that didn't work either.
So is there any way to achieve what I need without making changes to half the template Makefile
, which is quite magical for me, difficult to modify, and even more difficult to completely comprehend and rewrite.