ceu-lang / ceu-maker

5 stars 1 forks source link

pico-Céu.exe and Céu-Arduino.exe don't compile files with space in name #10

Closed AnnyCaroline closed 6 years ago

AnnyCaroline commented 6 years ago

Message error produced when compiling word1 word2 word3.ceu file

>>> ERROR : invalid option "word2.ceu"
make: *** [Makefile:44: ceu] Error 1
AnnyCaroline commented 6 years ago

Error in Céu-Arduino

The error occurs because ceu.lua, called by Arduino Makefile, understands the first word as the value of --pre-input option, and the second word as an option that it don't know. The following code was extracted from \repos\ceu-arduino\Makefile. The file name is stored in CEU_SRC_.

ceu:
    $(CEU_EXE) --pre --pre-args="-include ./include/arduino/arduino.ceu -include ./libraries/arch-$(ARD_ARCH)/$(ARD_ARCH).ceu -I./include/ $(CEU_INCS) -include pm.ceu $(CEU_DEFS) -DCEUMAKER_ARDUINO -DARDUINO_ARCH_$(ARD_ARCH_UPPER) -DARDUINO_MCU_$(ARD_MCU_UPPER) -DARDUINO_BOARD_$(ARD_BOARD_UPPER) -DCEU_PM" \
              --pre-input="$(CEU_SRC_)"                                          \
        --ceu --ceu-err-unused=pass --ceu-err-uninitialized=pass               \
              --ceu-line-directives=true                                       \
              --ceu-features-lua=false --ceu-features-thread=false             \
              --ceu-features-isr=static                                        \
              $(CEU_FEATURES)                                                  \
        --env --env-types=env/types.h                                          \
              --env-output=env/_ceu_app.c.h

pre:
    ceu --pre --pre-args="-include ./include/arduino/arduino.ceu -include ./libraries/arch-$(ARD_ARCH)/$(ARD_ARCH).ceu -I$(CEU_DIR)/include/ -I./include/ $(CEU_INCS) $(CEU_DEFS) -DCEUMAKER_ARDUINO -DARDUINO_ARCH_$(ARD_ARCH_UPPER) -DARDUINO_MCU_$(ARD_MCU_UPPER) -DARDUINO_BOARD_$(ARD_BOARD_UPPER)" --pre-input="$(CEU_SRC_)"

The solution is simply put CEU_SRC_ (in lines 3 and 13 from the above code) between quotation marks.

--pre-input="$(CEU_SRC_)" 
AnnyCaroline commented 6 years ago

Error in pico-Céu

The error is generated in \repos\pico-ceu\Makefile.

all:
    $(CEU_EXE) --pre --pre-args="-I$(CEU_DIR)/include -I$(CEU_SDL_DIR)/include -I./include $(D_SERIAL) $(D_POSIX) -DCEUMAKER_PICO -DCEU_SRC=$(CEU_SRC_) $(CEU_ARGS)"    \
              --pre-input=pico.ceu                                          \
        --ceu --ceu-err-unused=pass --ceu-err-uninitialized=pass --ceu-line-directives=false            \
              --ceu-features-trace=true --ceu-features-exception=true          \
              --ceu-features-dynamic=true \
              --ceu-features-pool=true \
              --ceu-features-pause=true \
              --ceu-features-os=true \
              --ceu-features-async=true \
        --env --env-types=$(CEU_DIR)/env/types.h                            \
              --env-threads=$(CEU_DIR)/env/threads.h                        \
              --env-main=$(CEU_DIR)/env/main.c                              \
        --cc --cc-args="$(CC_ARGS) -g -lm -lSDL2 -lSDL2_image -lSDL2_mixer -lSDL2_ttf -lSDL2_net -lSDL2_gfx" \
             --cc-output="$(dir $(CEU_SRC_))/$(OUT_SUB)/tmp.exe"
    $(CP_EXE) tiny.ttf "$(dir $(CEU_SRC_))/$(OUT_SUB)/"
    cd "$(dir $(CEU_SRC_))/$(OUT_SUB)/" && "$(dir $(CEU_SRC_))/$(OUT_SUB)/tmp.exe"

The solution is:

AnnyCaroline commented 6 years ago

The pico-Céu and Céu-Arduino Makefiles are supporting file paths with white spaces, but ceu.lua don't. This is not a priority for now, so we are closing the issue.

pico-Céu

image

Céu-Arduino

image image