diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 9e3fdef..9c4a254 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -1,21 +1,30 @@ ## Process this file with automake to produce Makefile.in -# Scripts for which symbolic links should be created in bindir -binscripts = cspull cssens +# Scripts to be distributed in bindir +binscripts = cta_kb_bkgrates.py # Scripts to be distributed in pythondir pythonscripts = cspull.py cssens.py obsutils.py +# Scripts for which symbolic links will be created in bindir +linkscripts = cspull cssens + # Distribute scripts -EXTRA_DIST = $(pythonscripts) +EXTRA_DIST = $(binscripts) $(pythonscripts) +binscriptsdir = $(bindir) +binscripts_DATA = $(binscripts) pythonscriptsdir = $(pythondir) pythonscripts_DATA = $(pythonscripts) # Add hook rule to create symbolic links for cscripts install-data-hook: - @list='$(binscripts)';\ - for p in $$list; do \ + @binlist='$(binscripts)';\ + for p in $$binlist; do \ + chmod +x "$(DESTDIR)$(bindir)/$$p"; \ + done + @linklist='$(linkscripts)';\ + for p in $$linklist; do \ ln -s "$(DESTDIR)$(pythondir)/$$p.py" "$(DESTDIR)$(bindir)/$$p"; \ - if test -f "$$p"; then chmod +x "$(DESTDIR)$(binscriptsdir)/$$p"; fi; \ chmod +x "$(DESTDIR)$(pythondir)/$$p.py"; \ done +