38d30a3e42
* GNUmakefile (OUT,QUIET,SUBDIRS): New variables. include make/common.make * .gitignore: Remove toplevel targets. * build-aux/compile-all.scm: Import from GNU Guix. * configure (gulp-pipe): Check exit status. Actually test for CC, CC32. * make/bin.make: New file. * make/check.make: New file. * make/clean.make: New file. * make/common.make: New file. * make/compile.make: New file. * make/guile.make: New file. * make/mescc-guile.make: New file. * make/mescc-mes.make: New file. * make/reset.make: New file. * lib/mlibc.c: Rename from top. * lib/start.c: Rename from top. * module/module.make: New file. * scaffold/scaffold.make: New file. * scripts/scripts.make: New file. * src/mes.c: Rename from top. * src/src.make: New file. * src/mes.c: Rename from top. * src/gc..c: Rename from top. * src/lib.c: Rename from top. * src/posix.c: Rename from top. * src/reader.c: Rename from top. * src/vector.c: Rename from top. * tests/tests.make: New file.
34 lines
884 B
Makefile
34 lines
884 B
Makefile
GO_FILES:=$(SCM_FILES:%.scm=%.go)
|
|
CLEAN+=$(GO_FILES)
|
|
|
|
clean-go: GO_FILES:=$(GO_FILES)
|
|
clean-go:
|
|
@$(QUIET)rm -f $(GO_FILES)
|
|
|
|
INSTALL_SCM_FILES+=$(SCM_FILES)
|
|
INSTALL_GO_FILES+=$(GO_FILES)
|
|
INSTALL_MES_FILES+=$(MES_FILES)
|
|
|
|
GUILE_FLAGS:=\
|
|
--no-auto-compile\
|
|
-L guile\
|
|
-C guile\
|
|
#
|
|
|
|
all-go: DIR:=$(DIR)
|
|
all-go: SCM_FILES:=$(SCM_FILES)
|
|
all-go: GUILE_FLAGS:=$(GUILE_FLAGS)
|
|
all-go: $(SCM_FILES)
|
|
$(QUIET)rm -f $@
|
|
$(QUIET)cd $(DIR) && srcdir=$(srcdir) host=$(host) $(GUILE) $(GUILE_FLAGS:guile=../guile) -s ../build-aux/compile-all.scm $(SCM_FILES:$(DIR)/%=%)
|
|
|
|
$(GO_FILES): all-go
|
|
|
|
# these .scm files include its .mes counterpart; must add dependency to be be remade
|
|
SCM_BASES:=$(SCM_FILES:%.scm=%)
|
|
SCM_MES_FILES:=$(filter $(SCM_BASES:%=%.mes),$(MES_FILES))
|
|
$(foreach scm_mes,$(SCM_MES_FILES),$(eval $(scm_mes:%.mes=%.go): $(scm_mes)))
|
|
|
|
CHECK := $(CHECK) $(TEST)
|
|
include make/reset.make
|