Commit 9aea0130b8567dded5d9e717d479b4e5aa918084

Authored by knodlseder
1 parent 57c04aac

introduce linkscripts level

Showing 1 changed file with 15 additions and 6 deletions
scripts/Makefile.am
1 ## Process this file with automake to produce Makefile.in 1 ## Process this file with automake to produce Makefile.in
2 2
3 -# Scripts for which symbolic links should be created in bindir  
4 -binscripts = cspull cssens 3 +# Scripts to be distributed in bindir
  4 +binscripts = cta_kb_bkgrates.py
5 5
6 # Scripts to be distributed in pythondir 6 # Scripts to be distributed in pythondir
7 pythonscripts = cspull.py cssens.py obsutils.py 7 pythonscripts = cspull.py cssens.py obsutils.py
8 8
  9 +# Scripts for which symbolic links will be created in bindir
  10 +linkscripts = cspull cssens
  11 +
9 # Distribute scripts 12 # Distribute scripts
10 -EXTRA_DIST = $(pythonscripts) 13 +EXTRA_DIST = $(binscripts) $(pythonscripts)
  14 +binscriptsdir = $(bindir)
  15 +binscripts_DATA = $(binscripts)
11 pythonscriptsdir = $(pythondir) 16 pythonscriptsdir = $(pythondir)
12 pythonscripts_DATA = $(pythonscripts) 17 pythonscripts_DATA = $(pythonscripts)
13 18
14 # Add hook rule to create symbolic links for cscripts 19 # Add hook rule to create symbolic links for cscripts
15 install-data-hook: 20 install-data-hook:
16 - @list='$(binscripts)';\  
17 - for p in $$list; do \ 21 + @binlist='$(binscripts)';\
  22 + for p in $$binlist; do \
  23 + chmod +x "$(DESTDIR)$(bindir)/$$p"; \
  24 + done
  25 + @linklist='$(linkscripts)';\
  26 + for p in $$linklist; do \
18 ln -s "$(DESTDIR)$(pythondir)/$$p.py" "$(DESTDIR)$(bindir)/$$p"; \ 27 ln -s "$(DESTDIR)$(pythondir)/$$p.py" "$(DESTDIR)$(bindir)/$$p"; \
19 - if test -f "$$p"; then chmod +x "$(DESTDIR)$(binscriptsdir)/$$p"; fi; \  
20 chmod +x "$(DESTDIR)$(pythondir)/$$p.py"; \ 28 chmod +x "$(DESTDIR)$(pythondir)/$$p.py"; \
21 done 29 done
  30 +