File: Makefile.in

package info (click to toggle)
mccode 3.5.19%2Bds5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,113,256 kB
  • sloc: ansic: 40,697; python: 25,137; yacc: 8,438; sh: 5,405; javascript: 4,596; lex: 1,632; cpp: 742; perl: 296; lisp: 273; makefile: 226; fortran: 132
file content (92 lines) | stat: -rwxr-xr-x 4,256 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
# Makefile for McStas.
#
#   This file is part of the McStas neutron ray-trace simulation package
#   Copyright (C) 1997-2008, All rights reserved
#   Risoe National Laborartory, Roskilde, Denmark
#   Institut Laue Langevin, Grenoble, France
#
#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; version 3 of the License.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program; if not, write to the Free Software
#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

# Available methods for installation
# make perl-modules      	Install perl modules Proc-Simple Tk-CodeText Math-Amoeba
# make perl-PGPLOT      	Install perl modules F77+PGPLOT (require pgplot lib)
# make compile-pgplot     Compile pgplot5 libs
# make compile-scilab     Compile scilab
# make compile-tk         Compile Tk

SHELL = /bin/sh

prefix = @prefix@
srcdir = @srcdir@
mc_libdir = @prefix@/lib/@MCCODE_TARNAME@/
G77  = @G77@

PERL = @PERL@
PERLBIN=`which perl`
PERL5LIB=@prefix@/lib/@MCCODE_TARNAME@/tools/perl/modules:`perl -e "print join(\":\", @INC);"`
PGPLOT_DIR=@prefix@/pgplot
LD_LIBRARY_PATH=${PGPLOT_DIR}
USE_PIC=@USE_PIC@

REL=4.0
SCIREL=scilab-$REL
SCIFILE=$SCIREL.bin.linux-i686.tar.gz
	
perl-modules:
	$(srcdir)/../../mkinstalldirs  $(mc_libdir)/tools/perl/modules
	# install Proc-Simple
	cd $(srcdir)/Perl/Proc-Simple-1.19 && $(PERL) Makefile.PL LIB=$(mc_libdir)/tools/perl/modules PREFIX=$(mc_libdir)/tools/perl/modules && make && make install
	# install Tk-CodeText
	cd $(srcdir)/Perl/Tk-CodeText-0.3.4 && $(PERL) Makefile.PL LIB=$(mc_libdir)/tools/perl/modules PREFIX=$(mc_libdir)/tools/perl/modules && make && make install
	# install Math-Amoeba
	cd $(srcdir)/Perl/Math-Amoeba-0.04 && $(PERL) Makefile.PL LIB=$(mc_libdir)/tools/perl/modules PREFIX=$(mc_libdir)/tools/perl/modules && make && make install
	@echo "Installed Proc-Simple Tk-CodeText Math-Amoeba perl modules in @prefix@/lib/@MCCODE_TARNAME@/tools/perl/modules"

perl-PGPLOT:
	$(srcdir)/../../mkinstalldirs  $(mc_libdir)/tools/perl/modules
	# install F77 
	cd $(srcdir)/Perl/ExtUtils-F77-1.16 && perl Makefile.PL PREFIX=@prefix@/lib/@MCCODE_TARNAME@/tools/perl/modules LIB=@prefix@/lib/@MCCODE_TARNAME@/tools/perl/modules && make && make install
	# install perl-PGPLOT
	cd $(srcdir)/Perl/PGPLOT-2.20
	if test "`basename ${G77}`" = "g77" ; then \
		  sed 's/#use ExtUtils::F77 qw(generic g77);/use ExtUtils::F77 qw(generic g77);/' $(srcdir)/Perl/PGPLOT-2.20/Makefile.PL > $(srcdir)/Perl/PGPLOT-2.20/Makefile.PL.new ; \
		  mv $(srcdir)/Perl/PGPLOT-2.20/Makefile.PL.new $(srcdir)/Perl/PGPLOT-2.20/Makefile.PL; \
	fi
	cd $(srcdir)/Perl/PGPLOT-2.20 && export PERL5LIB=${PERL5LIB} && perl Makefile.PL PREFIX=@prefix@/lib/@MCCODE_TARNAME@/tools/perl/modules LIB=@prefix@/lib/@MCCODE_TARNAME@/tools/perl/modules && make && make install
	@echo "Installed perl-PGPLOT modules in @prefix@/lib/@MCCODE_TARNAME@/tools/perl/modules"

install-pgplot: compile-pgplot perl-PGPLOT
compile-pgplot:
	cd pgplot && make && make install
	@echo "Installed pgplot libraries in ${PGPLOT_DIR}"

install-scilab: compile-scilab
compile-scilab:
	export TMPDIR=`mktemp -d`
	# Get + unpack scilab from the net...
	cd ${TMPDIR} && wget http://www.scilab.org/download/${REL}/${SCIFILE}
	cd ${TMPDIR} && gunzip -c ${SCIFILE} | tar xf -
	cd ${prefix} && tar xzf ${TMPDIR}/${SCIFILE}
	cd ${prefix}/${SCIREL} && make
	echo "Setting up links in ${prefix}/bin"
	ln -s ${prefix}/${SCIREL}/bin/scil* ${prefix}/bin
	# Removing dowloaded archive
	rm -rf ${TMPDIR}

compile-tk:
	if [ $(WGET) != no ]; then \
		$(WGET) http://www.mcstas.org/download/Tk-804.027_gtk2_patch.tar.gz &&\
		tar xzvf Tk-804.027_gtk2_patch.tar.gz > /dev/null && \
		cd Tk-804.027_gtk2_patch && $(PERL) Makefile.PL LIB=$(mc_libdir)/tools/perl/modules PREFIX=$(mc_libdir)/tools/perl/modules && make && make install ;\
	fi;