From 0fa18b338dfd11ea45e1656fc387fd53df620bef Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Wed, 22 Nov 2017 16:23:48 +0100 Subject: [PATCH] build: mlib/include to include, move mlib to lib. * include: Move from mlib/include. * lib: Move from mlib. * BOOTSTRAP: Update. * HACKING: Update. * guile/guix/make.scm: Update. * make.scm: Update. * module/language/c99/compiler.mes: Update. --- BOOTSTRAP | 6 +- HACKING | 2 +- guile/guix/make.scm | 16 +-- {mlibc/include => include}/00-test.i | 0 {mlibc/include => include}/30-test.i | 0 {mlibc/include => include}/alloca.h | 0 {mlibc/include => include}/assert.h | 0 {mlibc/include => include}/ctype.h | 0 {mlibc/include => include}/dlfcn.h | 0 {mlibc/include => include}/endian.h | 0 {mlibc/include => include}/errno.h | 0 {mlibc/include => include}/fcntl.h | 0 {mlibc/include => include}/features.h | 0 {mlibc/include => include}/float.h | 0 {mlibc/include => include}/getopt.h | 0 {mlibc/include => include}/inttypes.h | 0 {mlibc/include => include}/libgen.h | 0 {mlibc/include => include}/limits.h | 0 {mlibc/include => include}/locale.h | 0 {mlibc/include => include}/math.h | 0 {mlibc/include => include}/mlibc.h | 0 {mlibc/include => include}/setjmp.h | 0 {mlibc/include => include}/signal.h | 0 {mlibc/include => include}/stdarg.h | 0 {mlibc/include => include}/stdbool.h | 0 {mlibc/include => include}/stddef.h | 0 {mlibc/include => include}/stdint.h | 0 {mlibc/include => include}/stdio.h | 0 {mlibc/include => include}/stdlib.h | 0 {mlibc/include => include}/stdnoreturn.h | 0 {mlibc/include => include}/string.h | 0 {mlibc/include => include}/strings.h | 0 {mlibc/include => include}/sys/cdefs.h | 0 {mlibc/include => include}/sys/mman.h | 0 {mlibc/include => include}/sys/select.h | 0 {mlibc/include => include}/sys/stat.h | 0 {mlibc/include => include}/sys/time.h | 0 {mlibc/include => include}/sys/timeb.h | 0 {mlibc/include => include}/sys/types.h | 0 {mlibc/include => include}/sys/ucontext.h | 0 {mlibc/include => include}/sys/wait.h | 0 {mlibc/include => include}/time.h | 0 {mlibc/include => include}/unistd.h | 0 {mlibc => lib}/crt1.c | 0 {mlibc => lib}/getopt.c | 0 {mlibc => lib}/libc-gcc+tcc.c | 0 {mlibc => lib}/libc-gcc.c | 0 {mlibc => lib}/libc-mes+tcc.c | 0 {mlibc => lib}/libc-mes.c | 0 {mlibc => lib}/mini-libc-mes.c | 0 make.scm | 114 +++++++++++----------- module/language/c99/compiler.mes | 4 +- 52 files changed, 71 insertions(+), 71 deletions(-) rename {mlibc/include => include}/00-test.i (100%) rename {mlibc/include => include}/30-test.i (100%) rename {mlibc/include => include}/alloca.h (100%) rename {mlibc/include => include}/assert.h (100%) rename {mlibc/include => include}/ctype.h (100%) rename {mlibc/include => include}/dlfcn.h (100%) rename {mlibc/include => include}/endian.h (100%) rename {mlibc/include => include}/errno.h (100%) rename {mlibc/include => include}/fcntl.h (100%) rename {mlibc/include => include}/features.h (100%) rename {mlibc/include => include}/float.h (100%) rename {mlibc/include => include}/getopt.h (100%) rename {mlibc/include => include}/inttypes.h (100%) rename {mlibc/include => include}/libgen.h (100%) rename {mlibc/include => include}/limits.h (100%) rename {mlibc/include => include}/locale.h (100%) rename {mlibc/include => include}/math.h (100%) rename {mlibc/include => include}/mlibc.h (100%) rename {mlibc/include => include}/setjmp.h (100%) rename {mlibc/include => include}/signal.h (100%) rename {mlibc/include => include}/stdarg.h (100%) rename {mlibc/include => include}/stdbool.h (100%) rename {mlibc/include => include}/stddef.h (100%) rename {mlibc/include => include}/stdint.h (100%) rename {mlibc/include => include}/stdio.h (100%) rename {mlibc/include => include}/stdlib.h (100%) rename {mlibc/include => include}/stdnoreturn.h (100%) rename {mlibc/include => include}/string.h (100%) rename {mlibc/include => include}/strings.h (100%) rename {mlibc/include => include}/sys/cdefs.h (100%) rename {mlibc/include => include}/sys/mman.h (100%) rename {mlibc/include => include}/sys/select.h (100%) rename {mlibc/include => include}/sys/stat.h (100%) rename {mlibc/include => include}/sys/time.h (100%) rename {mlibc/include => include}/sys/timeb.h (100%) rename {mlibc/include => include}/sys/types.h (100%) rename {mlibc/include => include}/sys/ucontext.h (100%) rename {mlibc/include => include}/sys/wait.h (100%) rename {mlibc/include => include}/time.h (100%) rename {mlibc/include => include}/unistd.h (100%) rename {mlibc => lib}/crt1.c (100%) rename {mlibc => lib}/getopt.c (100%) rename {mlibc => lib}/libc-gcc+tcc.c (100%) rename {mlibc => lib}/libc-gcc.c (100%) rename {mlibc => lib}/libc-mes+tcc.c (100%) rename {mlibc => lib}/libc-mes.c (100%) rename {mlibc => lib}/mini-libc-mes.c (100%) diff --git a/BOOTSTRAP b/BOOTSTRAP index 42da81ee..618aad4b 100644 --- a/BOOTSTRAP +++ b/BOOTSTRAP @@ -68,10 +68,10 @@ Do: *** Remember that mes.M1 is compiled by mescc from prototyped src/mes.c in C. *** stage0/mescc-tools: TODO *** Mes - M1 -f stage0/x86.M1 -f mlibc/crt1.M1 --LittleEndian --Architecture=1 > mlibc/crt1.hex2 - M1 -f stage0/x86.M1 -f mlibc/mini-libc-mes.M1 --LittleEndian --Architecture=1 > mlibc/libc-mes.hex2 + M1 -f stage0/x86.M1 -f lib/crt1.M1 --LittleEndian --Architecture=1 > lib/crt1.hex2 + M1 -f stage0/x86.M1 -f lib/mini-libc-mes.M1 --LittleEndian --Architecture=1 > lib/libc-mes.hex2 M1 -f stage0/x86.M1 -f src/mes.M1 --LittleEndian --Architecture=1 > src/mes.hex2 - hex2 --LittleEndian --Architecture=1 --BaseAddress=0x1000000 -f stage0/elf32-header.hex2 -f mlibc/crt1.hex2 -f mlibc/libc-mes.hex2 -f src/mes.hex2 -f stage0/elf32-footer-single-main.hex2 > src/mes-mes + hex2 --LittleEndian --Architecture=1 --BaseAddress=0x1000000 -f stage0/elf32-header.hex2 -f lib/crt1.hex2 -f lib/libc-mes.hex2 -f src/mes.hex2 -f stage0/elf32-footer-single-main.hex2 > src/mes-mes exec_enable src/mes-mes *** Tinycc ./build.sh diff --git a/HACKING b/HACKING index 1c432e18..904c9245 100644 --- a/HACKING +++ b/HACKING @@ -24,7 +24,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: mlibc/libc-gcc.c and steal ideas. +the gcc variant of mes libc: lib/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. diff --git a/guile/guix/make.scm b/guile/guix/make.scm index 76e5393a..7408321a 100644 --- a/guile/guix/make.scm +++ b/guile/guix/make.scm @@ -343,9 +343,9 @@ "-D" "POSIX=1" "-I" "src" - "-I" "mlibc" - "-I" "mlibc/include" - "--include=mlibc/libc-gcc.c")) + "-I" "lib" + "-I" "include" + "--include=lib/libc-gcc.c")) (define %C32-FLAGS '("--std=gnu99" @@ -353,8 +353,8 @@ "-g" "-m32" "-I" "src" - "-I" "mlibc" - "-I" "mlibc/include")) + "-I" "lib" + "-I" "include")) (define* (CC.gcc #:key (libc #t) (cc (if (eq? libc #t) %CC %CC32)) (c-flags (if (eq? libc #t) %C-FLAGS %C32-FLAGS)) (defines '()) (includes '())) (method (name "CC.gcc") @@ -538,6 +538,6 @@ (if (target? o) o (find (lambda (t) (equal? (target-file-name t) o)) %targets))) -(define crt1.mlibc-o (compile.gcc "mlibc/crt1.c" #:libc #f)) -(define libc-gcc.mlibc-o (compile.gcc "mlibc/libc-gcc.c" #:libc #f)) -(define libc-gcc+tcc.mlibc-o (compile.gcc "mlibc/libc-gcc+tcc.c" #:libc #f)) +(define crt1.mlibc-o (compile.gcc "lib/crt1.c" #:libc #f)) +(define libc-gcc.mlibc-o (compile.gcc "lib/libc-gcc.c" #:libc #f)) +(define libc-gcc+tcc.mlibc-o (compile.gcc "lib/libc-gcc+tcc.c" #:libc #f)) diff --git a/mlibc/include/00-test.i b/include/00-test.i similarity index 100% rename from mlibc/include/00-test.i rename to include/00-test.i diff --git a/mlibc/include/30-test.i b/include/30-test.i similarity index 100% rename from mlibc/include/30-test.i rename to include/30-test.i diff --git a/mlibc/include/alloca.h b/include/alloca.h similarity index 100% rename from mlibc/include/alloca.h rename to include/alloca.h diff --git a/mlibc/include/assert.h b/include/assert.h similarity index 100% rename from mlibc/include/assert.h rename to include/assert.h diff --git a/mlibc/include/ctype.h b/include/ctype.h similarity index 100% rename from mlibc/include/ctype.h rename to include/ctype.h diff --git a/mlibc/include/dlfcn.h b/include/dlfcn.h similarity index 100% rename from mlibc/include/dlfcn.h rename to include/dlfcn.h diff --git a/mlibc/include/endian.h b/include/endian.h similarity index 100% rename from mlibc/include/endian.h rename to include/endian.h diff --git a/mlibc/include/errno.h b/include/errno.h similarity index 100% rename from mlibc/include/errno.h rename to include/errno.h diff --git a/mlibc/include/fcntl.h b/include/fcntl.h similarity index 100% rename from mlibc/include/fcntl.h rename to include/fcntl.h diff --git a/mlibc/include/features.h b/include/features.h similarity index 100% rename from mlibc/include/features.h rename to include/features.h diff --git a/mlibc/include/float.h b/include/float.h similarity index 100% rename from mlibc/include/float.h rename to include/float.h diff --git a/mlibc/include/getopt.h b/include/getopt.h similarity index 100% rename from mlibc/include/getopt.h rename to include/getopt.h diff --git a/mlibc/include/inttypes.h b/include/inttypes.h similarity index 100% rename from mlibc/include/inttypes.h rename to include/inttypes.h diff --git a/mlibc/include/libgen.h b/include/libgen.h similarity index 100% rename from mlibc/include/libgen.h rename to include/libgen.h diff --git a/mlibc/include/limits.h b/include/limits.h similarity index 100% rename from mlibc/include/limits.h rename to include/limits.h diff --git a/mlibc/include/locale.h b/include/locale.h similarity index 100% rename from mlibc/include/locale.h rename to include/locale.h diff --git a/mlibc/include/math.h b/include/math.h similarity index 100% rename from mlibc/include/math.h rename to include/math.h diff --git a/mlibc/include/mlibc.h b/include/mlibc.h similarity index 100% rename from mlibc/include/mlibc.h rename to include/mlibc.h diff --git a/mlibc/include/setjmp.h b/include/setjmp.h similarity index 100% rename from mlibc/include/setjmp.h rename to include/setjmp.h diff --git a/mlibc/include/signal.h b/include/signal.h similarity index 100% rename from mlibc/include/signal.h rename to include/signal.h diff --git a/mlibc/include/stdarg.h b/include/stdarg.h similarity index 100% rename from mlibc/include/stdarg.h rename to include/stdarg.h diff --git a/mlibc/include/stdbool.h b/include/stdbool.h similarity index 100% rename from mlibc/include/stdbool.h rename to include/stdbool.h diff --git a/mlibc/include/stddef.h b/include/stddef.h similarity index 100% rename from mlibc/include/stddef.h rename to include/stddef.h diff --git a/mlibc/include/stdint.h b/include/stdint.h similarity index 100% rename from mlibc/include/stdint.h rename to include/stdint.h diff --git a/mlibc/include/stdio.h b/include/stdio.h similarity index 100% rename from mlibc/include/stdio.h rename to include/stdio.h diff --git a/mlibc/include/stdlib.h b/include/stdlib.h similarity index 100% rename from mlibc/include/stdlib.h rename to include/stdlib.h diff --git a/mlibc/include/stdnoreturn.h b/include/stdnoreturn.h similarity index 100% rename from mlibc/include/stdnoreturn.h rename to include/stdnoreturn.h diff --git a/mlibc/include/string.h b/include/string.h similarity index 100% rename from mlibc/include/string.h rename to include/string.h diff --git a/mlibc/include/strings.h b/include/strings.h similarity index 100% rename from mlibc/include/strings.h rename to include/strings.h diff --git a/mlibc/include/sys/cdefs.h b/include/sys/cdefs.h similarity index 100% rename from mlibc/include/sys/cdefs.h rename to include/sys/cdefs.h diff --git a/mlibc/include/sys/mman.h b/include/sys/mman.h similarity index 100% rename from mlibc/include/sys/mman.h rename to include/sys/mman.h diff --git a/mlibc/include/sys/select.h b/include/sys/select.h similarity index 100% rename from mlibc/include/sys/select.h rename to include/sys/select.h diff --git a/mlibc/include/sys/stat.h b/include/sys/stat.h similarity index 100% rename from mlibc/include/sys/stat.h rename to include/sys/stat.h diff --git a/mlibc/include/sys/time.h b/include/sys/time.h similarity index 100% rename from mlibc/include/sys/time.h rename to include/sys/time.h diff --git a/mlibc/include/sys/timeb.h b/include/sys/timeb.h similarity index 100% rename from mlibc/include/sys/timeb.h rename to include/sys/timeb.h diff --git a/mlibc/include/sys/types.h b/include/sys/types.h similarity index 100% rename from mlibc/include/sys/types.h rename to include/sys/types.h diff --git a/mlibc/include/sys/ucontext.h b/include/sys/ucontext.h similarity index 100% rename from mlibc/include/sys/ucontext.h rename to include/sys/ucontext.h diff --git a/mlibc/include/sys/wait.h b/include/sys/wait.h similarity index 100% rename from mlibc/include/sys/wait.h rename to include/sys/wait.h diff --git a/mlibc/include/time.h b/include/time.h similarity index 100% rename from mlibc/include/time.h rename to include/time.h diff --git a/mlibc/include/unistd.h b/include/unistd.h similarity index 100% rename from mlibc/include/unistd.h rename to include/unistd.h diff --git a/mlibc/crt1.c b/lib/crt1.c similarity index 100% rename from mlibc/crt1.c rename to lib/crt1.c diff --git a/mlibc/getopt.c b/lib/getopt.c similarity index 100% rename from mlibc/getopt.c rename to lib/getopt.c diff --git a/mlibc/libc-gcc+tcc.c b/lib/libc-gcc+tcc.c similarity index 100% rename from mlibc/libc-gcc+tcc.c rename to lib/libc-gcc+tcc.c diff --git a/mlibc/libc-gcc.c b/lib/libc-gcc.c similarity index 100% rename from mlibc/libc-gcc.c rename to lib/libc-gcc.c diff --git a/mlibc/libc-mes+tcc.c b/lib/libc-mes+tcc.c similarity index 100% rename from mlibc/libc-mes+tcc.c rename to lib/libc-mes+tcc.c diff --git a/mlibc/libc-mes.c b/lib/libc-mes.c similarity index 100% rename from mlibc/libc-mes.c rename to lib/libc-mes.c diff --git a/mlibc/mini-libc-mes.c b/lib/mini-libc-mes.c similarity index 100% rename from mlibc/mini-libc-mes.c rename to lib/mini-libc-mes.c diff --git a/make.scm b/make.scm index 562270b2..8f3651c8 100755 --- a/make.scm +++ b/make.scm @@ -38,7 +38,7 @@ exec ${GUILE-guile} --no-auto-compile -L . -L guile -C . -C guile -s "$0" ${1+"$ (ice-9 match) (guix make)) -(define crt1.hex2 (m1.as "mlibc/crt1.c")) +(define crt1.hex2 (m1.as "lib/crt1.c")) (add-target crt1.hex2) (add-target crt1.mlibc-o) @@ -95,28 +95,28 @@ exec ${GUILE-guile} --no-auto-compile -L . -L guile -C . -C guile -s "$0" ${1+"$ ,@(if libc (list libc) '()))) (method (LINK.hex2 #:hex2 hex2 #:crt1 crt1 #:libc libc #:debug? (eq? libc libc-mes.hex2)))))) -;;(define mini-libc-mes.E (m1.as "mlibc/mini-libc-mes.c")) +;;(define mini-libc-mes.E (m1.as "lib/mini-libc-mes.c")) -(define libc-mes.hex2 (m1.as "mlibc/libc-mes.c")) +(define libc-mes.hex2 (m1.as "lib/libc-mes.c")) (add-target libc-mes.hex2) -(define mini-libc-mes.hex2 (m1.as "mlibc/mini-libc-mes.c")) +(define mini-libc-mes.hex2 (m1.as "lib/mini-libc-mes.c")) (add-target mini-libc-mes.hex2) -(define libc-mes+tcc.hex2 (m1.as "mlibc/libc-mes+tcc.c")) +(define libc-mes+tcc.hex2 (m1.as "lib/libc-mes+tcc.c")) (add-target libc-mes+tcc.hex2) (add-target (bin.mescc "stage0/exit-42.c" #:libc #f)) (add-target (check "stage0/exit-42.0-guile" #:exit 42)) -(add-target (cpp.mescc "mlibc/mini-libc-mes.c")) -(add-target (compile.mescc "mlibc/mini-libc-mes.c")) +(add-target (cpp.mescc "lib/mini-libc-mes.c")) +(add-target (compile.mescc "lib/mini-libc-mes.c")) (add-target (bin.mescc "stage0/exit-42.c" #:libc mini-libc-mes.hex2)) (add-target (check "stage0/exit-42.mini-guile" #:exit 42)) -(add-target (cpp.mescc "mlibc/libc-mes.c")) -(add-target (compile.mescc "mlibc/libc-mes.c")) +(add-target (cpp.mescc "lib/libc-mes.c")) +(add-target (compile.mescc "lib/libc-mes.c")) (add-target (bin.mescc "stage0/exit-42.c")) (add-target (check "stage0/exit-42.guile" #:exit 42)) @@ -130,9 +130,9 @@ exec ${GUILE-guile} --no-auto-compile -L . -L guile -C . -C guile -s "$0" ${1+"$ ((eq? libc mini-libc-mes.hex2) "mini-") (else "")) "guile") #:exit exit))) -(add-target (compile.gcc "mlibc/crt1.c" #:libc #f)) -(add-target (compile.gcc "mlibc/libc-gcc.c" #:libc #f)) -(add-target (compile.gcc "mlibc/libc-gcc+tcc.c" #:libc #f)) +(add-target (compile.gcc "lib/crt1.c" #:libc #f)) +(add-target (compile.gcc "lib/libc-gcc.c" #:libc #f)) +(add-target (compile.gcc "lib/libc-gcc+tcc.c" #:libc #f)) ;;(add-scaffold-test "t" #:libc mini-libc-mes.hex2) (add-scaffold-test "t") @@ -253,8 +253,8 @@ exec ${GUILE-guile} --no-auto-compile -L . -L guile -C . -C guile -s "$0" ${1+"$ (add-target (group "check-scaffold-tests" #:dependencies (filter (target-prefix? "check-scaffold/tests") %targets))) -(add-target (cpp.mescc "mlibc/libc-mes+tcc.c")) -(add-target (compile.mescc "mlibc/libc-mes+tcc.c")) +(add-target (cpp.mescc "lib/libc-mes+tcc.c")) +(add-target (compile.mescc "lib/libc-mes+tcc.c")) (define* (add-tcc-test name) (add-target (bin.gcc (string-append "scaffold/tinycc/" name ".c") #:libc libc-gcc.mlibc-o #:includes '("scaffold/tinycc"))) @@ -593,54 +593,54 @@ exec ${GUILE-guile} --no-auto-compile -L . -L guile -C . -C guile -s "$0" ${1+"$ ((install-guile-dir #:dir (string-append %godir)) f)) %go-files) -(add-target (install "mlibc/crt1.hex2" #:dir "lib")) -(add-target (install "mlibc/libc-mes.M1" #:dir "lib")) -(add-target (install "mlibc/libc-mes.hex2" #:dir "lib")) -(add-target (install "mlibc/libc-mes+tcc.M1" #:dir "lib")) -(add-target (install "mlibc/libc-mes+tcc.hex2" #:dir "lib")) -(add-target (install "mlibc/mini-libc-mes.M1" #:dir "lib")) -(add-target (install "mlibc/mini-libc-mes.hex2" #:dir "lib")) +(add-target (install "lib/crt1.hex2" #:dir "lib")) +(add-target (install "lib/libc-mes.M1" #:dir "lib")) +(add-target (install "lib/libc-mes.hex2" #:dir "lib")) +(add-target (install "lib/libc-mes+tcc.M1" #:dir "lib")) +(add-target (install "lib/libc-mes+tcc.hex2" #:dir "lib")) +(add-target (install "lib/mini-libc-mes.M1" #:dir "lib")) +(add-target (install "lib/mini-libc-mes.hex2" #:dir "lib")) -(add-target (install "mlibc/crt1.mlibc-o" #:dir "lib")) -(add-target (install "mlibc/libc-gcc.mlibc-o" #:dir "lib")) -(add-target (install "mlibc/libc-gcc+tcc.mlibc-o" #:dir "lib")) +(add-target (install "lib/crt1.mlibc-o" #:dir "lib")) +(add-target (install "lib/libc-gcc.mlibc-o" #:dir "lib")) +(add-target (install "lib/libc-gcc+tcc.mlibc-o" #:dir "lib")) (for-each (lambda (f) ((install-dir #:dir "share/") f)) - '("mlibc/include/alloca.h" - "mlibc/include/assert.h" - "mlibc/include/ctype.h" - "mlibc/include/dlfcn.h" - "mlibc/include/errno.h" - "mlibc/include/fcntl.h" - "mlibc/include/features.h" - "mlibc/include/inttypes.h" - "mlibc/include/libgen.h" - "mlibc/include/limits.h" - "mlibc/include/locale.h" - "mlibc/include/math.h" - "mlibc/include/mlibc.h" - "mlibc/include/setjmp.h" - "mlibc/include/signal.h" - "mlibc/include/stdarg.h" - "mlibc/include/stdbool.h" - "mlibc/include/stdint.h" - "mlibc/include/stdio.h" - "mlibc/include/stdlib.h" - "mlibc/include/stdnoreturn.h" - "mlibc/include/string.h" - "mlibc/include/strings.h" - "mlibc/include/sys/cdefs.h" - "mlibc/include/sys/mman.h" - "mlibc/include/sys/stat.h" - "mlibc/include/sys/time.h" - "mlibc/include/sys/timeb.h" - "mlibc/include/sys/types.h" - "mlibc/include/sys/ucontext.h" - "mlibc/include/sys/wait.h" - "mlibc/include/time.h" - "mlibc/include/unistd.h")) + '("include/alloca.h" + "include/assert.h" + "include/ctype.h" + "include/dlfcn.h" + "include/errno.h" + "include/fcntl.h" + "include/features.h" + "include/inttypes.h" + "include/libgen.h" + "include/limits.h" + "include/locale.h" + "include/math.h" + "include/mlibc.h" + "include/setjmp.h" + "include/signal.h" + "include/stdarg.h" + "include/stdbool.h" + "include/stdint.h" + "include/stdio.h" + "include/stdlib.h" + "include/stdnoreturn.h" + "include/string.h" + "include/strings.h" + "include/sys/cdefs.h" + "include/sys/mman.h" + "include/sys/stat.h" + "include/sys/time.h" + "include/sys/timeb.h" + "include/sys/types.h" + "include/sys/ucontext.h" + "include/sys/wait.h" + "include/time.h" + "include/unistd.h")) (for-each (compose add-target (cut install <> #:dir "share/doc/mes")) diff --git a/module/language/c99/compiler.mes b/module/language/c99/compiler.mes index ab4cff55..e11e99ad 100644 --- a/module/language/c99/compiler.mes +++ b/module/language/c99/compiler.mes @@ -63,9 +63,9 @@ (define mes? (pair? (current-module))) (define* (c99-input->full-ast #:key (defines '()) (includes '())) - (let ((include (if (equal? %prefix "") "mlibc/include" (string-append %prefix "/share/mlibc/include")))) + (let ((include (if (equal? %prefix "") "include" (string-append %prefix "/share/include")))) (parse-c99 - #:inc-dirs (append includes (cons* include "mlibc/include" "mlibc" (or (and=> (getenv "C_INCLUDE_PATH") (cut string-split <> #\:)) '()))) + #:inc-dirs (append includes (cons* include "include" "lib" (or (and=> (getenv "C_INCLUDE_PATH") (cut string-split <> #\:)) '()))) #:cpp-defs `( "NULL=0" "__linux__=1"