forked from shirok/Gauche
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
161 lines (133 loc) · 5.61 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# Top Makefle for Gauche
# Run 'configure' script to generate Makefile
.PHONY: all test check pre-package install uninstall \
clean distclean maintainer-clean install-check \
rpmfiles
@SET_MAKE@
SHELL = @SHELL@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
srcdir = @srcdir@
datadir = @datadir@
datarootdir = @datarootdir@
top_srcdir = @top_srcdir@
SUBDIRS = gc src lib ext doc examples tools
SRIDBUS = tools examples doc ext lib src gc
LIBATOMICDIR = gc/libatomic_ops
MKINSTDIR = $(top_srcdir)/mkinstalldirs
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
GAUCHE_VERSION = @GAUCHE_VERSION@
GAUCHE_DATA_DIR = $(datadir)/gauche-@GAUCHE_ABI_VERSION@
GAUCHE_ARCH_DIR = $(libdir)/gauche-@GAUCHE_ABI_VERSION@
GAUCHE_ACLOCAL_DIR = $(GAUCHE_DATA_DIR)/$(GAUCHE_VERSION)/
BUILD_GOSH = @BUILD_GOSH@
BUILD_GOSH_VERSION = @BUILD_GOSH_VERSION@
BUILD_GOSH_FLAGS =
DESTDIR =
GOSH = gosh
LN_S = @LN_S@
PRE_PACKAGE_GENERATED = INSTALL.en.adoc INSTALL.ja.adoc pre-package.stamp
CONFIG_GENERATED = Makefile config.cache config.log config.status \
libtool configure.lineno autom4* gc/autom4* \
gc/configure.gnu-gauche Gauche.spec
AUTOCONF_GENERATED = $(CONFIG_GENERATED) configure
TESTRECORD = ./test.record
all: pre-package.stamp
if [ $(srcdir) != "." ]; then $(srcdir)/wirebuildlibs "$(srcdir)" "$(LN_S)"; fi
for d in $(SUBDIRS); do (cd $$d; $(MAKE) all) || exit 1; done
cd src; $(MAKE) -s static
@@CYGWIN_FIXDLL@
test : check
check: all
@rm -f $(TESTRECORD)
set -e; for d in $(SUBDIRS); do (cd $$d; $(MAKE) check); done
@cd src; $(MAKE) test2
@cat $(TESTRECORD)
@cd src; $(MAKE) test-summary-check
install-check:
@echo "Testing installed Gauche"
@rm -f test.log $(TESTRECORD)
@(cd src; $(MAKE) install-check) >> test.log
@(cd ext; $(MAKE) install-check) >> test.log
@cat $(TESTRECORD)
@cd src; $(MAKE) test-summary-check
# pre-package target should be run before creating distribution tarball.
# it generates files that requires pre-installed gosh.
pre-package: $(PRE_PACKAGE_GENERATED)
cd src; $(MAKE) GOSH=$(GOSH) BUILD_GOSH_FLAGS=$(BUILD_GOSH_FLAGS) pre-package
cd ext; $(MAKE) GOSH=$(GOSH) BUILD_GOSH_FLAGS=$(BUILD_GOSH_FLAGS) pre-package
cd doc; $(MAKE) GOSH=$(GOSH) BUILD_GOSH_FLAGS=$(BUILD_GOSH_FLAGS) pre-package
# Check if the host's Gauche is recent enough to generate files for this version.
pre-package.stamp:
"$(BUILD_GOSH)" "$(srcdir)/tools/check-build-version" ${BUILD_GOSH_VERSION} && touch pre-package.stamp
INSTALL.en.adoc: INSTALL.adoc
sed -e '/^ifdef::JA/,/^endif::JA/d ; /^ifdef::EN/d ; /^endif::EN/d ; /^\/\/@start header/,/^\/\/@end header/d' $< > $@
INSTALL.ja.adoc: INSTALL.adoc
sed -e '/^ifdef::EN/,/^endif::EN/d ; /^ifdef::JA/d ; /^endif::JA/d ; /^\/\/@start header/,/^\/\/@end header/d' $< > $@
install: install-doc install-pkg
install-doc:
cd doc; $(MAKE) install
# it is important to install lib and ext _before_ src, since they
# depend on gosh's rpath to point a valid version of libgauche.so.
install-pkg:
cd lib; $(MAKE) install
cd ext; $(MAKE) install
cd src; $(MAKE) install
$(INSTALL_DATA) "$(srcdir)/m4/gauche.m4" "$(DESTDIR)$(GAUCHE_ACLOCAL_DIR)/aclocal.m4"
$(MKINSTDIR) "$(DESTDIR)$(datadir)/aclocal"
$(INSTALL_DATA) "$(srcdir)/m4/gauche.m4" "$(DESTDIR)$(datadir)/aclocal/gauche.m4"
# for the backward compatibility;
# now slibcat is created in the build tree by default.
slibcat-in-place:
cd lib; $(MAKE) slibcat-in-place
uninstall:
cd src; $(MAKE) uninstall
cd ext; $(MAKE) uninstall
cd lib; $(MAKE) uninstall
cd doc; $(MAKE) uninstall
rm -f $(GAUCHE_ACLOCAL_DIR)/aclocal.m4
rm -f $(datadir)/aclocal/gauche.m4
# Install selected examples. We don't usually install examples. For Windows
# we distribute binary, so it's useful to include some examples in it.
install-examples:
$(INSTALL) -d "$(DESTDIR)${prefix}/examples"
$(INSTALL) -d "$(DESTDIR)${prefix}/examples/windows"
$(INSTALL_DATA) examples/windows/*.scm "$(DESTDIR)${prefix}/examples/windows"
# Cleaning ---------------------------------------------
# NB: we don't run maintainer-clean in $(LIBATOMICDIR) to avoid
# dealing with automake.
clean:
rm -rf test.log test.record core Gauche.framework rpmfiles-*.txt *~
-for d in $(SRIDBUS); do (cd $$d; $(MAKE) clean); done
-if test -f $(LIBATOMICDIR)/Makefile; then (cd $(LIBATOMICDIR); $(MAKE) clean); fi
distclean: clean
-for d in $(SRIDBUS); do (cd $$d; $(MAKE) distclean); done
-if test -f $(LIBATOMICDIR)/Makefile; then (cd $(LIBATOMICDIR); $(MAKE) distclean); fi
-(cd winnt/wix; $(MAKE) clean)
rm -rf $(CONFIG_GENERATED)
maintainer-clean: clean
-for d in $(SRIDBUS); do (cd $$d; $(MAKE) maintainer-clean); done
-if test -f $(LIBATOMICDIR)/Makefile; then \
(cd $(LIBATOMICDIR); $(MAKE) distclean; rm -f configure);\
fi
-(cd winnt/wix; $(MAKE) clean)
rm -rf $(AUTOCONF_GENERATED) VERSION DIST_EXCLUDE_X \
gc/configure gc/configure.gnu \
$(PRE_PACKAGE_GENERATED)
# MacOSX Framework specific stuff
framework: all
./framework.sh $(GAUCHE_VERSION)
# Other dummy targets -------------------------------------------
dist:
@echo "To create a distribution tarball, use DIST script."
distcheck:
@echo "To create a distribution tarball, use DIST script."
# This must be called after the current version of Gauche is installed
rpmfiles:
find $(GAUCHE_DATA_DIR)/$(VERSION) -type f -print | grep -v 'dbm/[ong]dbm' > rpmfiles-common.txt
find $(GAUCHE_DATA_DIR)/$(VERSION) -type f -print | grep 'dbm/[ong]dbm' > rpmfiles-gdbm.txt
find $(GAUCHE_ARCH_DIR)/$(VERSION) -type f -print | grep -v '/dbm--[ong]dbm' > rpmfiles-encoding.txt
find $(GAUCHE_ARCH_DIR)/$(VERSION) -type f -print | grep '/dbm--[ong]dbm' >> rpmfiles-gdbm.txt