[Omake] New commercial user of omake
Alain Frisch
alain.frisch at lexifi.com
Fri Sep 28 02:07:42 PDT 2007
Jason Hickey wrote:
> Nice! We haven't made any official support for MLFi or C#. They fit as
> dialects maybe--but maybe not completely. If you have some
> advice/experience that you think should be part of the standard library,
> let us know!
Well, for what concerns the build system, MLFi is really like OCaml
(with different file extensions). I've simply adapted OCaml.om. Since
this language is only used by our customers and partners, I think it
doesn't make sense to include support in the standard library.
As for C#, we're using simplistic rules for now:
CSARGS=
CSICO=
CSINCLUDES[] = .
CSharpProgram(name, dlls, cs) =
CSFILES = $(addsuffix .cs, $(cs))
DLLFILES = $(find-targets-in-path $(CSINCLUDES), $(addsuffix .dll,
$(dlls)))
$(name).exe: $(CSFILES) $(DLLFILES) $(CSICO)
csc /nologo $(CSARGS) /unsafe /out\:$@ $(addprefix /win32icon\:,
$(CSICO)) $(addprefix /r\:, $(DLLFILES)) $(CSFILES)
return $(name).exe
CSharpDLL(name, dlls, cs) =
CSFILES = $(addsuffix .cs, $(cs))
DLLFILES = $(find-targets-in-path $(CSINCLUDES), $(addsuffix .dll,
$(dlls)))
$(name).dll: $(CSFILES) $(DLLFILES) $(CSICO)
csc /nologo $(CSARGS) /t\:library /unsafe /out\:$@ $(addprefix
/win32icon\:, $(CSICO)) $(addprefix /r\:, $(DLLFILES)) $(CSFILES)
return $(name).dll
I'm not very familiar with C# yet, but I don't think we can do something
really clever about scanning dependencies (there is no implicit relation
between classes/namespaces and the file names).
Some random observations (not stricly related to OMake):
- OCaml compilers can become very slow under Windows when many -I
options are given. I've boosted the compilation performance by creating
a "locallib" directory and adding implicit rules to copy all the .cmi
files from all the project's directories into locallib (so that a single
-I option is enough).
- Small suggestion for C.om: make it possible to use different CFLAGS
for the actual compilation and the dependency scanning (e.g. you don't
want to see warning twice). In addition to CFLAGS, there could be
CFLAGS_DEPENDS and CFLAGS_COMPILE, or something like that.
- Microsoft tools like to pollute their stdout/stderr with useless
messages than cannot be disabled (AFAIK). For instance, the C compiler
cl will always write the name of the compiled source, and the linker
display messages like "Create library ... and object ...". This is
annoying because it messes up with the neat OMake progress bar and
distract from real warnings. I'm experimenting with an ugly workaround:
Shell. +=
cl(argv) =
cl.exe $(argv) |& tail -n +2
Have other people come up with a decent solution?
- When I change the OMakefile, move files around or changes the
directory structure, I sometimes have to do an "omake -U". Is this
supposed to happen, or is this rather an indication that some
dependencies are ill-specified? Btw, it would be great to have some
tools to debug dependencies. For instance, omake could be instructed to
use a random ordering to build the project (amongst all the orderings
compatible with the dependencies). A stronger check would be to observe
which files are actually opened or touched by a command to verify that
dependencies and side effects are all mentioned (this could be done by
hooking file libc/system calls; under Linux, a simple LD_PRELOAD is
enough; under Windows, I've no idea).
> Aleksey made some changes in 0.9.8.4 to address this. Is that your
> release?
We're using 0.9.8.5.
-- Alain
More information about the Omake
mailing list