aboutsummaryrefslogtreecommitdiff
path: root/mkpkg
blob: c98490f4fed4a26906321cf53c029c0d7f4ad683 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# Root MKPKG for IRAF.  The bootstrap utilities and libraries in the HOST
# subdirectory must be made before this can be run.

$verbose
$call	mkall					# make everything
$exit

sysgen:
	$call vendor
	$call mkall
	$call update
	;

mkall:
	$ifeq (hostid, unix)  !(clear;date)  $endif
	$echo "==================== MAKE IRAF! ========================="
	$echo "+"
	$call syslibs
	$call mathlibs
	$ifeq (USE_SHLIB, yes) $call shlib $endif
	# (fall through)
relink:
	$call sysexe
	$call packages
	$ifeq (hostid, unix)  !(touch unix/hlib/utime)  $endif
	$echo "====================== (done) ==========================="
	$ifeq (hostid, unix)  !(date)  $endif
	;

update:
	$call sysexe
	$call packages
	;

vendor:
	$echo "======================= VENDOR =========================="
	$echo "+"
	$call sysgen@vendor
	$echo "+" $echo "+"
	;

syslibs:
	$echo "====================== SYSLIBS =========================="
	$echo "+"
	$call sysgen@sys
	$echo "+" $echo "+"
	;

sysexe:
	$echo "====================== SYSEXE ==========================="
	$echo "+" $echo "+"
	$call update@sys
	$echo "+" $echo "+"
	;

mathlibs:
	$echo "====================== MATHLIBS ========================="
	$echo "+" $echo "+"
	$call mathgen@math
	$echo "+" $echo "+"
	;

packages:
	$echo "====================== PACKAGES ========================="
	$echo "+" $echo "+"

	# On the UNIX distribution, the BIN directory is excluded from the
	# tar tape in a "you relink" distribution.  Lets make sure we have
	# the directory before proceeding to relink all the packages.

	$ifeq (hostid, unix)  !(mkdir $(iraf)bin >& /dev/null)  $endif

	$call update@pkg
	$echo "+" $echo "+"
	;

shlib:
	$echo "====================== SHLIB ============================"
	$echo "+" $echo "+"
	$call update@host$shlib/
	$echo "+" $echo "+"
	;

# SUMMARY -- [UNIX] mkpkg summary: output a summary of the spooled mkpkg
# output, omitting most of the mundane chatter.  Used to scan large spool
# files for errors.

summary:
	$ifeq (HOSTID, unix)
	    $ifndef (spool)
		$set spool = spool
	    $endif
	    ! grep -v ':$$' $(spool) | grep -v '^xc' | grep -v '^ar'\
	        | grep -v '^check file'
	$else
	    $echo "mkpkg summary only available on a UNIX system"
	$endif
	;


# STRIP -- Strip the system of all sources and other files not required to
# run the system, or for user programming.

strip:
	$echo "Ignore any messages about cannot delete a file."
	$echo "Be sure to do a `cd noao; mkpkg strip' as well."
	$echo "Stripping non-runtime files from IRAF source tree..."
	!rmfiles -f $(hlib)strip.iraf
	;

# SRCARC -- Make a source archive (TAR format) of the system.

srcarc:
	!wtar -of $(?tarfile) README mkpkg lib sys math pkg doc
	;


# UNIX/IRAF stuff (multiple architecture support).
# ---------------------------------------------------

arch:
showfloat:				# show current float option
	$verbose off
	!$(hlib)/mkfloat.csh
	;
generic:				# make architecture indep. (no bins)
	$verbose off
	!$(hlib)/mkfloat.csh generic
	!(cd ./unix; setenv MACH generic; sh setarch.sh)
	;

cygwin:					# install WinXP/Cygwin binaries
        $verbose off
        !$(hlib)/mkfloat.csh cygwin
        !(cd ./unix; setenv MACH cygwin; sh setarch.sh)
        ;
freebsd:				# install freebsd binaries
        $verbose off
        !$(hlib)/mkfloat.csh freebsd
        !(cd ./unix; setenv MACH freebsd; sh setarch.sh)
        ;
        ;
linux:					# install linux (32-bit) binaries
        $verbose off
        !$(hlib)/mkfloat.csh linux
        !(cd ./unix; setenv MACH linux; sh setarch.sh)
        ;
linux64:				# install linux (64-bit) binaries
        $verbose off
        !$(hlib)/mkfloat.csh linux64
        !(cd ./unix; setenv MACH linux64; sh setarch.sh)
        ;
macintel:				# install MacOS X (x86_64) binaries
        $verbose off
        !$(hlib)/mkfloat.csh macintel
        !(cd ./unix; setenv MACH macintel; sh setarch.sh)
        ;
macosx:					# install MacOS X (Unix 32-bit) binaries
        $verbose off
        !$(hlib)/mkfloat.csh macosx
        !(cd ./unix; setenv MACH macosx; sh setarch.sh)
        ;
ipad:					# install Mac iPad binaries
        $verbose off
        !$(hlib)/mkfloat.csh ipad
        !(cd ./unix; setenv MACH ipad; sh setarch.sh)
        ;
redhat:					# install redhat binaries
        $verbose off
        !$(hlib)/mkfloat.csh redhat
        !(cd ./unix; setenv MACH redhat; sh setarch.sh)
        ;
sparc:					# install sparc binaries
	$verbose off
	!$(hlib)/mkfloat.csh sparc
	!(cd ./unix; setenv MACH sparc; sh setarch.sh)
	;
sunos:					# install sunos binaries
        $verbose off
        !$(hlib)/mkfloat.csh sunos
        !(cd ./unix; setenv MACH sunos; sh setarch.sh)
        ;
ssun:					# install ssun binaries
	$verbose off
	!$(hlib)/mkfloat.csh ssun
	!(cd ./unix; setenv MACH ssol; sh setarch.sh)
	;