File: Makefile.in

package info (click to toggle)
fitsh 0.9.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 2,768 kB
  • ctags: 4,050
  • sloc: ansic: 53,352; makefile: 1,120; sh: 25
file content (278 lines) | stat: -rw-r--r-- 9,552 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
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
SHELL=/bin/sh

CC=@CC@
AR=@AR@
LD=@LD@
INSTALL=@INSTALL@

.PHONY: all install \
        libfits libpsn libastro librandom src doc \
        info html pdf ps dvi \
        install install-strip \
        install-info install-html install-dvi install-pdf install-ps \
        help2man man \
        uninstall \
        clean distclean mostlyclean maintainter-clean TAGS \
        deb deb-fitsh

DEB_VERSION = @DEB_VERSION@
DEB_ARCH = @DEB_ARCH@
DPKG_DEB = @DPKG_DEB@
GZIP	 = @GZIP@

datarootdir = @datarootdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
mandir = @mandir@
bindir = @bindir@
libdir = @libdir@
includedir = @includedir@

PACKAGE_NAME    = @PACKAGE_NAME@
PACKAGE_TARNAME = @PACKAGE_TARNAME@

infodir = @infodir@
docdir  = @docdir@
htmldir = @htmldir@
dvidir  = @dvidir@
pdfdir  = @pdfdir@
psdir   = @psdir@

DLEXT = @DLEXT@

HELP2MAN = @HELP2MAN@
ROFF	 = @ROFF@
MAN	 = @MAN@
DVIPS	 = @DVIPS@

ARCH_VERSION = $(DEB_VERSION)
DIST = fitsh-$(ARCH_VERSION)

DEB=misc/deb

all: src

libastro:
	$(MAKE) -C libastro

libfits: 
	$(MAKE) -C libfits

libpsn:
	$(MAKE) -C libpsn

librandom:
	$(MAKE) -C librandom

src: libastro libfits libpsn librandom
	$(MAKE) -C src

doc:
	$(MAKE) -C doc

clean:
	$(MAKE) -C libastro clean
	$(MAKE) -C libfits clean
	$(MAKE) -C libpsn clean
	$(MAKE) -C librandom clean
	$(MAKE) -C src clean
	$(MAKE) -C doc clean
	rm -f $(DIST).tar.gz
	rm -f *.deb

distclean: clean
	rm -f -r autom4te.cache
	rm -f ./config.status ./config.log
	rm -f ./Makefile
	rm -f ./config.h
	rm -f ./libastro/Makefile 
	rm -f ./libfits/Makefile
	rm -f ./librandom/Makefile
	rm -f ./libpsn/Makefile
	rm -f ./src/Makefile 
	rm -f ./src/index/Makefile 
	rm -f ./src/io/Makefile 
	rm -f ./src/link/Makefile 
	rm -f ./src/math/Makefile 
	rm -f ./src/math/dft/Makefile 
	rm -f ./src/math/elliptic/Makefile 
	rm -f ./src/math/elliptic/Makefile 
	rm -f ./src/math/expint/Makefile 
	rm -f ./src/math/fit/Makefile 
	rm -f ./src/math/intersec/Makefile 
	rm -f ./src/math/spline/Makefile 
	rm -f ./src/parallel/Makefile 
	rm -f ./src/psn/Makefile 
	rm -f ./doc/Makefile
	rm -f ./doc/examples/Makefile
	rm -f ./doc/examples/firandom/Makefile

install: src 
	$(INSTALL) -d $(DESTDIR)${bindir} 
	$(INSTALL) -m 0755 ./src/fiarith $(DESTDIR)${bindir}
	$(INSTALL) -m 0755 ./src/ficalib $(DESTDIR)${bindir}
	$(INSTALL) -m 0755 ./src/ficombine $(DESTDIR)${bindir}
	$(INSTALL) -m 0755 ./src/ficonv $(DESTDIR)${bindir}
	$(INSTALL) -m 0755 ./src/fiheader $(DESTDIR)${bindir}
	$(INSTALL) -m 0755 ./src/fiign $(DESTDIR)${bindir}
	$(INSTALL) -m 0755 ./src/fiinfo $(DESTDIR)${bindir}
	$(INSTALL) -m 0755 ./src/fiphot $(DESTDIR)${bindir}
	$(INSTALL) -m 0755 ./src/firandom $(DESTDIR)${bindir}
	$(INSTALL) -m 0755 ./src/fistar $(DESTDIR)${bindir}
	$(INSTALL) -m 0755 ./src/fitrans $(DESTDIR)${bindir}
	$(INSTALL) -m 0755 ./src/grcollect $(DESTDIR)${bindir}
	$(INSTALL) -m 0755 ./src/grmatch $(DESTDIR)${bindir}
	$(INSTALL) -m 0755 ./src/grtrans $(DESTDIR)${bindir}
	$(INSTALL) -m 0755 ./src/lfit $(DESTDIR)${bindir}
	$(INSTALL) -d $(DESTDIR)${libdir}/fitsh
	$(INSTALL) -d $(DESTDIR)${libdir}/fitsh/lfit
	$(INSTALL) -m 0644 ./src/linear.$(DLEXT) $(DESTDIR)${libdir}/fitsh/lfit
	$(INSTALL) -d $(DESTDIR)${mandir}/man1
	$(INSTALL) -m 0644 ./man/fiarith.1.gz $(DESTDIR)${mandir}/man1
	$(INSTALL) -m 0644 ./man/ficalib.1.gz $(DESTDIR)${mandir}/man1
	$(INSTALL) -m 0644 ./man/ficombine.1.gz $(DESTDIR)${mandir}/man1
	$(INSTALL) -m 0644 ./man/ficonv.1.gz $(DESTDIR)${mandir}/man1
	$(INSTALL) -m 0644 ./man/fiheader.1.gz $(DESTDIR)${mandir}/man1
	$(INSTALL) -m 0644 ./man/fiign.1.gz $(DESTDIR)${mandir}/man1
	$(INSTALL) -m 0644 ./man/fiinfo.1.gz $(DESTDIR)${mandir}/man1
	$(INSTALL) -m 0644 ./man/fiphot.1.gz $(DESTDIR)${mandir}/man1
	$(INSTALL) -m 0644 ./man/firandom.1.gz $(DESTDIR)${mandir}/man1
	$(INSTALL) -m 0644 ./man/fistar.1.gz $(DESTDIR)${mandir}/man1
	$(INSTALL) -m 0644 ./man/fitrans.1.gz $(DESTDIR)${mandir}/man1
	$(INSTALL) -m 0644 ./man/grcollect.1.gz $(DESTDIR)${mandir}/man1
	$(INSTALL) -m 0644 ./man/grmatch.1.gz $(DESTDIR)${mandir}/man1
	$(INSTALL) -m 0644 ./man/grtrans.1.gz $(DESTDIR)${mandir}/man1
	$(INSTALL) -m 0644 ./man/lfit.1.gz $(DESTDIR)${mandir}/man1

uninstall:
	rm -f ${bindir}/fiarith
	rm -f ${bindir}/ficalib
	rm -f ${bindir}/ficombine
	rm -f ${bindir}/ficonv
	rm -f ${bindir}/fiheader
	rm -f ${bindir}/fiign
	rm -f ${bindir}/fiinfo
	rm -f ${bindir}/fiphot
	rm -f ${bindir}/firandom
	rm -f ${bindir}/fistar
	rm -f ${bindir}/fitrans
	rm -f ${bindir}/grcollect
	rm -f ${bindir}/grmatch
	rm -f ${bindir}/grtrans
	rm -f ${bindir}/lfit
	rm -f ${libdir}/fitsh/lfit/linear.$(DLEXT)
	rm -f ${mandir}/man1/fiarith.1.gz
	rm -f ${mandir}/man1/ficalib.1.gz
	rm -f ${mandir}/man1/ficombine.1.gz
	rm -f ${mandir}/man1/ficonv.1.gz
	rm -f ${mandir}/man1/fiheader.1.gz
	rm -f ${mandir}/man1/fiign.1.gz
	rm -f ${mandir}/man1/fiinfo.1.gz
	rm -f ${mandir}/man1/fiphot.1.gz
	rm -f ${mandir}/man1/firandom.1.gz
	rm -f ${mandir}/man1/fistar.1.gz
	rm -f ${mandir}/man1/fitrans.1.gz
	rm -f ${mandir}/man1/grcollect.1.gz
	rm -f ${mandir}/man1/grmatch.1.gz
	rm -f ${mandir}/man1/grtrans.1.gz
	rm -f ${mandir}/man1/lfit.1.gz

HELP2MAN_LIST=fiarith ficalib ficombine ficonv fiheader fiign fiinfo fiphot firandom fistar fitrans grcollect grmatch grtrans lfit

help2man: src
	test -d ./doc/help2man || mkdir ./doc/help2man
	cat ./doc/man.brief | while read b name; do $(HELP2MAN) -n "$$name" -N -h --long-help ./src/$$b > ./doc/help2man/$$b.1; $(GZIP) -f ./doc/help2man/$$b.1; done

man: help2man
	mkdir	-p $(MAN)
	for b in $(HELP2MAN_LIST); do cp -p ./doc/help2man/$$b.1.gz $(MAN); done

dist:
	rm      -f -r $(DIST)
	mkdir   $(DIST)
	mkdir   $(DIST)/doc
	cp      -p doc/Makefile.in $(DIST)/doc
	mkdir	$(DIST)/doc/examples
	cp	-p doc/examples/Makefile.in $(DIST)/doc/examples
	mkdir	$(DIST)/doc/examples/firandom
	cp	-p doc/examples/firandom/Makefile.in $(DIST)/doc/examples/firandom
	mkdir   $(DIST)/include
	mkdir   $(DIST)/include/astro
	cp	-p include/astro/*.[ch] $(DIST)/include/astro
	mkdir   $(DIST)/include/fits
	cp	-p include/fits/*.[ch] $(DIST)/include/fits
	mkdir   $(DIST)/include/lfit
	cp	-p include/lfit/*.[ch] $(DIST)/include/lfit
	mkdir   $(DIST)/include/psn
	cp	-p include/psn/*.[ch] $(DIST)/include/psn
	mkdir   $(DIST)/include/random
	cp	-p include/random/*.[ch] $(DIST)/include/random
	mkdir   $(DIST)/libastro
	cp      -p libastro/*.[ch] libastro/Makefile.in $(DIST)/libastro
	mkdir   $(DIST)/libfits
	cp      -p libfits/*.[ch] libfits/Makefile.in $(DIST)/libfits
	mkdir   $(DIST)/librandom
	cp      -p librandom/*.[ch] librandom/Makefile.in $(DIST)/librandom
	mkdir   $(DIST)/libpsn
	cp      -p libpsn/*.[ch] libpsn/Makefile.in $(DIST)/libpsn
	mkdir   $(DIST)/src
	cp      -p src/*.[ch] src/Makefile.in $(DIST)/src
	mkdir   $(DIST)/src/index
	cp      -p src/index/*.[ch] src/index/Makefile.in $(DIST)/src/index
	mkdir   $(DIST)/src/io
	cp      -p src/io/*.[ch] src/io/Makefile.in $(DIST)/src/io
	mkdir   $(DIST)/src/link
	cp      -p src/link/*.[ch] src/link/Makefile.in $(DIST)/src/link
	mkdir   $(DIST)/src/math
	cp      -p src/math/*.[ch] src/math/Makefile.in $(DIST)/src/math
	mkdir   $(DIST)/src/math/dft
	cp      -p src/math/dft/*.[ch] src/math/dft/Makefile.in $(DIST)/src/math/dft
	mkdir   $(DIST)/src/math/elliptic
	cp      -p src/math/elliptic/*.[ch] src/math/elliptic/Makefile.in $(DIST)/src/math/elliptic
	mkdir   $(DIST)/src/math/expint
	cp      -p src/math/expint/*.[ch] src/math/expint/Makefile.in $(DIST)/src/math/expint
	mkdir   $(DIST)/src/math/fit
	cp      -p src/math/fit/*.[ch] src/math/fit/Makefile.in $(DIST)/src/math/fit
	mkdir   $(DIST)/src/math/intersec
	cp      -p src/math/intersec/*.[ch] src/math/intersec/Makefile.in $(DIST)/src/math/intersec
	mkdir   $(DIST)/src/math/spline
	cp      -p src/math/spline/*.[ch] src/math/spline/Makefile.in $(DIST)/src/math/spline
	mkdir   $(DIST)/src/psn
	cp      -p src/psn/*.[ch] src/psn/Makefile.in $(DIST)/src/psn
	mkdir   $(DIST)/man
	cp      -p man/*.1.gz $(DIST)/man
	mkdir	$(DIST)/misc
	mkdir	$(DIST)/misc/deb
	cp	-p misc/deb/fitsh.control misc/deb/fitsh.list $(DIST)/misc/deb
	cp      -p AUTHORS CHANGELOG COPYING INSTALL README VERSION $(DIST)
	cp      -p ./configure configure.ac configure.mingw32 configure.mingw64 ./prepare $(DIST)
	cp      -p Makefile.in config.h.in $(DIST)
	tar     czf $(DIST).tar.gz $(DIST)
	rm      -f -r $(DIST)

deb: deb-fitsh

deb-fitsh: src help2man
	rm      -f -r $(DEB)/fitsh
	mkdir   -p $(DEB)/fitsh $(DEB)/fitsh/DEBIAN
	mkdir   -p $(DEB)/fitsh $(DEB)/fitsh/usr/bin $(DEB)/fitsh/usr/lib/fitsh/lfit $(DEB)/fitsh/usr/share/man/man1 $(DEB)/fitsh/usr/share/info $(DEB)/fitsh/usr/share/doc/fitsh
	cat $(DEB)/fitsh.list | while read file target ; do \
		cp $$file $(DEB)/fitsh/$$target ; \
	done
	cp      README  $(DEB)/fitsh/usr/share/doc/fitsh/
	gzip    $(DEB)/fitsh/usr/share/doc/fitsh/README
	cp      AUTHORS  $(DEB)/fitsh/usr/share/doc/fitsh/
	gzip    $(DEB)/fitsh/usr/share/doc/fitsh/AUTHORS
	cat     $(DEB)/fitsh.control | \
	sed     -e "s/__ARCH__/$(DEB_ARCH)/" \
	        -e "s/__VERSION__/$(DEB_VERSION)/" \
	        -e "s/__INSTALLED_SIZE__/`du -k -s --exclude DEBIAN $(DEB)/fitsh | awk '{ print $$1; }'`/" > $(DEB)/fitsh/DEBIAN/control
	for f in `find $(DEB)/fitsh` ; do \
	        o=`echo $$f | sed 's/deb\/fitsh\///'` ; \
	        if [ -f "$$f" -a `dirname "$$f"` != $(DEB)/fitsh/DEBIAN ] ; then \
	                m=`md5sum $$f | awk '{ print $$1; }'` ; \
	                echo $$m $$o ; \
	        fi ; \
	done > $(DEB)/fitsh/DEBIAN/md5sums
	$(DPKG_DEB) --build $(DEB)/fitsh fitsh_$(DEB_VERSION)_$(DEB_ARCH).deb
	rm      -f -r $(DEB)/fitsh