Mercurial > octave-nkf
annotate octMakefile.in @ 7948:af10baa63915 ss-3-1-50
3.1.50 snapshot
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 18 Jul 2008 17:42:48 -0400 |
parents | fa8f13a05687 |
children | 9d102940bdc7 42dfc06588e5 |
rev | line source |
---|---|
5 | 1 # Makefile for octave |
2 # | |
7017 | 3 # Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, |
4 # 2002, 2003, 2004, 2005, 2006, 2007 John W. Eaton | |
5 # | |
7016 | 6 # This file is part of Octave. |
7 # | |
8 # Octave is free software; you can redistribute it and/or modify it | |
9 # under the terms of the GNU General Public License as published by the | |
10 # Free Software Foundation; either version 3 of the License, or (at | |
11 # your option) any later version. | |
12 # | |
13 # Octave is distributed in the hope that it will be useful, but WITHOUT | |
14 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
16 # for more details. | |
17 # | |
18 # You should have received a copy of the GNU General Public License | |
19 # along with Octave; see the file COPYING. If not, see | |
20 # <http://www.gnu.org/licenses/>. | |
5 | 21 |
22 TOPDIR = . | |
23 | |
24 srcdir = @srcdir@ | |
411 | 25 top_srcdir = @top_srcdir@ |
5798 | 26 abs_top_srcdir = @abs_top_srcdir@ |
5 | 27 VPATH = @srcdir@ |
28 | |
411 | 29 include $(TOPDIR)/Makeconf |
5 | 30 |
989 | 31 INSTALL = @INSTALL@ |
32 INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
2642 | 33 INSTALL_SCRIPT = @INSTALL_SCRIPT@ |
989 | 34 INSTALL_DATA = @INSTALL_DATA@ |
35 | |
6796 | 36 BUILT_CONF_DISTFILES = Makefile |
37 | |
38 CONF_DISTFILES = Makefile.in octMakefile.in Makeconf.in \ | |
4290 | 39 configure configure.in config.guess config.sub aclocal.m4 \ |
5527 | 40 acx_blas.m4 acx_lapack.m4 config.h.in install-sh autogen.sh |
1895 | 41 |
6796 | 42 BUILT_DISTFILES = $(BUILT_CONF_DISTFILES) BUGS INSTALL.OCTAVE |
43 | |
1895 | 44 DISTFILES = $(CONF_DISTFILES) \ |
7062 | 45 COPYING INSTALL NEWS \ |
4378 | 46 NEWS.[0-9] PROJECTS README README.Linux README.Windows \ |
7088 | 47 README.Cygwin README.MSVC README.kpathsea ROADMAP SENDING-PATCHES \ |
4378 | 48 THANKS move-if-change octave-sh octave-bug.in \ |
5276 | 49 octave-config.in mk-opts.pl mkinstalldirs \ |
6987 | 50 mkoctfile.in run-octave.in ChangeLog ChangeLog.[0-9] |
5 | 51 |
1134 | 52 # Subdirectories in which to run `make all'. |
7253 | 53 SUBDIRS = libcruft liboctave src scripts doc examples |
3004 | 54 |
55 # Subdirectories in which to run `make all'. | |
3154 | 56 INSTALL_SUBDIRS = libcruft liboctave src scripts doc examples |
3004 | 57 |
2394 | 58 # Subdirectories in which to run `make conf-dist'. |
1895 | 59 CONF_DISTSUBDIRS = src |
60 | |
1134 | 61 # Subdirectories in which to run `make dist'. |
7253 | 62 DISTSUBDIRS = $(sort $(SUBDIRS) test emacs) |
5 | 63 |
2394 | 64 # Subdirectories in which to run clean targets. |
5170 | 65 CLEANSUBDIRS = $(DISTSUBDIRS) |
2394 | 66 |
7916
f805e026c481
octMakefile.in (DIRS_TO_MAKE): update list
John W. Eaton <jwe@octave.org>
parents:
7315
diff
changeset
|
67 DIRS_TO_MAKE = $(bindir) $(datadir) $(libdir) $(octincludedir)/octave \ |
f805e026c481
octMakefile.in (DIRS_TO_MAKE): update list
John W. Eaton <jwe@octave.org>
parents:
7315
diff
changeset
|
68 $(fcnfiledir) $(localfcnfiledir) $(localapifcnfiledir) \ |
f805e026c481
octMakefile.in (DIRS_TO_MAKE): update list
John W. Eaton <jwe@octave.org>
parents:
7315
diff
changeset
|
69 $(localverfcnfiledir) $(octfiledir) $(localoctfiledir) \ |
7917
fa8f13a05687
octMakefile.in (DIRS_TO_MAKE): finish previous change
John W. Eaton <jwe@octave.org>
parents:
7916
diff
changeset
|
70 $(localapioctfiledir) $(localveroctfiledir) $(imagedir) $(archlibdir) \ |
fa8f13a05687
octMakefile.in (DIRS_TO_MAKE): finish previous change
John W. Eaton <jwe@octave.org>
parents:
7916
diff
changeset
|
71 $(localarchlibdir) $(localapiarchlibdir) $(localverarchlibdir) |
666 | 72 |
5788 | 73 SHELL_SCRIPTS = octave-bug octave-config mkoctfile run-octave |
5635 | 74 |
6290 | 75 all: $(SHELL_SCRIPTS) $(filter-out libcruft liboctave, $(SUBDIRS)) dist-info-files |
6444 | 76 @echo "" |
6428 | 77 @echo "Octave successfully built. Now choose from the following:" |
78 @echo "" | |
7143 | 79 @echo " ./run-octave - to run in place to test before installing" |
6428 | 80 @echo " make check - to run the tests" |
81 @echo " make install - to install" | |
82 @echo "" | |
5 | 83 .PHONY: all |
84 | |
5635 | 85 src: liboctave |
86 | |
87 liboctave: libcruft | |
88 | |
89 $(SUBDIRS): | |
3646 | 90 $(MAKE) -C $@ all |
5635 | 91 .PHONY: $(SUBDIRS) |
3646 | 92 |
7315 | 93 octave-bug: octave-bug.in Makeconf octMakefile $(top_srcdir)/src/version.h |
2147 | 94 @$(do-subst-config-vals) |
2454 | 95 chmod a+rx $@ |
2147 | 96 |
7315 | 97 octave-config: octave-config.in Makeconf octMakefile $(top_srcdir)/src/version.h |
3845 | 98 @$(do-subst-default-vals) |
99 chmod a+rx $@ | |
100 | |
7315 | 101 mkoctfile: mkoctfile.in Makeconf octMakefile $(top_srcdir)/src/version.h |
2147 | 102 @$(do-subst-config-vals) |
2454 | 103 chmod a+rx $@ |
798 | 104 |
5776 | 105 run-octave: run-octave.in Makeconf octMakefile |
106 @$(do-subst-script-vals) | |
107 chmod a+rx "$@" | |
108 | |
5 | 109 check: |
5840 | 110 $(MAKE) -C test $@ |
5 | 111 .PHONY: check |
112 | |
113 octave.info: | |
3297 | 114 $(MAKE) -C doc/interpreter octave.info |
5 | 115 .PHONY: octave.info |
116 | |
3297 | 117 BUGS INSTALL.OCTAVE: |
118 $(MAKE) -C doc ../$@ | |
119 .PHONY: BUGS INSTALL.OCTAVE | |
5 | 120 |
2811 | 121 install install-strip :: |
4413 | 122 $(top_srcdir)/mkinstalldirs $(addprefix $(DESTDIR), $(DIRS_TO_MAKE)) |
123 rm -f $(DESTDIR)$(bindir)/octave-bug | |
124 $(INSTALL_SCRIPT) octave-bug $(DESTDIR)$(bindir)/octave-bug-$(version) | |
5454 | 125 (cd $(DESTDIR)$(bindir); $(LN_S) octave-bug-$(version) $(DESTDIR)$(bindir)/octave-bug) |
4413 | 126 rm -f $(DESTDIR)$(bindir)/octave-config |
127 $(INSTALL_SCRIPT) \ | |
128 octave-config $(DESTDIR)$(bindir)/octave-config-$(version) | |
5454 | 129 (cd $(DESTDIR)$(bindir); $(LN_S) octave-config-$(version) $(DESTDIR)$(bindir)/octave-config) |
4413 | 130 rm -f $(DESTDIR)$(bindir)/mkoctfile |
131 $(INSTALL_SCRIPT) mkoctfile $(DESTDIR)$(bindir)/mkoctfile-$(version) | |
5454 | 132 (cd $(DESTDIR)$(bindir); $(LN_S) mkoctfile-$(version) $(DESTDIR)$(bindir)/mkoctfile) |
4413 | 133 $(INSTALL_DATA) config.h $(DESTDIR)$(octincludedir)/octave/config.h |
6253 | 134 $(INSTALL_DATA) $(srcdir)/NEWS $(DESTDIR)$(datadir)/octave/$(version)/NEWS |
4413 | 135 |
136 uninstall:: | |
137 rm -f $(DESTDIR)$(bindir)/octave-bug | |
138 rm -f $(DESTDIR)$(bindir)/octave-bug-$(version) | |
139 rm -f $(DESTDIR)$(bindir)/octave-config | |
140 rm -f $(DESTDIR)$(bindir)/octave-config-$(version) | |
141 rm -f $(DESTDIR)$(bindir)/mkoctfile | |
142 rm -f $(DESTDIR)$(bindir)/mkoctfile-$(version) | |
143 rm -f $(DESTDIR)$(octincludedir)/octave/config.h | |
6253 | 144 rm -f $(DESTDIR)$(datadir)/octave/$(version)/NEWS |
5 | 145 |
1391 | 146 maintainer-clean:: |
1392 | 147 @echo "" |
148 @echo "************************************************************" | |
149 @echo "* *" | |
150 @echo "* This command is intended for maintainers to use; it *" | |
151 @echo "* deletes files that may require special tools to rebuild. *" | |
152 @echo "* *" | |
153 @echo "************************************************************" | |
154 @echo "" | |
1391 | 155 |
2811 | 156 install install-strip uninstall tags TAGS:: |
3004 | 157 $(foreach d, $(INSTALL_SUBDIRS), $(do-subdir-for-command)) |
2811 | 158 .PHONY: install install-strip uninstall tags |
2046 | 159 |
160 clean mostlyclean distclean maintainer-clean:: | |
2394 | 161 $(foreach d, $(CLEANSUBDIRS), $(do-subdir-for-command)) |
2046 | 162 .PHONY: clean mostlyclean distclean maintainer-clean |
5 | 163 |
3287 | 164 maintainer-clean distclean:: |
7063 | 165 rm -f octMakefile Makefile Makeconf |
4710 | 166 rm -f config.cache config.h config.log config.status |
167 rm -rf autom4te.cache | |
6987 | 168 rm -f $(SHELL_SCRIPTS) |
6090 | 169 rm -f unistd.h |
2812 | 170 |
3287 | 171 maintainer-clean:: |
4440 | 172 rm -f configure config.h.in BUGS INSTALL.OCTAVE |
5 | 173 |
692 | 174 # Rules for making a source distribution. |
5 | 175 |
2624 | 176 dist-info-files: INSTALL.OCTAVE BUGS |
2405 | 177 .PHONY: dist-info-files |
178 | |
5913 | 179 # The dist target depends on all because we use Octave to build some |
180 # figures for the manual. It's best to create those figures with the | |
181 # version of Octave that we are distributing (it may even be required). | |
182 | |
6290 | 183 dist: all |
5 | 184 echo octave-$(version) > .fname |
185 rm -rf `cat .fname` | |
186 mkdir `cat .fname` | |
6798 | 187 ln $(addprefix $(srcdir)/, $(DISTFILES)) `cat .fname` |
6796 | 188 ln $(BUILT_DISTFILES) `cat .fname` |
2629 | 189 for dir in $(DISTSUBDIRS); do \ |
3029 | 190 mkdir `cat .fname`/$$dir; \ |
3297 | 191 $(MAKE) -C $$dir dist; \ |
2629 | 192 done |
692 | 193 tar chf `cat .fname`.tar `cat .fname` |
194 rm -rf `cat .fname` | |
2624 | 195 tar xf `cat .fname`.tar |
196 find `cat .fname` \( \( -name RCS -a -type d \) \ | |
2782 | 197 -o \( -name CVS -a -type d \) -o \( -name OLD -a -type d \) \ |
3926 | 198 -o \( -name autom4te.cache -a -type d \) \ |
2782 | 199 -o -name "=*" -o -name '*~' -o -name '#*#' -o -name config.log \ |
3151 | 200 -o -name config.status -o -name config.cache -o -name stamp-h \ |
3601 | 201 -o -name klibtool.config -o -name stamp-auto \ |
202 -o -name c-auto.h \) -print | xargs rm -rf | |
2624 | 203 rm -f `cat .fname`/test/octave.test/*.m |
204 chmod -R a+rwX `cat .fname` | |
205 tar cf `cat .fname`.tar `cat .fname` | |
2629 | 206 rm -rf `cat .fname` |
6358 | 207 gzip -9 --stdout `cat .fname`.tar > `cat .fname`.tar.gz |
208 bzip2 -9 --stdout `cat .fname`.tar > `cat .fname`.tar.bz2 | |
4843 | 209 date -u > md5sum |
210 md5sum `cat .fname`.tar.gz `cat .fname`.tar.bz2 >> md5sum | |
211 touch `cat .fname`.tar.gz `cat .fname`.tar.bz2 md5sum | |
2629 | 212 rm -f .fname |
4660 | 213 @echo "*******************" |
214 @echo "Tag the CVS archive" | |
215 @echo "*******************" | |
692 | 216 .PHONY: dist |
217 | |
2629 | 218 # Rules for making a snapshot. |
219 | |
220 snapshot-version: | |
221 @echo "creating src/version.h" | |
222 @gawk '/#define OCTAVE_VERSION[ \t]*/ { \ | |
223 datestring = strftime("%y%m%d", systime()); \ | |
224 printf("#define OCTAVE_VERSION \"ss-%s\"\n", datestring); \ | |
225 next; \ | |
226 } { print $$0 }' src/version.h > src/version.h.new | |
227 @$(top_srcdir)/move-if-change src/version.h.new src/version.h | |
228 .PHONY: snapshot-version | |
229 | |
230 snapshot: snapshot-version | |
231 $(MAKE) dist | |
232 .PHONY: snapshot | |
233 | |
234 # Rules for making a dist of just the stuff needed to run configure. | |
235 | |
236 conf-dist: | |
237 echo config-dist-$(version) > .fname | |
238 rm -rf `cat .fname` | |
239 mkdir `cat .fname` | |
6467 | 240 ln $(CONF_DISTFILES) `cat .fname` |
6796 | 241 ln $(BUILT_CONF_DISTFILES) `cat .fname` |
2629 | 242 for dir in $(CONF_DISTSUBDIRS); do \ |
3029 | 243 mkdir `cat .fname`/$$dir; \ |
3297 | 244 $(MAKE) -C $$dir conf-dist; \ |
2629 | 245 done |
246 tar chf `cat .fname`.tar `cat .fname` | |
247 rm -rf `cat .fname` | |
248 gzip --best `cat .fname`.tar | |
249 rm -f .fname | |
250 .PHONY: conf-dist | |
251 | |
3648 | 252 .NOTPARALLEL: |