~ubuntu-branches/ubuntu/intrepid/ecl/intrepid

« back to all changes in this revision

Viewing changes to Makefile.in

  • Committer: Bazaar Package Importer
  • Author(s): Peter Van Eynde
  • Date: 2006-05-17 02:46:26 UTC
  • Revision ID: james.westby@ubuntu.com-20060517024626-lljr08ftv9g9vefl
Tags: upstream-0.9h-20060510
ImportĀ upstreamĀ versionĀ 0.9h-20060510

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
3
# DIST: that first.
 
4
 
 
5
# make all      to compile and build Emacs.
 
6
# make install  to install it.
 
7
# make TAGS     to update tags tables.
 
8
#
 
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
 
14
#      with them.
 
15
#
 
16
#      Delete `.dvi' files here if they are not part of the distribution.
 
17
 
18
# make distclean
 
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
 
23
#      distribution.
 
24
 
25
# make realclean
 
26
#      Delete everything from the current directory that can be
 
27
#      reconstructed with this Makefile.  This typically includes
 
28
#      everything deleted by distclean.
 
29
 
 
30
SHELL = /bin/sh
 
31
MACHINE = @MACHINE_VERSION@
 
32
 
 
33
# ========================= Last release ================================
 
34
 
 
35
VERSION=@PACKAGE_VERSION@
 
36
WWW=http://ecls.sourceforge.net/
 
37
 
 
38
# ==================== Things `configure' Might Edit ====================
 
39
 
 
40
#  Where to find the source code.
 
41
#  This is set by the configure script's `--srcdir' option.
 
42
srcdir=@srcdir@
 
43
 
 
44
prefix=@prefix@
 
45
exec_prefix=@exec_prefix@
 
46
bindir=@bindir@
 
47
infodir=@infodir@
 
48
mandir=@mandir@
 
49
libdir=@libdir@
 
50
 
 
51
#  What to release
 
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
 
57
 
 
58
# ==================== Utility Programs for the Build ====================
 
59
 
 
60
#  Allow the user to specify the install program.
 
61
@SET_MAKE@
 
62
INSTALL = @INSTALL@
 
63
INSTALL_PROGRAM = @INSTALL_PROGRAM@
 
64
INSTALL_DATA = @INSTALL_DATA@
 
65
 
 
66
# ============================= Build ==============================
 
67
 
 
68
all: build/Makefile
 
69
        cd build; $(MAKE)
 
70
.PHONY: all
 
71
 
 
72
Makefile: Makefile.in build/config.status
 
73
        (cd build; ./config.status)
 
74
 
 
75
# ==================== Installation ====================
 
76
 
 
77
INSTALL_TARGET = @INSTALL_TARGET@
 
78
 
 
79
install: build/Makefile
 
80
        cd build; $(MAKE) $(INSTALL_TARGET)
 
81
uninstall:
 
82
        cd build; $(MAKE) uninstall
 
83
 
 
84
# ==================== Documentation ====================
 
85
 
 
86
info:
 
87
        (cd ${srcdir}/doc; $(MAKE) info)
 
88
dvi:
 
89
        (cd ${srcdir}/doc; $(MAKE) dvi)
 
90
 
 
91
# ==================== Cleaning up and miscellanea ====================
 
92
 
 
93
#   `clean'
 
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
 
98
#        with them.
 
99
#
 
100
clean:
 
101
        cd build; $(MAKE) clean
 
102
 
 
103
#   `distclean'
 
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
 
108
#        distribution.
 
109
 
 
110
distclean: clean
 
111
        rm -fr build/config.status
 
112
        rm -f Makefile
 
113
 
 
114
#   `realclean'
 
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.
 
122
realclean: distclean
 
123
 
 
124
TAGS tags:
 
125
        (cd ${srcdir}/src; \
 
126
         etags c/*.[cd] h/*.h)
 
127
 
 
128
check test:
 
129
        cd build; $(MAKE) test
 
130
 
 
131
TAR_DIR=ecl-$(VERSION)
 
132
 
 
133
doc: build/doc/index.html
 
134
        -mkdir doc
 
135
        (cd build/doc; make html); cp build/doc/*.html doc
 
136
build/doc/index.html:
 
137
        cd build/doc; $(MAKE)
 
138
 
 
139
source-dist: $(TAR_DIR).tgz $(TAR_DIR)-tests.tgz
 
140
 
 
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)
 
143
 
 
144
rpm: doc
 
145
        -rm -rf $(TAR_DIR)
 
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
 
155
$(TAR_DIR).tgz: doc
 
156
        -rm -rf $(TAR_DIR)
 
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:
 
162
        -rm -rf $(TAR_DIR)
 
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);
 
167
 
 
168
binary-dist: all
 
169
        su -c "rm -rf tmp"
 
170
        mkdir tmp
 
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); \
 
173
        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"
 
176
 
 
177
# This creates a ZIP file with a flattened directory structure
 
178
windows-dist: all
 
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)
 
182
windows-nsi: all
 
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
 
188
 
 
189
dist:
 
190
        cd dist; make-dist