Mercurial > hg > octave-thorsten
annotate octMakefile.in @ 8849:8b7e448d989c
Do not autogenerate Makefile from Makefile.in.
author | Thorsten Meyer <thorsten.meyier@gmx.de> |
---|---|
date | Tue, 24 Feb 2009 00:57:01 -0500 |
parents | 3cedb606145d |
children | 538184c540a9 |
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 | |
8849
8b7e448d989c
Do not autogenerate Makefile from Makefile.in.
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
8722
diff
changeset
|
36 CONF_DISTFILES = Makefile octMakefile.in Makeconf.in \ |
4290 | 37 configure configure.in config.guess config.sub aclocal.m4 \ |
7951
9d102940bdc7
Include acx_blas_f77_func.m4 in the distribution tarball
Rafael Laboissiere <rafael@debian.org>
parents:
7917
diff
changeset
|
38 acx_blas.m4 acx_lapack.m4 acx_blas_f77_func.m4 \ |
9d102940bdc7
Include acx_blas_f77_func.m4 in the distribution tarball
Rafael Laboissiere <rafael@debian.org>
parents:
7917
diff
changeset
|
39 config.h.in install-sh autogen.sh |
1895 | 40 |
8849
8b7e448d989c
Do not autogenerate Makefile from Makefile.in.
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
8722
diff
changeset
|
41 BUILT_DISTFILES = BUGS INSTALL.OCTAVE |
6796 | 42 |
1895 | 43 DISTFILES = $(CONF_DISTFILES) \ |
7062 | 44 COPYING INSTALL NEWS \ |
4378 | 45 NEWS.[0-9] PROJECTS README README.Linux README.Windows \ |
7088 | 46 README.Cygwin README.MSVC README.kpathsea ROADMAP SENDING-PATCHES \ |
8559
07c93dae3fdb
THANKS, Announce: remove obsolete files
John W. Eaton <jwe@octave.org>
parents:
8000
diff
changeset
|
47 move-if-change octave-sh octave-bug.in \ |
8000
ea3cd9791703
octMakefile.in (DISTFILES): add "missing" to the list
John W. Eaton <jwe@octave.org>
parents:
7951
diff
changeset
|
48 octave-config.in missing mk-opts.pl mkinstalldirs \ |
6987 | 49 mkoctfile.in run-octave.in ChangeLog ChangeLog.[0-9] |
5 | 50 |
1134 | 51 # Subdirectories in which to run `make all'. |
7253 | 52 SUBDIRS = libcruft liboctave src scripts doc examples |
3004 | 53 |
54 # Subdirectories in which to run `make all'. | |
3154 | 55 INSTALL_SUBDIRS = libcruft liboctave src scripts doc examples |
3004 | 56 |
2394 | 57 # Subdirectories in which to run `make conf-dist'. |
1895 | 58 CONF_DISTSUBDIRS = src |
59 | |
1134 | 60 # Subdirectories in which to run `make dist'. |
7253 | 61 DISTSUBDIRS = $(sort $(SUBDIRS) test emacs) |
5 | 62 |
2394 | 63 # Subdirectories in which to run clean targets. |
5170 | 64 CLEANSUBDIRS = $(DISTSUBDIRS) |
2394 | 65 |
7916
f805e026c481
octMakefile.in (DIRS_TO_MAKE): update list
John W. Eaton <jwe@octave.org>
parents:
7315
diff
changeset
|
66 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
|
67 $(fcnfiledir) $(localfcnfiledir) $(localapifcnfiledir) \ |
8722
3cedb606145d
create $(DESTDIR)$(octetcdir) when installing
John W. Eaton <jwe@octave.org>
parents:
8719
diff
changeset
|
68 $(localverfcnfiledir) $(octetcdir) $(octfiledir) $(localoctfiledir) \ |
7917
fa8f13a05687
octMakefile.in (DIRS_TO_MAKE): finish previous change
John W. Eaton <jwe@octave.org>
parents:
7916
diff
changeset
|
69 $(localapioctfiledir) $(localveroctfiledir) $(imagedir) $(archlibdir) \ |
fa8f13a05687
octMakefile.in (DIRS_TO_MAKE): finish previous change
John W. Eaton <jwe@octave.org>
parents:
7916
diff
changeset
|
70 $(localarchlibdir) $(localapiarchlibdir) $(localverarchlibdir) |
666 | 71 |
5788 | 72 SHELL_SCRIPTS = octave-bug octave-config mkoctfile run-octave |
5635 | 73 |
6290 | 74 all: $(SHELL_SCRIPTS) $(filter-out libcruft liboctave, $(SUBDIRS)) dist-info-files |
6444 | 75 @echo "" |
6428 | 76 @echo "Octave successfully built. Now choose from the following:" |
77 @echo "" | |
7143 | 78 @echo " ./run-octave - to run in place to test before installing" |
6428 | 79 @echo " make check - to run the tests" |
8696
87cb8b2e4f14
octMakefile.in (all): display $(prefix) in summary message
John W. Eaton <jwe@octave.org>
parents:
8559
diff
changeset
|
80 @echo " make install - to install (PREFIX=$(prefix))" |
6428 | 81 @echo "" |
5 | 82 .PHONY: all |
83 | |
5635 | 84 src: liboctave |
85 | |
86 liboctave: libcruft | |
87 | |
88 $(SUBDIRS): | |
3646 | 89 $(MAKE) -C $@ all |
5635 | 90 .PHONY: $(SUBDIRS) |
3646 | 91 |
7315 | 92 octave-bug: octave-bug.in Makeconf octMakefile $(top_srcdir)/src/version.h |
2147 | 93 @$(do-subst-config-vals) |
2454 | 94 chmod a+rx $@ |
2147 | 95 |
7315 | 96 octave-config: octave-config.in Makeconf octMakefile $(top_srcdir)/src/version.h |
3845 | 97 @$(do-subst-default-vals) |
98 chmod a+rx $@ | |
99 | |
7315 | 100 mkoctfile: mkoctfile.in Makeconf octMakefile $(top_srcdir)/src/version.h |
2147 | 101 @$(do-subst-config-vals) |
2454 | 102 chmod a+rx $@ |
798 | 103 |
5776 | 104 run-octave: run-octave.in Makeconf octMakefile |
105 @$(do-subst-script-vals) | |
106 chmod a+rx "$@" | |
107 | |
5 | 108 check: |
5840 | 109 $(MAKE) -C test $@ |
5 | 110 .PHONY: check |
111 | |
112 octave.info: | |
3297 | 113 $(MAKE) -C doc/interpreter octave.info |
5 | 114 .PHONY: octave.info |
115 | |
3297 | 116 BUGS INSTALL.OCTAVE: |
117 $(MAKE) -C doc ../$@ | |
118 .PHONY: BUGS INSTALL.OCTAVE | |
5 | 119 |
2811 | 120 install install-strip :: |
4413 | 121 $(top_srcdir)/mkinstalldirs $(addprefix $(DESTDIR), $(DIRS_TO_MAKE)) |
122 rm -f $(DESTDIR)$(bindir)/octave-bug | |
123 $(INSTALL_SCRIPT) octave-bug $(DESTDIR)$(bindir)/octave-bug-$(version) | |
5454 | 124 (cd $(DESTDIR)$(bindir); $(LN_S) octave-bug-$(version) $(DESTDIR)$(bindir)/octave-bug) |
4413 | 125 rm -f $(DESTDIR)$(bindir)/octave-config |
126 $(INSTALL_SCRIPT) \ | |
127 octave-config $(DESTDIR)$(bindir)/octave-config-$(version) | |
5454 | 128 (cd $(DESTDIR)$(bindir); $(LN_S) octave-config-$(version) $(DESTDIR)$(bindir)/octave-config) |
4413 | 129 rm -f $(DESTDIR)$(bindir)/mkoctfile |
130 $(INSTALL_SCRIPT) mkoctfile $(DESTDIR)$(bindir)/mkoctfile-$(version) | |
5454 | 131 (cd $(DESTDIR)$(bindir); $(LN_S) mkoctfile-$(version) $(DESTDIR)$(bindir)/mkoctfile) |
4413 | 132 $(INSTALL_DATA) config.h $(DESTDIR)$(octincludedir)/octave/config.h |
8719
679c270b7584
install DOC and NEWS in $octetcdir
John W. Eaton <jwe@octave.org>
parents:
8696
diff
changeset
|
133 $(INSTALL_DATA) $(srcdir)/NEWS $(DESTDIR)$(octetcdir)/NEWS |
4413 | 134 |
135 uninstall:: | |
136 rm -f $(DESTDIR)$(bindir)/octave-bug | |
137 rm -f $(DESTDIR)$(bindir)/octave-bug-$(version) | |
138 rm -f $(DESTDIR)$(bindir)/octave-config | |
139 rm -f $(DESTDIR)$(bindir)/octave-config-$(version) | |
140 rm -f $(DESTDIR)$(bindir)/mkoctfile | |
141 rm -f $(DESTDIR)$(bindir)/mkoctfile-$(version) | |
142 rm -f $(DESTDIR)$(octincludedir)/octave/config.h | |
8719
679c270b7584
install DOC and NEWS in $octetcdir
John W. Eaton <jwe@octave.org>
parents:
8696
diff
changeset
|
143 rm -f $(DESTDIR)$(octetcdir)/NEWS |
5 | 144 |
1391 | 145 maintainer-clean:: |
1392 | 146 @echo "" |
147 @echo "************************************************************" | |
148 @echo "* *" | |
149 @echo "* This command is intended for maintainers to use; it *" | |
150 @echo "* deletes files that may require special tools to rebuild. *" | |
151 @echo "* *" | |
152 @echo "************************************************************" | |
153 @echo "" | |
1391 | 154 |
2811 | 155 install install-strip uninstall tags TAGS:: |
3004 | 156 $(foreach d, $(INSTALL_SUBDIRS), $(do-subdir-for-command)) |
2811 | 157 .PHONY: install install-strip uninstall tags |
2046 | 158 |
159 clean mostlyclean distclean maintainer-clean:: | |
2394 | 160 $(foreach d, $(CLEANSUBDIRS), $(do-subdir-for-command)) |
2046 | 161 .PHONY: clean mostlyclean distclean maintainer-clean |
5 | 162 |
3287 | 163 maintainer-clean distclean:: |
8849
8b7e448d989c
Do not autogenerate Makefile from Makefile.in.
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
8722
diff
changeset
|
164 rm -f octMakefile Makeconf |
4710 | 165 rm -f config.cache config.h config.log config.status |
166 rm -rf autom4te.cache | |
6987 | 167 rm -f $(SHELL_SCRIPTS) |
6090 | 168 rm -f unistd.h |
2812 | 169 |
3287 | 170 maintainer-clean:: |
4440 | 171 rm -f configure config.h.in BUGS INSTALL.OCTAVE |
5 | 172 |
692 | 173 # Rules for making a source distribution. |
5 | 174 |
2624 | 175 dist-info-files: INSTALL.OCTAVE BUGS |
2405 | 176 .PHONY: dist-info-files |
177 | |
5913 | 178 # The dist target depends on all because we use Octave to build some |
179 # figures for the manual. It's best to create those figures with the | |
180 # version of Octave that we are distributing (it may even be required). | |
181 | |
6290 | 182 dist: all |
5 | 183 echo octave-$(version) > .fname |
184 rm -rf `cat .fname` | |
185 mkdir `cat .fname` | |
6798 | 186 ln $(addprefix $(srcdir)/, $(DISTFILES)) `cat .fname` |
6796 | 187 ln $(BUILT_DISTFILES) `cat .fname` |
2629 | 188 for dir in $(DISTSUBDIRS); do \ |
3029 | 189 mkdir `cat .fname`/$$dir; \ |
3297 | 190 $(MAKE) -C $$dir dist; \ |
2629 | 191 done |
692 | 192 tar chf `cat .fname`.tar `cat .fname` |
193 rm -rf `cat .fname` | |
2624 | 194 tar xf `cat .fname`.tar |
195 find `cat .fname` \( \( -name RCS -a -type d \) \ | |
2782 | 196 -o \( -name CVS -a -type d \) -o \( -name OLD -a -type d \) \ |
3926 | 197 -o \( -name autom4te.cache -a -type d \) \ |
2782 | 198 -o -name "=*" -o -name '*~' -o -name '#*#' -o -name config.log \ |
3151 | 199 -o -name config.status -o -name config.cache -o -name stamp-h \ |
3601 | 200 -o -name klibtool.config -o -name stamp-auto \ |
201 -o -name c-auto.h \) -print | xargs rm -rf | |
2624 | 202 rm -f `cat .fname`/test/octave.test/*.m |
203 chmod -R a+rwX `cat .fname` | |
204 tar cf `cat .fname`.tar `cat .fname` | |
2629 | 205 rm -rf `cat .fname` |
6358 | 206 gzip -9 --stdout `cat .fname`.tar > `cat .fname`.tar.gz |
207 bzip2 -9 --stdout `cat .fname`.tar > `cat .fname`.tar.bz2 | |
4843 | 208 date -u > md5sum |
209 md5sum `cat .fname`.tar.gz `cat .fname`.tar.bz2 >> md5sum | |
210 touch `cat .fname`.tar.gz `cat .fname`.tar.bz2 md5sum | |
2629 | 211 rm -f .fname |
4660 | 212 @echo "*******************" |
213 @echo "Tag the CVS archive" | |
214 @echo "*******************" | |
692 | 215 .PHONY: dist |
216 | |
2629 | 217 # Rules for making a snapshot. |
218 | |
219 snapshot-version: | |
220 @echo "creating src/version.h" | |
221 @gawk '/#define OCTAVE_VERSION[ \t]*/ { \ | |
222 datestring = strftime("%y%m%d", systime()); \ | |
223 printf("#define OCTAVE_VERSION \"ss-%s\"\n", datestring); \ | |
224 next; \ | |
225 } { print $$0 }' src/version.h > src/version.h.new | |
226 @$(top_srcdir)/move-if-change src/version.h.new src/version.h | |
227 .PHONY: snapshot-version | |
228 | |
229 snapshot: snapshot-version | |
230 $(MAKE) dist | |
231 .PHONY: snapshot | |
232 | |
233 # Rules for making a dist of just the stuff needed to run configure. | |
234 | |
235 conf-dist: | |
236 echo config-dist-$(version) > .fname | |
237 rm -rf `cat .fname` | |
238 mkdir `cat .fname` | |
6467 | 239 ln $(CONF_DISTFILES) `cat .fname` |
2629 | 240 for dir in $(CONF_DISTSUBDIRS); do \ |
3029 | 241 mkdir `cat .fname`/$$dir; \ |
3297 | 242 $(MAKE) -C $$dir conf-dist; \ |
2629 | 243 done |
244 tar chf `cat .fname`.tar `cat .fname` | |
245 rm -rf `cat .fname` | |
246 gzip --best `cat .fname`.tar | |
247 rm -f .fname | |
248 .PHONY: conf-dist | |
249 | |
3648 | 250 .NOTPARALLEL: |