diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /unix/hlib/util.csh/mkarch | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'unix/hlib/util.csh/mkarch')
-rwxr-xr-x | unix/hlib/util.csh/mkarch | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/unix/hlib/util.csh/mkarch b/unix/hlib/util.csh/mkarch new file mode 100755 index 00000000..ceec0db8 --- /dev/null +++ b/unix/hlib/util.csh/mkarch @@ -0,0 +1,58 @@ +#!/bin/csh -f +# +# MKARCH - Reset the platform architecture. Assumes source-only tree and +# that it's safe to just manually change links. + + +set aarch = `unix/hlib/irafarch.csh -actual` + +if (-e $iraf/unix/bin.$aarch/mkpkg.e) then + # Assume we've got a system with binaries and can use MKPKG. + set use_mkpkg = 1 +else + if ($?IRAFARCH && -e $iraf/unix/bin.$IRAFARCH/mkpkg.e) then + set use_mkpkg = 1 + else + # Change the links manually, but strip all binaries first. + set use_mkpkg = 0 + endif +endif + + +if ($#argv == 1) then + set arch = $1 + +loop_: + echo "Making architecture: "$arch + + if ($use_mkpkg == 1) then + mkpkg $arch + (chdir noao ; mkpkg -p noao $arch) + (chdir vo ; mkpkg -p vo $arch) + else + $iraf/util/mkclean + /bin/rm -rf bin noao/bin unix/bin unix/as vo/bin + + ln -s bin.$arch bin + (chdir vo ; ln -s bin.$arch bin) + (chdir noao ; ln -s bin.$arch bin) + (chdir unix ; ln -s bin.$arch bin) + (chdir unix ; ln -s as.$arch as) + endif + + if ("$arch" == "macintel" || "$arch" == "linux64") then + (chdir unix/hlib ; \ + rm -f iraf.h mach.h ; \ + ln -s iraf64.h iraf.h ; \ + ln -s mach64.h mach.h) + else + (chdir unix/hlib ; \ + rm -f iraf.h mach.h ; \ + ln -s iraf32.h iraf.h ; \ + ln -s mach32.h mach.h) + endif + +else + set arch = $aarch + goto loop_ +endif |