build: Support --srcdir build.
[mes.git] / build-aux / build-cc.sh
index 97f16c0d5ad4ab3b11f436cd388649eb86ab42d1..1fbbce5d29eacbe3305ee936737f8a8b563ffcc4 100755 (executable)
 
 set -e
 
-if [ -n "$BUILD_DEBUG" ]; then
-    set -x
-fi
-
-export CC CFLAGS CPPFLAGS
-export CC_CFLAGS CC_CPPFLAGS
-
-CC=${CC-gcc}
-CC_CFLAGS=${CC_CFLAGS-"
---std=gnu99
--O0
--g
-"}
-
-CC_CPPFLAGS=${CC_CPPFLAGS-"
--D VERSION=\"$VERSION\"
--D MODULEDIR=\"$moduledir\"
--D PREFIX=\"$prefix\"
--I src
--I lib
--I include
-"}
-
-build-aux/mes-snarf.scm src/gc.c
-build-aux/mes-snarf.scm src/lib.c
-build-aux/mes-snarf.scm src/math.c
-build-aux/mes-snarf.scm src/mes.c
-build-aux/mes-snarf.scm src/posix.c
-build-aux/mes-snarf.scm src/reader.c
-build-aux/mes-snarf.scm src/vector.c
+. build-aux/config.sh
+. build-aux/trace.sh
+
+trace "SNARF gc.c"     build-aux/mes-snarf.scm src/gc.c
+trace "SNARF lib.c"    build-aux/mes-snarf.scm src/lib.c
+trace "SNARF math.c"   build-aux/mes-snarf.scm src/math.c
+trace "SNARF mes.c"    build-aux/mes-snarf.scm src/mes.c
+trace "SNARF posix.c"  build-aux/mes-snarf.scm src/posix.c
+trace "SNARF reader.c" build-aux/mes-snarf.scm src/reader.c
+trace "SNARF vector.c" build-aux/mes-snarf.scm src/vector.c
 
 ARCHDIR=1 NOLINK=1 sh build-aux/cc.sh lib/libmes
 sh build-aux/cc.sh src/mes