Commit 9aea0130b8567dded5d9e717d479b4e5aa918084
1 parent
57c04aac
introduce linkscripts level
Showing
1 changed file
with
15 additions
and
6 deletions
scripts/Makefile.am
| 1 | 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 | 6 | # Scripts to be distributed in pythondir |
| 7 | 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 | 12 | # Distribute scripts |
| 10 | -EXTRA_DIST = $(pythonscripts) | |
| 13 | +EXTRA_DIST = $(binscripts) $(pythonscripts) | |
| 14 | +binscriptsdir = $(bindir) | |
| 15 | +binscripts_DATA = $(binscripts) | |
| 11 | 16 | pythonscriptsdir = $(pythondir) |
| 12 | 17 | pythonscripts_DATA = $(pythonscripts) |
| 13 | 18 | |
| 14 | 19 | # Add hook rule to create symbolic links for cscripts |
| 15 | 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 | 27 | ln -s "$(DESTDIR)$(pythondir)/$$p.py" "$(DESTDIR)$(bindir)/$$p"; \ |
| 19 | - if test -f "$$p"; then chmod +x "$(DESTDIR)$(binscriptsdir)/$$p"; fi; \ | |
| 20 | 28 | chmod +x "$(DESTDIR)$(pythondir)/$$p.py"; \ |
| 21 | 29 | done |
| 30 | + | ... | ... |