From 4a3aef3f7236d2b3267aead61f11c587c6f4bddb Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Thu, 5 Mar 2015 18:05:27 -0500 Subject: Further improvements --- scripts/Makefile.am | 21 +++- scripts/Makefile.in | 267 ++++++++++++++++++++++++++++++++++++++------ scripts/calfuse.csh | 2 +- scripts/calfuse.sh | 20 ++-- scripts/calfuse.wavecal | 2 +- scripts/cf_make_900_obs.csh | 4 +- scripts/cf_make_all.csh | 4 +- scripts/cf_make_all_obs.csh | 4 +- scripts/cfsetup.csh.in | 2 +- scripts/cfsetup.sh.in | 6 +- 10 files changed, 271 insertions(+), 61 deletions(-) (limited to 'scripts') diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 1f3b7d7..98f1c6c 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -1,4 +1,7 @@ +SUBDIRS = . bin_SCRIPTS = \ + calfuse.csh \ + calfuse.sh \ calfuse.wavecal \ cf_make_900_obs.csh \ cf_make_all.csh \ @@ -11,13 +14,25 @@ bin_SCRIPTS = \ listhead \ listtra -EXTRA_DIST = cfsetup.csh.in \ - cfsetup.sh.in +EXTRA_DIST = \ + cfsetup.csh.in \ + cfsetup.sh.in \ + calfuse.csh \ + calfuse.sh \ + calfuse.wavecal \ + cf_make_900_obs.csh \ + cf_make_all.csh \ + cf_make_all_obs.csh \ + idl_obsplot.pl \ + idlplot_rate.pl \ + idlplot_spex.pl \ + listhead \ + listtra CLEANFILES = cfsetup.csh \ cfsetup.sh -do_subst = sed -e 's,[@]DATADIR[@],$(datadir),g' \ +do_subst = sed -e 's,[@]DATADIR[@],$(pkgdatadir)-$(VERSION),g' \ -e 's,[@]PREFIX[@],$(prefix),g' \ -e 's,[@]VERSION[@],$(VERSION),g' diff --git a/scripts/Makefile.in b/scripts/Makefile.in index 57e8ec5..630df69 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -144,14 +144,74 @@ am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ @@ -276,7 +336,10 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +SUBDIRS = . bin_SCRIPTS = \ + calfuse.csh \ + calfuse.sh \ calfuse.wavecal \ cf_make_900_obs.csh \ cf_make_all.csh \ @@ -289,17 +352,29 @@ bin_SCRIPTS = \ listhead \ listtra -EXTRA_DIST = cfsetup.csh.in \ - cfsetup.sh.in +EXTRA_DIST = \ + cfsetup.csh.in \ + cfsetup.sh.in \ + calfuse.csh \ + calfuse.sh \ + calfuse.wavecal \ + cf_make_900_obs.csh \ + cf_make_all.csh \ + cf_make_all_obs.csh \ + idl_obsplot.pl \ + idlplot_rate.pl \ + idlplot_spex.pl \ + listhead \ + listtra CLEANFILES = cfsetup.csh \ cfsetup.sh -do_subst = sed -e 's,[@]DATADIR[@],$(datadir),g' \ +do_subst = sed -e 's,[@]DATADIR[@],$(pkgdatadir)-$(VERSION),g' \ -e 's,[@]PREFIX[@],$(prefix),g' \ -e 's,[@]VERSION[@],$(VERSION),g' -all: all-am +all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @@ -372,12 +447,105 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -tags TAGS: -ctags CTAGS: - -cscope cscopelist: +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -409,22 +577,48 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done check-am: all-am -check: check-am +check: check-recursive all-am: Makefile $(SCRIPTS) -installdirs: +installdirs: installdirs-recursive +installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -installcheck: installcheck-am +installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ @@ -447,85 +641,86 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -clean: clean-am +clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am -distclean: distclean-am +distclean: distclean-recursive -rm -f Makefile -distclean-am: clean-am distclean-generic +distclean-am: clean-am distclean-generic distclean-tags -dvi: dvi-am +dvi: dvi-recursive dvi-am: -html: html-am +html: html-recursive html-am: -info: info-am +info: info-recursive info-am: install-data-am: -install-dvi: install-dvi-am +install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binSCRIPTS -install-html: install-html-am +install-html: install-html-recursive install-html-am: -install-info: install-info-am +install-info: install-info-recursive install-info-am: install-man: -install-pdf: install-pdf-am +install-pdf: install-pdf-recursive install-pdf-am: -install-ps: install-ps-am +install-ps: install-ps-recursive install-ps-am: installcheck-am: -maintainer-clean: maintainer-clean-am +maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-am +mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool -pdf: pdf-am +pdf: pdf-recursive pdf-am: -ps: ps-am +ps: ps-recursive ps-am: uninstall-am: uninstall-binSCRIPTS -.MAKE: install-am install-strip +.MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - cscopelist-am ctags-am distclean distclean-generic \ - distclean-libtool distdir dvi dvi-am html html-am info info-am \ +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binSCRIPTS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ + installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-binSCRIPTS .PRECIOUS: Makefile diff --git a/scripts/calfuse.csh b/scripts/calfuse.csh index 4a828d1..94c0433 100755 --- a/scripts/calfuse.csh +++ b/scripts/calfuse.csh @@ -1,4 +1,4 @@ -#!/usr/local/bin/tcsh -f +#!/usr/bin/env tcsh -f #****************************************************************************** #* Johns Hopkins University #* Center For Astrophysical Sciences diff --git a/scripts/calfuse.sh b/scripts/calfuse.sh index 0cd23a9..66934a5 100755 --- a/scripts/calfuse.sh +++ b/scripts/calfuse.sh @@ -40,11 +40,11 @@ ttag=`echo $froot | grep -c ttag` # Put a timestamp in the log file (the OPUS trailer file). if [ $ttag = 1 ]; then - echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Begin TTAG file $1" - echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Begin TTAG file $1" >> $logfile 2>&1 + echo `date '+%Y %b %e %T'` "calfuse.sh-1.15: Begin TTAG file $1" + echo `date '+%Y %b %e %T'` "calfuse.sh-1.15: Begin TTAG file $1" >> $logfile 2>&1 else - echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Begin HIST file $1" - echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Begin HIST file $1" >> $logfile 2>&1 + echo `date '+%Y %b %e %T'` "calfuse.sh-1.15: Begin HIST file $1" + echo `date '+%Y %b %e %T'` "calfuse.sh-1.15: Begin HIST file $1" >> $logfile 2>&1 fi cfstat=1 @@ -126,15 +126,15 @@ fi if [ $cfstat = 0 ]; then if [ $ttag = 1 ]; then - echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: End TTAG file $1" - echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: End TTAG file $1" >> $logfile 2>&1 + echo `date '+%Y %b %e %T'` "calfuse.sh-1.15: End TTAG file $1" + echo `date '+%Y %b %e %T'` "calfuse.sh-1.15: End TTAG file $1" >> $logfile 2>&1 else - echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: End HIST file $1" - echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: End HIST file $1" >> $logfile 2>&1 + echo `date '+%Y %b %e %T'` "calfuse.sh-1.15: End HIST file $1" + echo `date '+%Y %b %e %T'` "calfuse.sh-1.15: End HIST file $1" >> $logfile 2>&1 fi else - echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Error processing $1" - echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Error processing $1" >> $logfile 2>&1 + echo `date '+%Y %b %e %T'` "calfuse.sh-1.15: Error processing $1" + echo `date '+%Y %b %e %T'` "calfuse.sh-1.15: Error processing $1" >> $logfile 2>&1 fi exit $cfstat diff --git a/scripts/calfuse.wavecal b/scripts/calfuse.wavecal index eae4653..fc00c54 100755 --- a/scripts/calfuse.wavecal +++ b/scripts/calfuse.wavecal @@ -1,4 +1,4 @@ -#!/usr/local/bin/tcsh -f +#!/usr/bin/env tcsh -f #****************************************************************************** #* Johns Hopkins University #* Center For Astrophysical Sciences diff --git a/scripts/cf_make_900_obs.csh b/scripts/cf_make_900_obs.csh index 9edbc70..8d2ce4e 100755 --- a/scripts/cf_make_900_obs.csh +++ b/scripts/cf_make_900_obs.csh @@ -1,4 +1,4 @@ -#!/usr/local/bin/tcsh -f +#!/usr/bin/env tcsh -f #****************************************************************************** #* Johns Hopkins University @@ -31,7 +31,7 @@ set DELETE_BPM # Delete bad-pixel map files # Set program path -set rm = "/bin/rm -f" +set rm = "rm -f" set cf_xcorr = cf_xcorr set cf_combine = cf_combine diff --git a/scripts/cf_make_all.csh b/scripts/cf_make_all.csh index 2cfbc46..b63fde0 100755 --- a/scripts/cf_make_all.csh +++ b/scripts/cf_make_all.csh @@ -1,4 +1,4 @@ -#!/usr/local/bin/tcsh -f +#!/usr/bin/env tcsh -f #****************************************************************************** #* Johns Hopkins University @@ -40,7 +40,7 @@ #*****************************************************************************/ # Set program path -set rm = "/bin/rm -f" +set rm = "rm -f" set cf_xcorr = cf_xcorr set cf_combine = cf_combine diff --git a/scripts/cf_make_all_obs.csh b/scripts/cf_make_all_obs.csh index 2a97247..a6a0ac2 100755 --- a/scripts/cf_make_all_obs.csh +++ b/scripts/cf_make_all_obs.csh @@ -1,4 +1,4 @@ -#!/usr/local/bin/tcsh -f +#!/usr/bin/env tcsh -f #****************************************************************************** #* Johns Hopkins University @@ -69,7 +69,7 @@ #set DELETE_BPM # Delete bad-pixel map files # Set program path -set rm = "/bin/rm -f" +set rm = "rm -f" set cf_xcorr = cf_xcorr set cf_combine = cf_combine diff --git a/scripts/cfsetup.csh.in b/scripts/cfsetup.csh.in index 8951b36..69dc3df 100644 --- a/scripts/cfsetup.csh.in +++ b/scripts/cfsetup.csh.in @@ -2,7 +2,7 @@ # set CF_DIR="@PREFIX@" set CF_VERSION="@VERSION@" -setenv PATH "@PREFIX@/bin:${PATH}" +setenv PATH "${CF_DIR}/bin:${PATH}" setenv CF_CALDIR "@DATADIR@/calfiles" setenv CF_PARMDIR "@DATADIR@/parmfiles" setenv CF_IDLDIR "@DATADIR@/idl" diff --git a/scripts/cfsetup.sh.in b/scripts/cfsetup.sh.in index bdc85d4..f821c12 100644 --- a/scripts/cfsetup.sh.in +++ b/scripts/cfsetup.sh.in @@ -3,8 +3,8 @@ CF_DIR="@PREFIX@" CF_VERSION="@VERSION@" export PATH="${CF_DIR}/bin:${PATH}" -export CF_CALDIR="${CF_DIR}/calfiles" -export CF_PARMDIR="${CF_DIR}/parmfiles" -export CF_IDLDIR="${CF_DIR}/idl" +export CF_CALDIR="@DATADIR@/calfiles" +export CF_PARMDIR="@DATADIR@/parmfiles" +export CF_IDLDIR="@DATADIR@/idl" export CF_HISTDIR=`pwd` -- cgit