[Omake] Dependency scanning problem (default scanners)
Jonathan Roewen
jonathan.roewen at gmail.com
Sun Apr 8 22:16:25 PDT 2007
Ooh, I think I'm getting closer...
It appears to be adding extra ../ to the filenames....
And this time I've really attached my kernel/OMakefile ;-)
And another with the last few lines of -debug-scanner output (I added
two echoes to OCamlScannerTargets as well).
Doesn't seem to like my .SUBDIRS-fu =/
Jonathan
On 4/9/07, Aleksey Nogin <nogin at metaprl.org> wrote:
> Jonathan,
>
> Thanks a lot for the bug report - this definitely seems like something
> potentially very nasty. I would appreciate any additional information
> you could provide that might help me in tracking this down.
>
> Thanks!
>
> Aleksey
>
> On 08.04.2007 15:44, Jonathan Roewen wrote:
>
> > Hi,
> >
> > I seem to have found a bug in dependency scanning... =/
> >
> > start_scanner: target dependencies are accurate <scanner
> > kernel/bytecomp/scan-ocaml-lambda.mli>:
> > scanner's build deps: <phony <OCamlGeneratedFilesTarget>>
> > kernel/bytecomp/lambda.mli
> > scanned deps:
> > kernel/lambda.cmi: parsing/asttypes.cmi parsing/location.cmi
> > stdlib/set.cmi typing/env.cmi typing/ident.cmi typing/path.cmi
> > typing/primitive.cmi typing/types.cmi
> > finish_scanner <scanner kernel/bytecomp/scan-ocaml-lambda.mli>:
> > kernel/lambda.cmi: parsing/asttypes.cmi parsing/location.cmi
> > stdlib/set.cmi typing/env.cmi typing/ident.cmi typing/path.cmi
> > typing/primitive.cmi typing/types.cmi
> > - build kernel/bytecomp lambda.cmi
> > + ../../toolchain/ocaml/ocamlc -nostdlib -I . -I ../utils -I
> > ../parsing -I ../typing -I . -I ../driver -I ../stdlib -c lambda.mli
> > File "lambda.mli", line 17, characters 0-13:
> > Unbound module Asttypes
> >
> > As you can see in scanned deps: it's putting the dependencies on
> > kernel/lambda.cmi. The correct target is kernel/bytecomp/lambda.cmi =/
> >
> > I'vel attach my OMakefile for completeness.
> >
> > bytecomp/Files.om:
> >
> > COMP = $(file lambda printlambda typeopt switch matching \
> > translobj translcore translclass translmod simplif runtimedef)
> >
> > BYTECOMP = $(file meta instruct bytegen printinstr opcodes \
> > emitcode bytesections dll symtable bytelink bytelibrarian \
> > bytepackager)
> >
> > Note that other files get scanned fine up to that point.
> >
> > Using omake 0.9.8.1
> >
> > Jonathan
> > _______________________________________________
> > Omake mailing list
> > Omake at metaprl.org
> > https://lists.metaprl.org/mailman/listinfo/omake
> >
>
> _______________________________________________
> Omake mailing list
> Omake at metaprl.org
> https://lists.metaprl.org/mailman/listinfo/omake
>
-------------- next part --------------
# <root>/kernel/OMakefile
.PHONY: install
OCamlGeneratedFiles(bytecomp/opcodes.ml utils/config.ml bytecomp/runtimedef.ml)
OCAMLINCLUDES += $(dir utils parsing typing bytecomp driver stdlib)
OCAMLFLAGS = -nostdlib
.SUBDIRS: utils parsing typing bytecomp driver
include Files.om
export
.SUBDIRS: stdlib bigarray dynlink
OCAMLINCLUDES += $(dir bigarray dynlink)
TOPSTUFF = $(UTILS) $(PARSING) $(TYPING) $(COMP) $(BYTECOMP) $(DRIVER)
TOPLEVELFILES = $(UTILS) $(PARSING) $(TYPING) $(COMP) $(BYTECOMP)
OBJS = bootstrap startup idt kernel dl asm_stubs multiboot_stubs irq
PRIMS = asm_stubs.c multiboot_stubs.c
$(addsuffix .cmi, $(TOPSTUFF)): $(file stdlib/pervasives.cmi)
$(addsuffix .cmo, $(TOPSTUFF)): $(file stdlib/pervasives.cmo)
dummyso.o: dummyso.c
$(CC) -c -fPIC -o $@ $<
libdummy.so: dummyso.o
ld -shared -o $@ $<
section
private.MYLIBS = $(LIBRARIES)/libcamlrun $(LIBRARIES)/libm $(LIBRARIES)/libc \
bigarray/libbigarray $(rootname $(shell gcc -print-file-name=libgcc.a))
private.OFILES = $(addsuffix $(EXT_OBJ), $(OBJS))
private.LFILES = $(addsuffix $(EXT_LIB), $(MYLIBS))
kernel.elf: kernel.lds libdummy.so $(OFILES) $(LFILES)
$(CC) -nostdlib -T kernel.lds -export-dynamic -o $@ $,(OFILES) $(LFILES) \
libdummy.so
primitives: $(PRIMS) $(ROOT)/c_bits/byterun/primitives
cp ../c_bits/byterun/primitives primitives
sed -n -e "s/CAMLprim value \([a-z0-9_][a-z0-9_]*\).*/\1/p" \
$(PRIMS) >> primitives
KERNEL_OBJS = ../minilib/minilib.cmo VFS.cmo stdio.cmo stdlib/stdlib.cma bigarray/bigarray.cma \
dynlink/dynlink.cma multiboot.cmo mbfs.cmo tasks.cmo kernel.cmo stdlib/std_exit.cmo
kernel.o: $(KERNEL_OBJS) primitives
section
CFLAGS += -fno-builtin -DCAML_NAME_SPACE -O -fno-defer-pop -ffreestanding -nostdlib -nostartfiles -nostdinc
CFLAGS += $(addprefix -I, $(INCLUDES) bigarray)
INCLUDES = $(dir ../minilib stdlib dynlink bigarray)
$(OCAMLC) -custom -linkall -nostdlib -nopervasives -warn-error A \
-output-obj -ccopt "$(CFLAGS)" -use-prims primitives -o $@ \
$(mapprefix -I, $(INCLUDES)) $(KERNEL_OBJS)
install: kernel.elf
strip kernel.elf
section
OCAMLFLAGS += -nopervasives
OCAMLINCLUDES = $(dir $(ROOT)/minilib .)
VFS.cmi VFS.cmo stdio.cmi stdio.cmo:
bytecomp/opcodes.ml: $(ROOT)/c_bits/byterun/instruct.h
sed -n -e '/^enum/p' -e 's/,//g' -e '/^ /p' ../c_bits/byterun/instruct.h | \
awk -f tools/make-opcodes > bytecomp/opcodes.ml
utils/config.ml: utils/config.mlp
rm -f utils/config.ml
sed -e 's|%%EXT_OBJ%%|.o|' \
-e 's|%%EXT_ASM%%|.s|' \
-e 's|%%EXT_LIB%%|.a|' \
-e 's|%%EXT_DLL%%|.so|' \
-e 's|%%SYSTHREAD_SUPPORT%%|false|' \
utils/config.mlp > utils/config.ml
bytecomp/runtimedef.ml: primitives
(echo 'let builtin_exceptions = [|'; \
sed -n -e 's|.*/\* \("[A-Za-z_]*"\) \*/$$| \1;|p' ../c_bits/byterun/fail.h | \
sed -e '$$s/;$$//'; \
echo '|]'; \
echo 'let builtin_primitives = [|'; \
sed -e 's/.*/ "&";/' -e '$$s/;$$//' primitives; \
echo '|]') > bytecomp/runtimedef.ml
dynlink/dynlink.cma: $(addsuffix .cmo, $(TOPSTUFF))
.DEFAULT: install
-------------- next part --------------
queue.cmi obj.cmi obj.cmx
queue.cmi obj.cmi obj.cmx
start_scanner: target dependencies are accurate <scanner kernel/stdlib/scan-ocaml-queue.ml>:
scanner's build deps: <phony <OCamlGeneratedFilesTarget>>
<exists kernel/stdlib/queue.mli> kernel/stdlib/queue.ml
scanned deps:
kernel/stdlib/queue.cmo: kernel/stdlib/obj.cmi kernel/stdlib/queue.cmi
kernel/stdlib/queue.cmx: kernel/stdlib/obj.cmx kernel/stdlib/queue.cmi
finish_scanner <scanner kernel/stdlib/scan-ocaml-queue.ml>:
kernel/stdlib/queue.cmo: kernel/stdlib/obj.cmi kernel/stdlib/queue.cmi
kernel/stdlib/queue.cmx: kernel/stdlib/obj.cmx kernel/stdlib/queue.cmi
start_scanner: target dependencies are accurate <scanner kernel/stdlib/scan-ocaml-queue.mli>:
scanner's build deps: <phony <OCamlGeneratedFilesTarget>>
kernel/stdlib/queue.mli
scanned deps:
finish_scanner <scanner kernel/stdlib/scan-ocaml-queue.mli>:
../location.cmi ../../stdlib/format.cmi
../location.cmi ../../stdlib/format.cmi
start_scanner: target dependencies are accurate <scanner kernel/parsing/scan-ocaml-syntaxerr.mli>:
scanner's build deps: <phony <OCamlGeneratedFilesTarget>>
kernel/parsing/syntaxerr.mli
scanned deps: kernel/syntaxerr.cmi: kernel/location.cmi stdlib/format.cmi
finish_scanner <scanner kernel/parsing/scan-ocaml-syntaxerr.mli>:
kernel/syntaxerr.cmi: kernel/location.cmi stdlib/format.cmi
- build kernel/parsing syntaxerr.cmi
+ ../../toolchain/ocaml/ocamlc -nostdlib -I . -I ../utils -I . -I ../typing -I ../bytecomp -I ../driver -I ../stdlib -c syntaxerr.mli
File "syntaxerr.mli", line 20, characters 16-26:
Unbound type constructor Location.t
*** omake: 1645/2313 targets are up to date
*** omake: failed (11.7 sec, 0/418 scans, 1/501 rules, 1/2914 digests)
*** omake: targets were not rebuilt because of errors:
kernel/parsing/syntaxerr.cmi
depends on: kernel/parsing/syntaxerr.mli
More information about the Omake
mailing list