home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Gadgets 1
/
ADE-1.bin
/
ade-dist
/
octave-1.1.1p1-src.tgz
/
tar.out
/
fsf
/
octave
/
octMakefile.in
< prev
next >
Wrap
Text File
|
1996-09-28
|
7KB
|
270 lines
#
# Makefile for octave
#
# John W. Eaton
# jwe@che.utexas.edu
# Department of Chemical Engineering
# The University of Texas at Austin
TOPDIR = .
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
include $(TOPDIR)/Makeconf
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
DISTFILES = BUGS COPYING INSTALL INSTALL.OCTAVE Makefile.in \
octMakefile.in Makeconf.in NEWS PROJECTS README README.NLP \
SENDING-PATCHES THANKS f2c-compat.sh flibs.sh cxxlibs.sh \
configure configure.in config.guess config.sub float-type.c \
move-if-change octave.sh octave-bug.in octave-mode.el \
install-sh doinstall.sh mkinstalldirs config.h.in acconfig.h \
MAKEINFO.PATCH ChangeLog ChangeLog.[0-9]
# Complete directory trees to distribute.
DISTDIRS = kpathsea
# Subdirectories in which to run `make all'.
SUBDIRS = libcruft liboctave @DLD_DIR@ info readline kpathsea src \
scripts doc
# Subdirectories in which to run `make dist'.
DISTSUBDIRS = libcruft liboctave info readline src scripts dld test doc
BINDISTFILES = COPYING ChangeLog NEWS README THANKS INSTALL.OCTAVE \
BUGS PROJECTS octave-bug octave.sh octave-mode.el doinstall.sh \
mkinstalldirs
# Subdirectories in which to run `make dist'.
BINDISTSUBDIRS = scripts doc
DIRS_TO_MAKE = $(bindir) $(fcnfiledir) $(octfiledir) $(archlibdir) \
`echo $(localfcnfilepath) | awk -F: '{for (i=1; i<=NF; i++) print $i}'` \
`echo $(localoctfilepath) | awk -F: '{for (i=1; i<=NF; i++) print $i}'`
all: octave-bug $(SUBDIRS)
.PHONY: all
octave-bug: octave-bug.in
@(sed < $< > $@.tmp \
-e "s;%VERSION%;${version};" \
-e "s;%TARGET_HOST_TYPE%;${target_host_type};" \
-e "s;%F77%;${F77};" \
-e "s;%FFLAGS%;${FFLAGS};" \
-e "s;%F2C%;${F2C};" \
-e "s;%F2CFLAGS%;${F2CFLAGS};" \
-e "s;%FLIBS%;${FLIBS};" \
-e "s;%CC%;${CC};" \
-e "s;%CFLAGS%;${BUG_CFLAGS};" \
-e "s;%CXX%;${CXX};" \
-e "s;%CXXFLAGS%;${BUG_CXXFLAGS};" \
-e "s;%LDFLAGS%;${LDFLAGS};" \
-e "s;%DEFS%;${UGLY_DEFS};")
@mv $@.tmp $@
$(SUBDIRS):
echo making all in $@
cd $@ ; $(MAKE) all
.PHONY: $(SUBDIRS)
check:
cd test; $(MAKE) check
.PHONY: check
octave.info:
cd doc ; $(MAKE) octave.info
.PHONY: octave.info
INSTALL.info:
cd doc ; $(MAKE) ../INSTALL.OCTAVE
.PHONY: INSTALL.info
BUGS.info:
cd doc ; $(MAKE) ../BUGS
.PHONY: BUGS.info
install:
$(top_srcdir)/mkinstalldirs $(DIRS_TO_MAKE)
$(INSTALL) octave-bug $(bindir)/octave-bug
for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir; $(MAKE) $@; cd ..; done
.PHONY: install
uninstall:
for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir; $(MAKE) $@; cd ..; done
.PHONY: uninstall
tags:
for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir; $(MAKE) $@; cd ..; done
.PHONY: tags
TAGS:
for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir; $(MAKE) $@; cd ..; done
.PHONY: TAGS
clean:
for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir; $(MAKE) $@; cd ..; done
.PHONY: clean
mostlyclean:
for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir; $(MAKE) $@; cd ..; done
.PHONY: mostlyclean
distclean: clean
for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir; $(MAKE) $@; cd ..; done
rm -f Makefile config.cache config.log config.status
.PHONY: distclean
realclean:
for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir; $(MAKE) $@; cd ..; done
rm -f Makefile config.status
.PHONY: realclean
# Now that things are under RCS control, we need to do the recursive
# chmod so that the distributed files end up with reasonable modes.
# Shared rules for making clean tar files.
clean-tar:
echo octave-$(version) > .fname
tar xf `cat .fname`.tar
find `cat .fname` \( \( -name RCS -a -type d \) \
-o -name '*~' -o -name '#*#' \) -print | xargs rm -rf
rm -f `cat .fname`/test/octave.test/*.m
rm -rf `cat .fname`/test/octave.test/npsol
rm -rf `cat .fname`/test/octave.test/qpsol
chmod -R a+rwX `cat .fname`
tar cf `cat .fname`.tar `cat .fname`
rm -rf `cat .fname` .fname
.PHONY: clean-tar
dist-z:
echo octave-$(version) > .fname
gzip --best `cat .fname`.tar
rm -f .fname
.PHONY: dist-z
# Rules for making a source distribution.
links-for-dist: octave.info INSTALL.info BUGS.info
echo octave-$(version) > .fname
rm -rf `cat .fname`
mkdir `cat .fname`
ln $(DISTFILES) `cat .fname`
for dir in $(DISTDIRS); do ln -s ../$$dir `cat .fname`; done
for dir in $(DISTSUBDIRS); do mkdir `cat .fname`/$$dir; cd $$dir; $(MAKE) dist; cd ..; done
.PHONY: links-for-dist
dist-tar: links-for-dist
tar chf `cat .fname`.tar `cat .fname`
rm -rf `cat .fname`
.PHONY: dist-tar
clean-dist-tar: dist-tar
$(MAKE) clean-tar
.PHONY: clean-dist-tar
dist: clean-dist-tar
.PHONY: dist
# Rules for making a binary distribution.
links-for-bin-dist: octave.info INSTALL.info BUGS.info
echo octave-$(version) > .fname
rm -rf `cat .fname`
mkdir `cat .fname`
ln $(BINDISTFILES) `cat .fname`
for dir in $(BINDISTSUBDIRS); do mkdir `cat .fname`/$$dir; cd $$dir; $(MAKE) dist; cd ..; done
.PHONY: links-for-dist
bin-dist-tar: links-for-bin-dist
-strip src/octave
echo octave-$(version) > .fname
ln src/octave `cat .fname`/octave
-strip scripts/image/octtopnm
ln scripts/image/octtopnm `cat .fname`/octtopnm
tar chf `cat .fname`.tar `cat .fname`
rm -rf `cat .fname`
.PHONY: bin-dist-tar
clean-bin-dist-tar: bin-dist-tar
$(MAKE) clean-tar
.PHONY: clean-bin-dist-tar
binary-dist: clean-bin-dist-tar
.PHONY: binary-dist
# Rules for making a distribution of the docs.
doc-dist-tar:
echo octave-$(version) > .fname
echo octave-doc-$(version).tar > .tarfname
rm -rf `cat .fname`
mkdir `cat .fname`
ln README.doc COPYING `cat .fname`
mkdir `cat .fname`/doc; cd doc; $(MAKE) doc-dist
tar chf `cat .tarfname` `cat .fname`
rm -rf `cat .fname`
.PHONY: doc-dist-tar
doc-dist: doc-dist-tar
.PHONY: doc-dist
# Rules for making a distribution for local use.
local-dist-tar: octave.info INSTALL.info BUGS.info
echo octave-local-$(version) > .fname
rm -rf `cat .fname`
mkdir `cat .fname`
ln $(DISTFILES) `cat .fname`
for dir in $(DISTDIRS); do ln -s ../$$dir `cat .fname`; done
for dir in $(DISTSUBDIRS); do mkdir `cat .fname`/$$dir; cd $$dir; $(MAKE) $@; cd ..; done
tar chf `cat .fname`.tar `cat .fname`
rm -rf `cat .fname`
.PHONY: local-dist-tar
clean-local-dist-tar: local-dist-tar
$(MAKE) clean-tar
.PHONY: clean-local-dist-tar
local-dist: clean-local-dist-tar
.PHONY: local-dist
# Rules for splitting a distribution.
split-dist:
echo octave-$(version) > .fname
split -b 1350k `cat .fname`.tar.gz `cat .fname`.tar.gz-
rm -f .fname
.PHONY: split-dist
split-local-dist:
echo octave-local-$(version) > .fname
split -b 1350k `cat .fname`.tar.gz `cat .fname`.tar.gz-
rm -f .fname
.PHONY: split-local-dist
# Rules for making a snapshot.
snapshot-z: snapshot-version
$(MAKE) dist
$(MAKE) dist-z
.PHONY: snapshot-z
snapshot: snapshot-z
.PHONY: snapshot
snapshot-version:
@echo "creating src/version.h"
@gawk '/#define OCTAVE_VERSION[ \t]*/ { \
datestring = strftime("%y%m%d", systime()); \
printf("#define OCTAVE_VERSION \"ss-%s\"\n", datestring); \
next; \
} { print $$0 }' src/version.h > src/version.h.new
@$(top_srcdir)/move-if-change src/version.h.new src/version.h
.PHONY: snapshot-version