[<<][libprim][>>][..]
Fri Sep 17 14:35:58 CEST 2010

Port to eCos

I'm attempting a port to the eCos operating system.  Start from:

# Android.mk :

LEAF = libprim/leaf
EX = libprim/ex
SC = libprim/sc
SC_VM1 = libprim/sc_vm1
JNI = libprim/jni

LOCAL_MODULE     := scheme
LOCAL_SRC_FILES  := \
	sc_android.c \
	$(LEAF)/bytes.c  \
	$(LEAF)/port.c \
	$(LEAF)/parser.c \
	$(LEAF)/scanner.c \
	$(LEAF)/tuple.c \
	$(LEAF)/leaf.c \
	$(LEAF)/symbol.c \
	$(LEAF)/channel.c \
	$(LEAF)/inexact.c \
	$(LEAF)/console.c \
	$(EX)/ex.c  \
	$(EX)/read_intl.c  \
	$(EX)/gc.c \
	$(JNI)/libscheme.c \
	$(SC)/sc.c \
	$(SC_VM1)/vm1.c

I've added the file eCos.mk

What are the difficulties?  As with the Android port the main
challenge is to generate the C files.  Let's ignore that problem now
and see if the generated files compile.

I spent an hour to try to make it build.  Something goes wrong with
generating the .d files:


libprim/ex/ex.d:1: *** multiple target patterns.  Stop.

It's generated by this:

gcc -MM -I"/home/tom/ubidata/build_linux/install/include" -Wall -Wpointer-arith -Wstrict-prototypes -Wundef -Woverloaded-virtual -Wno-write-strings -g -O0 -fno-rtti -fno-exceptions -Ilibprim/build -Ilibprim  -Isrc -Isrc/utils -Isrc/dec libprim/ex/ex.c | sed 's!ex.o[ :]*!libprim/ex/ex.o libprim/ex/ex.d : !' > libprim/ex/ex.d


I see.  It's the dot!

The regular expression "ex.o" matches "ex/object" in the libprim
sources.  It needs to be quoted.  It comes from:

%.d: %.c
	$(XCC) -MM $(XCFLAGS) $< | sed 's!$(*F).o[ :]*!$*.o $@ : !' > $@


Changing it to use quoting works:

%.d: %.c
	$(XCC) -MM $(XCFLAGS) $< | sed 's!$(*F)\.o[ :]*!$*.o $@ : !' > $@




[Reply][About]
[<<][libprim][>>][..]