mescc: move include into share/mlibc, allows installing alongside gcc.

* mlibc: Rename from libc.
* HACKING: Update for name change.
* make/bin.make: Likewise.
* make/mescc-guile.make: Likewise.
* make/mescc-mes.make: Likewise.
* scaffold/scaffold.make: Likewise.
* make/install.make: Likewise.
  (install): Install mlibc into share/mlibc.
This commit is contained in:
Jan Nieuwenhuizen 2017-06-03 12:11:57 +02:00
parent 0a07a01b29
commit 4d1df9cbcb
37 changed files with 20 additions and 20 deletions

View file

@ -21,7 +21,7 @@ slower than guile. That's why we usually don't use mes during development.
gcc is used to verify the sanity of our C sources.
i686-unknown-linux-gnu-gcc is used to compare hex/assembly, to test
the gcc variant of mlbic: libc/libc-gcc.c and steal ideas.
the gcc variant of mlbic: mlibc/libc-gcc.c and steal ideas.
guile is used to develop mescc, the C compiler in Scheme that during
bootstrapping will be executed by mes.

View file

@ -12,7 +12,7 @@ endif
CLEAN+=$(O_FILES) $(OUT)/$(TARGET)
DIST-CLEAN+=$(D_FILES)
INCLUDES+=libc/include libc $(OUT)/$(DIR)
INCLUDES+=mlibc/include mlibc $(OUT)/$(DIR)
$(OUT)/$(TARGET): ld:=$(CROSS)LD
$(OUT)/$(TARGET): LD:=$(CROSS)$(LD)

View file

@ -100,9 +100,9 @@ endif
tar -cf- -C module $(INSTALL_GO_FILES:module/%=%)\
| tar -C $(DESTDIR)$(GODIR) -xf-
mkdir -p $(DESTDIR)$(PREFIX)/lib
$(GIT_ARCHIVE_HEAD) libc/include \
| tar -C $(DESTDIR)$(PREFIX) --strip=1 -xf-
cp out/libc/libc-mes.guile-o $(DESTDIR)$(PREFIX)/lib/libc-mes.o
$(GIT_ARCHIVE_HEAD) mlibc/include \
| tar -C $(DESTDIR)$(PREFIX)/share -xf-
cp out/mlibc/libc-mes.guile-o $(DESTDIR)$(PREFIX)/lib/libc-mes.o
release: tree-clean-p check dist
git tag v$(VERSION)

View file

@ -1,7 +1,7 @@
ifneq ($(GUILE),)
CROSS:=guile-
C_FILES:=libc/libc-mes.c $(C_FILES)
#C_FILES:=libc/mini-libc-mes.c $(C_FILES)
C_FILES:=mlibc/libc-mes.c $(C_FILES)
#C_FILES:=mlibc/mini-libc-mes.c $(C_FILES)
O_FILES:=$(C_FILES:%.c=$(OUT)/%.$(CROSS)o)
ifneq ($(DEBUG),)
@ -14,7 +14,7 @@ CLEAN+=$(O_FILES) $(OUT)/$(TARGET)
CLEAN+=$(OUT)/$(TARGET)
INCLUDES+=libc/include libc $(OUT)/$(DIR)
INCLUDES+=mlibc/include mlibc $(OUT)/$(DIR)
MESCC.scm:=guile/mescc.scm
MESLD.scm:=guile/mescc.scm
@ -73,8 +73,8 @@ endef
ifeq ($(MLIBC.scm),)
MLIBC.scm:=DONE
else
C_FILES:=$(filter-out libc/libc-mes.c,$(C_FILES))
C_FILES:=$(filter-out libc/mini-libc-mes.c,$(C_FILES))
C_FILES:=$(filter-out mlibc/libc-mes.c,$(C_FILES))
C_FILES:=$(filter-out mlibc/mini-libc-mes.c,$(C_FILES))
endif
ifneq ($(MESC_DIRECT),)

View file

@ -1,6 +1,6 @@
ifneq ($(MES),)
CROSS:=mes-
C_FILES:=libc/libc-mes.c $(C_FILES)
C_FILES:=mlibc/libc-mes.c $(C_FILES)
O_FILES:=$(C_FILES:%.c=$(OUT)/%.$(CROSS)o)
ifneq ($(DEBUG),)
@ -13,7 +13,7 @@ CLEAN+=$(O_FILES) $(OUT)/$(TARGET)
CLEAN+=$(OUT)/$(TARGET)
INCLUDES+=libc/include libc $(OUT)/$(DIR)
INCLUDES+=mlibc/include mlibc $(OUT)/$(DIR)
MESCC.mes:=scripts/mescc.mes
MESLD.mes:=scripts/mescc.mes
@ -84,7 +84,7 @@ endef
ifeq ($(MLIBC.mes),)
MLIBC.mes:=DONE
else
C_FILES:=$(filter-out libc/libc-mes.c,$(C_FILES))
C_FILES:=$(filter-out mlibc/libc-mes.c,$(C_FILES))
endif
ifneq ($(MESC_DIRECT),)

View file

@ -54,9 +54,9 @@
(define mes? (pair? (current-module)))
(define* (c99-input->full-ast #:key (defines '()) (includes '()))
(let ((include (if (equal? %prefix "") "libc/include" (string-append %prefix "/include"))))
(let ((include (if (equal? %prefix "") "mlibc/include" (string-append %prefix "/share/mlibc/include"))))
(parse-c99
#:inc-dirs (append includes (cons* "." "libc" "src" "out" "out/src" include (string-split (getenv "C_INCLUDE_PATH") #\:)))
#:inc-dirs (append includes (cons* "." "mlibc" "src" "out" "out/src" include (string-split (getenv "C_INCLUDE_PATH") #\:)))
#:cpp-defs `(
"POSIX=0"
"_POSIX_SOURCE=0"

View file

@ -1,7 +1,7 @@
TARGET:=m
C_FILES:=$(DIR)/m.c
DEFINES:=POSIX=1
INCLUDES:=libc
INCLUDES:=mlibc
include make/bin.make
TARGET:=m
@ -11,7 +11,7 @@ include make/check.make
TARGET:=hello
C_FILES:=$(DIR)/hello.c
DEFINES:=POSIX=1
INCLUDES:=libc
INCLUDES:=mlibc
include make/bin.make
TARGET:=hello
@ -21,7 +21,7 @@ include make/check.make
TARGET:=t
C_FILES:=$(DIR)/t.c
DEFINES:=POSIX=1
INCLUDES:=libc
INCLUDES:=mlibc
include make/bin.make
TARGET:=t
@ -30,7 +30,7 @@ include make/check.make
TARGET:=t-tcc
C_FILES:=$(DIR)/t-tcc.c
DEFINES:=POSIX=1
INCLUDES:=libc
INCLUDES:=mlibc
include make/bin.make
TARGET:=t-tcc

View file

@ -22,7 +22,7 @@ snarf-gcc: $(SNARF.GCC)
$(OUT)/$(DIR)/mes.o: $(SNARF.GCC)
DEFINES:=FIXED_PRIMITIVES=1 MES_FULL=1 POSIX=1 VERSION='"$(VERSION)"' MODULEDIR='"$(MODULEDIR)"' PREFIX='"$(PREFIX)"'
INCLUDES:=libc $(OUT)/$(DIR)
INCLUDES:=mlibc $(OUT)/$(DIR)
TARGET:=mes
C_FILES:=$(DIR)/mes.c
include make/bin.make