1
# DIST: This is the distribution Makefile for ECL. configure can
2
# DIST: make most of the changes to this file you might want, so try
5
# make all to compile and build Emacs.
6
# make install to install it.
7
# make TAGS to update tags tables.
9
# make clean or make mostlyclean
10
# Delete all files from the current directory that are normally
11
# created by building the program. Don't delete the files that
12
# record the configuration. Also preserve files that could be made
13
# by building, but normally aren't because the distribution comes
16
# Delete `.dvi' files here if they are not part of the distribution.
19
# Delete all files from the current directory that are created by
20
# configuring or building the program. If you have unpacked the
21
# source and built the program without creating any other files,
22
# `make distclean' should leave only the files that were in the
26
# Delete everything from the current directory that can be
27
# reconstructed with this Makefile. This typically includes
28
# everything deleted by distclean.
31
MACHINE = @MACHINE_VERSION@
33
# ========================= Last release ================================
35
VERSION=@PACKAGE_VERSION@
36
WWW=http://ecls.sourceforge.net/
38
# ==================== Things `configure' Might Edit ====================
40
# Where to find the source code.
41
# This is set by the configure script's `--srcdir' option.
45
exec_prefix=@exec_prefix@
52
TAR_CONTENTS=Makefile.in README.1st LGPL ANNOUNCEMENT Copyright doc \
53
configure src/c src/cmp src/clos src/CHANGELOG src/lsp src/doc \
54
src/h src/gmp src/config* src/install.sh src/Makefile.in \
55
src/util contrib/ src/clx src/gc src/*.in src/*.m4 src/gabriel \
56
src/tests/Makefile.in src/ansi-tests/Makefile.in msvc examples
58
# ==================== Utility Programs for the Build ====================
60
# Allow the user to specify the install program.
63
INSTALL_PROGRAM = @INSTALL_PROGRAM@
64
INSTALL_DATA = @INSTALL_DATA@
66
# ============================= Build ==============================
72
Makefile: Makefile.in build/config.status
73
(cd build; ./config.status)
75
# ==================== Installation ====================
77
INSTALL_TARGET = @INSTALL_TARGET@
79
install: build/Makefile
80
cd build; $(MAKE) $(INSTALL_TARGET)
82
cd build; $(MAKE) uninstall
84
# ==================== Documentation ====================
87
(cd ${srcdir}/doc; $(MAKE) info)
89
(cd ${srcdir}/doc; $(MAKE) dvi)
91
# ==================== Cleaning up and miscellanea ====================
94
# Delete all files from the current directory that are normally
95
# created by building the program. Don't delete the files that
96
# record the configuration. Also preserve files that could be made
97
# by building, but normally aren't because the distribution comes
101
cd build; $(MAKE) clean
104
# Delete all files from the current directory that are created by
105
# configuring or building the program. If you have unpacked the
106
# source and built the program without creating any other files,
107
# `make distclean' should leave only the files that were in the
111
rm -fr build/config.status
115
# Delete everything from the current directory that can be
116
# reconstructed with this Makefile.
117
# One exception, however: `make realclean' should not delete
118
# `configure' even if `configure' can be remade using a rule in the
119
# Makefile. More generally, `make realclean' should not delete
120
# anything that needs to exist in order to run `configure' and then
121
# begin to build the program.
126
etags c/*.[cd] h/*.h)
129
cd build; $(MAKE) test
131
TAR_DIR=ecl-$(VERSION)
133
doc: build/doc/index.html
135
(cd build/doc; make html); cp build/doc/*.html doc
136
build/doc/index.html:
137
cd build/doc; $(MAKE)
139
source-dist: $(TAR_DIR).tgz $(TAR_DIR)-tests.tgz
141
rpmdir=$(shell rpm --showrc | grep '^-[0-9]*:.*[^{]_topdir' | sed 's,^.*topdir[ ]*\(.*\)[ ]*,\1,')
142
rpmbuild=$(shell if [ -z `which rpmbuild` ]; then echo "rpm"; else echo "rpmbuild"; fi)
146
mkdir $(TAR_DIR) $(TAR_DIR)/src \
147
$(TAR_DIR)/src/tests $(TAR_DIR)/src/ansi-tests && \
148
for i in $(TAR_CONTENTS); do cp -rf $$i $(TAR_DIR)/$$i; done && \
149
tar -cz --exclude '*~' --exclude '#*' --exclude 'CVS' -f $(rpmdir)/SOURCES/$(TAR_DIR).tgz $(TAR_DIR)
150
if [ -f /etc/SuSE-release ]; then HOST=SUSE; else HOST=REDHAT; fi; \
151
cat src/util/ecl.spec |\
152
sed 's,ECL_VERSION,$(VERSION),;s,^#% '$${HOST}' ,,g;'|\
153
grep -v '^#% ' > $(rpmdir)/SPECS/ecl.spec;
154
rpm -ba $(rpmdir)/SPECS/ecl.spec
157
mkdir $(TAR_DIR) $(TAR_DIR)/src \
158
$(TAR_DIR)/src/tests $(TAR_DIR)/src/ansi-tests && \
159
for i in $(TAR_CONTENTS); do cp -rf $$i $(TAR_DIR)/$$i; done && \
160
tar -cz --exclude '*~' --exclude '#*' --exclude 'CVS' -f $(TAR_DIR).tgz $(TAR_DIR)
161
$(TAR_DIR)-tests.tgz:
163
mkdir $(TAR_DIR) && \
164
mkdir $(TAR_DIR)/src && \
165
cp -rf src/ansi-tests $(TAR_DIR)/src && \
166
tar -cz --exclude '*~' --exclude '#*' --exclude 'CVS' -f $(TAR_DIR)-tests.tgz $(TAR_DIR);
171
for i in tmp$(bindir) tmp$(infodir) tmp$(mandir) tmp$(libdir); do \
172
(echo $$i; IFS="/"; \for k in $$i; do echo $$k; (test -d $$k || mkdir $$k); chmod 755 $$k; cd $$k; done); \
174
prefix=`pwd`/tmp; cd build; $(MAKE) install prefix=$(prefix)
175
su -c "chown -R root.root tmp && cd tmp; tar czf ../ecl-$(VERSION)-$(MACHINE).tgz * && cd .. && rm -rf tmp"
177
# This creates a ZIP file with a flattened directory structure
179
cd build; rm -rf $(TAR_DIR); mkdir $(TAR_DIR); \
180
$(MAKE) flatinstall prefix=`pwd`/$(TAR_DIR); \
181
zip -r $(TAR_DIR).zip $(TAR_DIR)
183
cd build; rm -rf $(TAR_DIR); mkdir $(TAR_DIR); \
184
$(MAKE) flatinstall prefix=`pwd`/$(TAR_DIR)
185
`pwd`/src/util/ecl_nsi.sh `pwd`/src/util/ecl.nsi build/$(TAR_DIR)
186
makensis.exe build/$(TAR_DIR)/ecl.nsi
187
mv build/$(TAR_DIR)/Setup.exe ecl-$(VERSION).exe