Makefile.am
1.42 KB
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
## Process this file with automake to produce Makefile.in
# Scripts to be distributed in $(pyexecdir)/cscripts
pythonscripts = __init__.py \
cspull.py cssens.py cstsdist.py cscaldb.py csresmap.py \
csobsdef.py csspec.py cslightcrv.py csobsinfo.py \
csinfo.py csmodelinfo.py csmodelmerge.py cstsmapmerge.py \
csobs2caldb.py \
csfindobs.py csiactcopy.py csiactdata.py csiactobs.py \
obsutils.py
# Scripts for which symbolic links will be created in bindir
linkscripts = cspull cssens cstsdist cscaldb csresmap \
csobsdef csspec cslightcrv csobsinfo \
csinfo csmodelinfo csmodelmerge cstsmapmerge \
csobs2caldb \
csfindobs csiactcopy csiactdata csiactobs
# Distribute scripts
EXTRA_DIST = $(binscripts) $(pythonscripts)
binscriptsdir = $(bindir)
binscripts_DATA = $(binscripts)
pythonscriptsdir = $(pyexecdir)/cscripts
pythonscripts_DATA = $(pythonscripts)
# Add hook rule to create symbolic links for cscripts
install-data-hook:
@binlist='$(binscripts)';\
for p in $$binlist; do \
chmod +x "$(DESTDIR)$(bindir)/$$p"; \
done
@linklist='$(linkscripts)';\
for p in $$linklist; do \
rm -rf "$(DESTDIR)$(bindir)/$$p"; \
ln -s "$(DESTDIR)$(pyexecdir)/cscripts/$$p.py" "$(DESTDIR)$(bindir)/$$p"; \
chmod +x "$(DESTDIR)$(pyexecdir)/cscripts/$$p.py"; \
done