File: Makefile

package info (click to toggle)
fv 3.0-15
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 46,936 kB
  • ctags: 28,479
  • sloc: ansic: 326,055; tcl: 83,452; sh: 10,124; yacc: 4,738; makefile: 3,172; fortran: 2,613; lex: 512; awk: 273; perl: 265; csh: 20
file content (189 lines) | stat: -rw-r--r-- 3,988 bytes parent folder | download | duplicates (4)
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
#
SHELL=/bin/sh
# 
########################################################################

TCLVERS    =  tcl8.3.2
TKVERS     =  tk8.3.2
ITCLVERS   =  itcl3.2.0
EXPVERS    =  expect-5.28
TCLSHVERS  =  8.3

FTOOLS     = $(FV)

########################################################################

COMPLIST	=	fitsTcl $(ITCLVERS) pow \
			$(TCLVERS)/unix $(TKVERS)/unix

CONFIG_OPTION	=	--enable-shared

#####################################
#                                   #
#  Top level rules for building fv  #
#                                   #
#####################################

all: tcl8 tk8 itcl fitstcl1 pow1

install: install-compiled fv1


#####################
# Package compiles
#####################

tcl8:
	if [ -d $(TCLVERS)/unix ]; then \
		cd $(TCLVERS)/unix; \
		rm -f config.cache; \
		./configure --prefix=$(FTOOLS) ${CONFIG_OPTION} ; \
		${MAKE}; \
	fi

tk8:
	if [ -d $(TKVERS)/unix ]; then \
		cd $(TKVERS)/unix; \
		rm -f config.cache; \
		./configure --prefix=$(FTOOLS) ${CONFIG_OPTION} ; \
		${MAKE}; \
	fi

expect:
	if [ -d $(EXPVERS) ]; then \
		cd $(EXPVERS); \
		rm -f config.cache; \
		./configure --prefix=$(FTOOLS) ${CONFIG_OPTION} \
		--with-tclinclude=`pwd`/../$(TCLVERS)/generic \
		--with-tkinclude=`pwd`/../$(TKVERS)/generic \
		--with-tclconfig=`pwd`/../$(TCLVERS)/unix \
		--with-tkconfig=`pwd`/../$(TKVERS)/unix; \
		${MAKE}; \
	fi


pow1:
	if [ -d pow ]; then \
		cd pow; \
		./configure --prefix=$(FTOOLS) ${CONFIG_OPTION}\
			    --with-tclinclude=`pwd`/../$(TCLVERS)/generic \
			    --with-tkinclude=`pwd`/../$(TKVERS)/generic; \
		 $(MAKE) TARGETNAME=libpow; \
	fi



itcl:
	if [ -d $(ITCLVERS) ]; then \
		cd $(ITCLVERS); \
		./configure --prefix=$(FTOOLS) ${CONFIG_OPTION} \
		    --with-tcl=`pwd`/../$(TCLVERS)/unix/ \
		    --with-tk=`pwd`/../$(TKVERS)/unix/; \
		$(MAKE); \
	fi

fitstcl1:
	if [ -d fitsTcl ]; then \
		cd fitsTcl; \
		./configure --prefix=$(FTOOLS) ${CONFIG_OPTION} \
		    --with-tclinclude=`pwd`/../$(TCLVERS)/generic; \
		$(MAKE); \
	fi

fv1:
	-mkdir ${FTOOLS}/lib/fv
	if [ -d fv ]; then \
		cd fv;\
		cp -p  fv ${FTOOLS}/bin/fv;\
		cp -pr doc ${FTOOLS}/lib/fv;\
		cp -pr class ${FTOOLS}/lib/fv;\
		cp -p  fvInit.tcl ${FTOOLS}/lib/fv; \
	fi


###################
#  Installation Rules
###################

install-compiled: install-tcl8 install-tk8 install-itcl install-pow install-fitstcl

install-tcl8:
	if [ -f $(TCLVERS)/unix/Makefile ]; then \
		cd $(TCLVERS)/unix; \
		${MAKE} install; \
	fi
	@-cd ${FTOOLS}/bin; ln -s tclsh$(TCLSHVERS) tclsh 2> /dev/null

install-tk8:
	if [ -f $(TKVERS)/unix/Makefile ]; then \
		cd $(TKVERS)/unix; \
		${MAKE} install; \
	fi
	@-cd ${FTOOLS}/bin; ln -s wish$(TCLSHVERS) wish 2> /dev/null

install-expect:
	if [ -f $(EXPVERS)/Makefile ]; then \
		cd $(EXPVERS); \
		${MAKE} install; \
	fi

install-pow:
	if [ -f pow/Makefile ]; then \
		cd pow; \
		$(MAKE) TARGETNAME=libpow install; \
	fi

install-itcl:
	if [ -f $(ITCLVERS)/Makefile ]; then \
		cd $(ITCLVERS); $(MAKE)  install; \
	fi


install-fitstcl:
	if [ -f fitsTcl/Makefile ]; then \
		cd fitsTcl; $(MAKE) FTOOLS=$(FTOOLS) install; \
	fi

##################
#  Cleaning rules
##################

cleanup: clean
	rm -rf local/man

distclean:
	@-for dir in ${COMPLIST}; do \
		if [ -f $$dir/Makefile ]; then \
			(cd $$dir; ${MAKE} distclean); status=$$?; \
		fi; \
	done
	rm -rf local/*

clean: clean-itcl clean-tcltk8 clean-fitstcl clean-pow

clean-tcltk8:
	if [ -f $(TCLVERS)/unix/Makefile ]; then \
		cd $(TCLVERS)/unix; $(MAKE) clean; rm -f config.cache; \
	fi
	if [ -f $(TKVERS)/unix/Makefile ]; then \
		cd $(TKVERS)/unix; $(MAKE) clean; rm -f config.cache; \
	fi

clean-pow:
	if [ -f pow/Makefile ]; then \
		cd pow; $(MAKE)  clean; rm -f config.cache; \
	fi

clean-itcl:
	if [ -f $(ITCLVERS)/Makefile ]; then \
		cd $(ITCLVERS); $(MAKE)  clean; rm -f config.cache; \
	fi

clean-fitstcl:
	if [ -f fitsTcl/Makefile ]; then \
		cd fitsTcl; $(MAKE)  clean; rm -f config.cache; \
	fi


dist-clean: clean