Factor out and update the usual Guile rules.
* build-aux/guile-rules.am: New file. * .gitignore: Do not ignore it. * Makefile.am: Include it, remove the rules it replaces, update changed variable names, and use appending for 'EXTRA_DIST' and 'CLEANFILES'.
This commit is contained in:
parent
7e3dd750b1
commit
315815bbd6
|
@ -9,6 +9,7 @@
|
||||||
!/build-aux/git-version-gen
|
!/build-aux/git-version-gen
|
||||||
!/build-aux/gitlab-ci.yml
|
!/build-aux/gitlab-ci.yml
|
||||||
!/build-aux/gitlog-to-changelog
|
!/build-aux/gitlog-to-changelog
|
||||||
|
!/build-aux/guile-rules.am
|
||||||
!/build-aux/pre-inst-env.in
|
!/build-aux/pre-inst-env.in
|
||||||
/config.log
|
/config.log
|
||||||
/config.status
|
/config.status
|
||||||
|
|
33
Makefile.am
33
Makefile.am
|
@ -1,24 +1,4 @@
|
||||||
moddir=$(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)
|
include $(top_srcdir)/build-aux/guile-rules.am
|
||||||
godir=$(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/ccache
|
|
||||||
|
|
||||||
GOBJECTS = $(MODULES:%.scm=%.go)
|
|
||||||
|
|
||||||
nobase_mod_DATA = $(MODULES) $(NOCOMP_SOURCES)
|
|
||||||
nobase_go_DATA = $(GOBJECTS)
|
|
||||||
|
|
||||||
# Make sure source files are installed first, so that the mtime of
|
|
||||||
# installed compiled files is greater than that of installed source
|
|
||||||
# files. See
|
|
||||||
# <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
|
|
||||||
# for details.
|
|
||||||
guile_install_go_files = install-nobase_nodist_guileobjectDATA
|
|
||||||
$(guile_install_go_files): install-nobase_dist_guilemoduleDATA
|
|
||||||
|
|
||||||
GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat
|
|
||||||
SUFFIXES = .scm .go
|
|
||||||
.scm.go:
|
|
||||||
$(AM_V_GEN)$(top_builddir)/pre-inst-env \
|
|
||||||
$(GUILE_TOOLS) compile $(GUILE_WARNINGS) -o "$@" "$<"
|
|
||||||
|
|
||||||
TEST_EXTENSIONS = .scm .sh
|
TEST_EXTENSIONS = .scm .sh
|
||||||
SCM_LOG_COMPILER = $(top_builddir)/pre-inst-env $(GUILE)
|
SCM_LOG_COMPILER = $(top_builddir)/pre-inst-env $(GUILE)
|
||||||
|
@ -60,7 +40,7 @@ gen-ChangeLog:
|
||||||
mv $(distdir)/ChangeLog-t $(distdir)/ChangeLog
|
mv $(distdir)/ChangeLog-t $(distdir)/ChangeLog
|
||||||
|
|
||||||
|
|
||||||
MODULES = \
|
GUILE_MODULES = \
|
||||||
gash/built-ins/break.scm \
|
gash/built-ins/break.scm \
|
||||||
gash/built-ins/cd.scm \
|
gash/built-ins/cd.scm \
|
||||||
gash/built-ins/colon.scm \
|
gash/built-ins/colon.scm \
|
||||||
|
@ -104,8 +84,8 @@ bin_SCRIPTS = \
|
||||||
|
|
||||||
do_subst = sed \
|
do_subst = sed \
|
||||||
-e 's,[@]GUILE[@],$(GUILE),g' \
|
-e 's,[@]GUILE[@],$(GUILE),g' \
|
||||||
-e 's,[@]MODDIR[@],$(moddir),g' \
|
-e 's,[@]MODDIR[@],$(guilemoduledir),g' \
|
||||||
-e 's,[@]GODIR[@],$(godir),g'
|
-e 's,[@]GODIR[@],$(guileobjectdir),g'
|
||||||
|
|
||||||
scripts/gash: scripts/gash.in Makefile
|
scripts/gash: scripts/gash.in Makefile
|
||||||
$(do_subst) < $(srcdir)/scripts/gash.in > scripts/gash
|
$(do_subst) < $(srcdir)/scripts/gash.in > scripts/gash
|
||||||
|
@ -246,11 +226,10 @@ XFAIL_TESTS = \
|
||||||
BROKEN_TESTS = \
|
BROKEN_TESTS = \
|
||||||
tests/50-redirect-merge.sh
|
tests/50-redirect-merge.sh
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST += \
|
||||||
scripts/gash.in
|
scripts/gash.in
|
||||||
|
|
||||||
CLEANFILES = \
|
CLEANFILES += \
|
||||||
$(GOBJECTS) \
|
|
||||||
$(bin_SCRIPTS) \
|
$(bin_SCRIPTS) \
|
||||||
$(FULL_TESTS:tests/%.sh=tests/%.log) \
|
$(FULL_TESTS:tests/%.sh=tests/%.log) \
|
||||||
$(FULL_TESTS:tests/%.sh=tests/%.trs) \
|
$(FULL_TESTS:tests/%.sh=tests/%.trs) \
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
guilemoduledir=$(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)
|
||||||
|
guileobjectdir=$(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/site-ccache
|
||||||
|
|
||||||
|
GUILE_OBJECTS = $(GUILE_MODULES:%.scm=%.go)
|
||||||
|
|
||||||
|
nobase_guilemodule_DATA = $(GUILE_MODULES)
|
||||||
|
nobase_guileobject_DATA = $(GUILE_OBJECTS)
|
||||||
|
|
||||||
|
# Make sure source files are installed first, so that the mtime of
|
||||||
|
# installed compiled files is greater than that of installed source
|
||||||
|
# files. See
|
||||||
|
# <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
|
||||||
|
# for details.
|
||||||
|
guile_install_go_files = install-nobase_nodist_guileobjectDATA
|
||||||
|
$(guile_install_go_files): install-nobase_dist_guilemoduleDATA
|
||||||
|
|
||||||
|
GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat
|
||||||
|
SUFFIXES = .scm .go
|
||||||
|
.scm.go:
|
||||||
|
$(AM_V_GEN)$(top_builddir)/pre-inst-env \
|
||||||
|
$(GUILD) compile $(GUILE_WARNINGS) -o "$@" "$<"
|
||||||
|
|
||||||
|
EXTRA_DIST = $(GUILE_MODULES)
|
||||||
|
|
||||||
|
CLEANFILES = $(GUILE_OBJECTS)
|
Loading…
Reference in New Issue