Mercurial > hg > octave-thorsten
annotate octMakefile.in @ 7916:f805e026c481
octMakefile.in (DIRS_TO_MAKE): update list
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 10 Jul 2008 10:54:19 -0400 |
parents | 3ceb12c499e9 |
children | fa8f13a05687 |
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) \ |
f805e026c481
octMakefile.in (DIRS_TO_MAKE): update list
John W. Eaton <jwe@octave.org>
parents:
7315
diff
changeset
|
70 $(localapioctfiledir) $(localveroctfiledir) $(archlibdir) \ |
f805e026c481
octMakefile.in (DIRS_TO_MAKE): update list
John W. Eaton <jwe@octave.org>
parents:
7315
diff
changeset
|
71 $(localarchlibdir) $(localverarchlibdir) \ |
4414 | 72 $(shell echo $(localfcnfilepath) | awk -F: '{for (i=1; i<=NF; i++) print $$i}') \ |
73 $(shell echo $(localoctfilepath) | awk -F: '{for (i=1; i<=NF; i++) print $$i}') | |
666 | 74 |
5788 | 75 SHELL_SCRIPTS = octave-bug octave-config mkoctfile run-octave |
5635 | 76 |
6290 | 77 all: $(SHELL_SCRIPTS) $(filter-out libcruft liboctave, $(SUBDIRS)) dist-info-files |
6444 | 78 @echo "" |
6428 | 79 @echo "Octave successfully built. Now choose from the following:" |
80 @echo "" | |
7143 | 81 @echo " ./run-octave - to run in place to test before installing" |
6428 | 82 @echo " make check - to run the tests" |
83 @echo " make install - to install" | |
84 @echo "" | |
5 | 85 .PHONY: all |
86 | |
5635 | 87 src: liboctave |
88 | |
89 liboctave: libcruft | |
90 | |
91 $(SUBDIRS): | |
3646 | 92 $(MAKE) -C $@ all |
5635 | 93 .PHONY: $(SUBDIRS) |
3646 | 94 |
7315 | 95 octave-bug: octave-bug.in Makeconf octMakefile $(top_srcdir)/src/version.h |
2147 | 96 @$(do-subst-config-vals) |
2454 | 97 chmod a+rx $@ |
2147 | 98 |
7315 | 99 octave-config: octave-config.in Makeconf octMakefile $(top_srcdir)/src/version.h |
3845 | 100 @$(do-subst-default-vals) |
101 chmod a+rx $@ | |
102 | |
7315 | 103 mkoctfile: mkoctfile.in Makeconf octMakefile $(top_srcdir)/src/version.h |
2147 | 104 @$(do-subst-config-vals) |
2454 | 105 chmod a+rx $@ |
798 | 106 |
5776 | 107 run-octave: run-octave.in Makeconf octMakefile |
108 @$(do-subst-script-vals) | |
109 chmod a+rx "$@" | |
110 | |
5 | 111 check: |
5840 | 112 $(MAKE) -C test $@ |
5 | 113 .PHONY: check |
114 | |
115 octave.info: | |
3297 | 116 $(MAKE) -C doc/interpreter octave.info |
5 | 117 .PHONY: octave.info |
118 | |
3297 | 119 BUGS INSTALL.OCTAVE: |
120 $(MAKE) -C doc ../$@ | |
121 .PHONY: BUGS INSTALL.OCTAVE | |
5 | 122 |
2811 | 123 install install-strip :: |
4413 | 124 $(top_srcdir)/mkinstalldirs $(addprefix $(DESTDIR), $(DIRS_TO_MAKE)) |
125 rm -f $(DESTDIR)$(bindir)/octave-bug | |
126 $(INSTALL_SCRIPT) octave-bug $(DESTDIR)$(bindir)/octave-bug-$(version) | |
5454 | 127 (cd $(DESTDIR)$(bindir); $(LN_S) octave-bug-$(version) $(DESTDIR)$(bindir)/octave-bug) |
4413 | 128 rm -f $(DESTDIR)$(bindir)/octave-config |
129 $(INSTALL_SCRIPT) \ | |
130 octave-config $(DESTDIR)$(bindir)/octave-config-$(version) | |
5454 | 131 (cd $(DESTDIR)$(bindir); $(LN_S) octave-config-$(version) $(DESTDIR)$(bindir)/octave-config) |
4413 | 132 rm -f $(DESTDIR)$(bindir)/mkoctfile |
133 $(INSTALL_SCRIPT) mkoctfile $(DESTDIR)$(bindir)/mkoctfile-$(version) | |
5454 | 134 (cd $(DESTDIR)$(bindir); $(LN_S) mkoctfile-$(version) $(DESTDIR)$(bindir)/mkoctfile) |
4413 | 135 $(INSTALL_DATA) config.h $(DESTDIR)$(octincludedir)/octave/config.h |
6253 | 136 $(INSTALL_DATA) $(srcdir)/NEWS $(DESTDIR)$(datadir)/octave/$(version)/NEWS |
4413 | 137 |
138 uninstall:: | |
139 rm -f $(DESTDIR)$(bindir)/octave-bug | |
140 rm -f $(DESTDIR)$(bindir)/octave-bug-$(version) | |
141 rm -f $(DESTDIR)$(bindir)/octave-config | |
142 rm -f $(DESTDIR)$(bindir)/octave-config-$(version) | |
143 rm -f $(DESTDIR)$(bindir)/mkoctfile | |
144 rm -f $(DESTDIR)$(bindir)/mkoctfile-$(version) | |
145 rm -f $(DESTDIR)$(octincludedir)/octave/config.h | |
6253 | 146 rm -f $(DESTDIR)$(datadir)/octave/$(version)/NEWS |
5 | 147 |
1391 | 148 maintainer-clean:: |
1392 | 149 @echo "" |
150 @echo "************************************************************" | |
151 @echo "* *" | |
152 @echo "* This command is intended for maintainers to use; it *" | |
153 @echo "* deletes files that may require special tools to rebuild. *" | |
154 @echo "* *" | |
155 @echo "************************************************************" | |
156 @echo "" | |
1391 | 157 |
2811 | 158 install install-strip uninstall tags TAGS:: |
3004 | 159 $(foreach d, $(INSTALL_SUBDIRS), $(do-subdir-for-command)) |
2811 | 160 .PHONY: install install-strip uninstall tags |
2046 | 161 |
162 clean mostlyclean distclean maintainer-clean:: | |
2394 | 163 $(foreach d, $(CLEANSUBDIRS), $(do-subdir-for-command)) |
2046 | 164 .PHONY: clean mostlyclean distclean maintainer-clean |
5 | 165 |
3287 | 166 maintainer-clean distclean:: |
7063 | 167 rm -f octMakefile Makefile Makeconf |
4710 | 168 rm -f config.cache config.h config.log config.status |
169 rm -rf autom4te.cache | |
6987 | 170 rm -f $(SHELL_SCRIPTS) |
6090 | 171 rm -f unistd.h |
2812 | 172 |
3287 | 173 maintainer-clean:: |
4440 | 174 rm -f configure config.h.in BUGS INSTALL.OCTAVE |
5 | 175 |
692 | 176 # Rules for making a source distribution. |
5 | 177 |
2624 | 178 dist-info-files: INSTALL.OCTAVE BUGS |
2405 | 179 .PHONY: dist-info-files |
180 | |
5913 | 181 # The dist target depends on all because we use Octave to build some |
182 # figures for the manual. It's best to create those figures with the | |
183 # version of Octave that we are distributing (it may even be required). | |
184 | |
6290 | 185 dist: all |
5 | 186 echo octave-$(version) > .fname |
187 rm -rf `cat .fname` | |
188 mkdir `cat .fname` | |
6798 | 189 ln $(addprefix $(srcdir)/, $(DISTFILES)) `cat .fname` |
6796 | 190 ln $(BUILT_DISTFILES) `cat .fname` |
2629 | 191 for dir in $(DISTSUBDIRS); do \ |
3029 | 192 mkdir `cat .fname`/$$dir; \ |
3297 | 193 $(MAKE) -C $$dir dist; \ |
2629 | 194 done |
692 | 195 tar chf `cat .fname`.tar `cat .fname` |
196 rm -rf `cat .fname` | |
2624 | 197 tar xf `cat .fname`.tar |
198 find `cat .fname` \( \( -name RCS -a -type d \) \ | |
2782 | 199 -o \( -name CVS -a -type d \) -o \( -name OLD -a -type d \) \ |
3926 | 200 -o \( -name autom4te.cache -a -type d \) \ |
2782 | 201 -o -name "=*" -o -name '*~' -o -name '#*#' -o -name config.log \ |
3151 | 202 -o -name config.status -o -name config.cache -o -name stamp-h \ |
3601 | 203 -o -name klibtool.config -o -name stamp-auto \ |
204 -o -name c-auto.h \) -print | xargs rm -rf | |
2624 | 205 rm -f `cat .fname`/test/octave.test/*.m |
206 chmod -R a+rwX `cat .fname` | |
207 tar cf `cat .fname`.tar `cat .fname` | |
2629 | 208 rm -rf `cat .fname` |
6358 | 209 gzip -9 --stdout `cat .fname`.tar > `cat .fname`.tar.gz |
210 bzip2 -9 --stdout `cat .fname`.tar > `cat .fname`.tar.bz2 | |
4843 | 211 date -u > md5sum |
212 md5sum `cat .fname`.tar.gz `cat .fname`.tar.bz2 >> md5sum | |
213 touch `cat .fname`.tar.gz `cat .fname`.tar.bz2 md5sum | |
2629 | 214 rm -f .fname |
4660 | 215 @echo "*******************" |
216 @echo "Tag the CVS archive" | |
217 @echo "*******************" | |
692 | 218 .PHONY: dist |
219 | |
2629 | 220 # Rules for making a snapshot. |
221 | |
222 snapshot-version: | |
223 @echo "creating src/version.h" | |
224 @gawk '/#define OCTAVE_VERSION[ \t]*/ { \ | |
225 datestring = strftime("%y%m%d", systime()); \ | |
226 printf("#define OCTAVE_VERSION \"ss-%s\"\n", datestring); \ | |
227 next; \ | |
228 } { print $$0 }' src/version.h > src/version.h.new | |
229 @$(top_srcdir)/move-if-change src/version.h.new src/version.h | |
230 .PHONY: snapshot-version | |
231 | |
232 snapshot: snapshot-version | |
233 $(MAKE) dist | |
234 .PHONY: snapshot | |
235 | |
236 # Rules for making a dist of just the stuff needed to run configure. | |
237 | |
238 conf-dist: | |
239 echo config-dist-$(version) > .fname | |
240 rm -rf `cat .fname` | |
241 mkdir `cat .fname` | |
6467 | 242 ln $(CONF_DISTFILES) `cat .fname` |
6796 | 243 ln $(BUILT_CONF_DISTFILES) `cat .fname` |
2629 | 244 for dir in $(CONF_DISTSUBDIRS); do \ |
3029 | 245 mkdir `cat .fname`/$$dir; \ |
3297 | 246 $(MAKE) -C $$dir conf-dist; \ |
2629 | 247 done |
248 tar chf `cat .fname`.tar `cat .fname` | |
249 rm -rf `cat .fname` | |
250 gzip --best `cat .fname`.tar | |
251 rm -f .fname | |
252 .PHONY: conf-dist | |
253 | |
3648 | 254 .NOTPARALLEL: |