File: Makefile

package info (click to toggle)
yorick-yeti 6.2.2-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,708 kB
  • ctags: 1,606
  • sloc: ansic: 17,054; makefile: 338; sh: 9
file content (93 lines) | stat: -rw-r--r-- 2,340 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#
# Makefile -
#
#	Top-level Makefile for Yeti package and plugins.
#

# These values filled in by: yorick -batch make.i
Y_MAKEDIR=/usr/local/lib/yorick
Y_EXE=/usr/local/lib/yorick/bin/yorick
Y_EXE_PKGS=
Y_EXE_HOME=/usr/local/lib/yorick
Y_EXE_SITE=/usr/local/lib/yorick

# These values filled in by: ./configure [...]
YETI_PKGS = yeti yeti_fftw yeti_gsl yeti_regex yeti_tiff
YETI_VERSION_MAJOR = 6
YETI_VERSION_MINOR = 2
YETI_VERSION_MICRO = 2
YETI_VERSION_SUFFIX = "pre1"
YORICK_VERSION_MAJOR = 2
YORICK_VERSION_MINOR = 1
YORICK_VERSION_MICRO = 4
YORICK_VERSION_SUFFIX = "x"

SUBDIRS = $(YETI_PKGS) doc

TMPDIR=/tmp

default: all

all: check
	@for dir in $(SUBDIRS); do \
	  (cd $$dir; make); \
	done

check:
	@if test -z "$(YETI_PKGS)" -o ! -r config.h ; then \
	  echo "***************************************************************"; \
	  echo "  Before building Yeti, you must run the configuration script."; \
	  echo "  This is achieved by a command like:"; \
	  echo "      yorick -batch ./config.i [...]"; \
	  echo ""; \
	  echo "  See README file for detailled instructions.  For a summary"; \
	  echo "  of configuration options, you can also try:"; \
	  echo "      yorick -batch ./config.i --help"; \
	  echo "***************************************************************"; \
	  false; \
	else \
	  true; \
	fi

install: check
	@for dir in $(SUBDIRS); do \
	  (cd $$dir; make $@); \
	done
#	@for src in AUTHORS COPYING NEWS README VERSION; do \
#	  dst=$(Y_EXE_SITE)/doc/$$src.yeti; \
#	  cp -pf $$src $$dst; \
#	  chmod 644 $$dst; \
#	done

clean: check
	rm -f *~ *.tmp
	@for dir in $(SUBDIRS); do \
	  (cd $$dir; make $@); \
	done

distclean: clean
	rm -f config.h Makefile

distrib:
	@version=`cat VERSION`; \
	target="yeti-$${version}"; \
	tmpdir="$(TMPDIR)/$${target}"; \
	archive="$${tmpdir}.tar.bz2"; \
	if test -d "$${tmpdir}"; then \
	  echo "directory $${tmpdir} already exists"; \
	  false; \
	else \
	  olddir=`pwd`; \
	  rm -rf "$${tmpdir}"; \
	  cp -a . "$${tmpdir}"; \
	  cd "$${tmpdir}"; \
	  test -r config.h || touch config.h; \
	  make clean YETI_PKGS="yeti yeti_fftw yeti_regex yeti_tiff"; \
	  rm -f config.h; \
	  rm -rf devel */RCS; \
	  cd "$(TMPDIR)"; \
	  tar cf - "$${target}" | bzip2 -9 > "$${archive}"; \
	  cd "$${olddir}"; \
	  rm -rf "$${tmpdir}"; \
	  echo "archive is: $${archive}"; \
	fi