Artifact
f6b2e8d034e2a552c57eb6fb6abdcc2db0497096 :
File
lib/pidp8i/dirs.py.in
— part of check-in
[b4006a6ae9]
at
2018-12-21 04:51:37
on branch trunk
— Intrusive cosmetic changes. This removes all the references to mkos8 as
the way packs are built. The only remaining mention of mkos8 is to give
its place in history.
(user:
poetnerd
size: 3260)
[more...]
0000: 23 20 2d 2a 2d 20 63 6f 64 69 6e 67 3a 20 75 74 # -*- coding: ut
0010: 66 2d 38 20 2d 2a 2d 0a 23 23 23 23 23 23 23 23 f-8 -*-.########
0020: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0030: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0040: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0050: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0060: 0a 23 20 64 69 72 73 2e 70 79 2e 69 6e 20 2d 20 .# dirs.py.in -
0070: 44 65 63 6c 61 72 65 20 63 6f 6e 73 74 61 6e 74 Declare constant
0080: 73 20 66 6f 72 20 64 69 72 65 63 74 6f 72 79 20 s for directory
0090: 6e 61 6d 65 73 20 73 75 62 62 65 64 20 69 6e 20 names subbed in
00a0: 62 79 0a 23 20 20 20 61 75 74 6f 73 65 74 75 70 by.# autosetup
00b0: 2c 20 70 61 72 74 6c 79 20 73 6f 20 77 65 20 64 , partly so we d
00c0: 6f 6e 27 74 20 68 61 76 65 20 74 6f 20 64 6f 20 on't have to do
00d0: 74 68 69 73 20 69 6e 20 6d 75 6c 74 69 70 6c 65 this in multiple
00e0: 20 6d 6f 64 75 6c 65 73 0a 23 20 20 20 62 75 74 modules.# but
00f0: 20 61 6c 73 6f 20 73 6f 20 74 68 61 74 20 74 68 also so that th
0100: 6f 73 65 20 66 69 6c 65 73 20 64 6f 6e 27 74 20 ose files don't
0110: 6b 65 65 70 20 67 65 74 74 69 6e 67 20 74 6f 75 keep getting tou
0120: 63 68 65 64 20 77 68 65 6e 65 76 65 72 0a 23 20 ched whenever.#
0130: 20 20 6f 74 68 65 72 20 2a 2e 69 6e 20 66 69 6c other *.in fil
0140: 65 73 20 67 65 74 20 74 6f 75 63 68 65 64 2c 20 es get touched,
0150: 74 68 75 73 20 66 6f 72 63 69 6e 67 20 61 6e 20 thus forcing an
0160: 4f 53 2f 38 20 52 4b 30 35 20 72 65 62 75 69 6c OS/8 RK05 rebuil
0170: 64 2e 0a 23 0a 23 20 43 6f 70 79 72 69 67 68 74 d..#.# Copyright
0180: 20 c2 a9 20 32 30 31 37 20 62 79 20 57 61 72 72 © 2017 by Warr
0190: 65 6e 20 59 6f 75 6e 67 0a 23 0a 23 20 50 65 72 en Young.#.# Per
01a0: 6d 69 73 73 69 6f 6e 20 69 73 20 68 65 72 65 62 mission is hereb
01b0: 79 20 67 72 61 6e 74 65 64 2c 20 66 72 65 65 20 y granted, free
01c0: 6f 66 20 63 68 61 72 67 65 2c 20 74 6f 20 61 6e of charge, to an
01d0: 79 20 70 65 72 73 6f 6e 20 6f 62 74 61 69 6e 69 y person obtaini
01e0: 6e 67 0a 23 20 61 20 63 6f 70 79 20 6f 66 20 74 ng.# a copy of t
01f0: 68 69 73 20 73 6f 66 74 77 61 72 65 20 61 6e 64 his software and
0200: 20 61 73 73 6f 63 69 61 74 65 64 20 64 6f 63 75 associated docu
0210: 6d 65 6e 74 61 74 69 6f 6e 20 66 69 6c 65 73 20 mentation files
0220: 28 74 68 65 0a 23 20 22 53 6f 66 74 77 61 72 65 (the.# "Software
0230: 22 29 2c 20 74 6f 20 64 65 61 6c 20 69 6e 20 74 "), to deal in t
0240: 68 65 20 53 6f 66 74 77 61 72 65 20 77 69 74 68 he Software with
0250: 6f 75 74 20 72 65 73 74 72 69 63 74 69 6f 6e 2c out restriction,
0260: 20 69 6e 63 6c 75 64 69 6e 67 0a 23 20 77 69 74 including.# wit
0270: 68 6f 75 74 20 6c 69 6d 69 74 61 74 69 6f 6e 20 hout limitation
0280: 74 68 65 20 72 69 67 68 74 73 20 74 6f 20 75 73 the rights to us
0290: 65 2c 20 63 6f 70 79 2c 20 6d 6f 64 69 66 79 2c e, copy, modify,
02a0: 20 6d 65 72 67 65 2c 20 70 75 62 6c 69 73 68 2c merge, publish,
02b0: 0a 23 20 64 69 73 74 72 69 62 75 74 65 2c 20 73 .# distribute, s
02c0: 75 62 6c 69 63 65 6e 73 65 2c 20 61 6e 64 2f 6f ublicense, and/o
02d0: 72 20 73 65 6c 6c 20 63 6f 70 69 65 73 20 6f 66 r sell copies of
02e0: 20 74 68 65 20 53 6f 66 74 77 61 72 65 2c 20 61 the Software, a
02f0: 6e 64 20 74 6f 0a 23 20 70 65 72 6d 69 74 20 70 nd to.# permit p
0300: 65 72 73 6f 6e 73 20 74 6f 20 77 68 6f 6d 20 74 ersons to whom t
0310: 68 65 20 53 6f 66 74 77 61 72 65 20 69 73 20 66 he Software is f
0320: 75 72 6e 69 73 68 65 64 20 74 6f 20 64 6f 20 73 urnished to do s
0330: 6f 2c 20 73 75 62 6a 65 63 74 20 74 6f 0a 23 20 o, subject to.#
0340: 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 63 6f the following co
0350: 6e 64 69 74 69 6f 6e 73 3a 0a 23 0a 23 20 54 68 nditions:.#.# Th
0360: 65 20 61 62 6f 76 65 20 63 6f 70 79 72 69 67 68 e above copyrigh
0370: 74 20 6e 6f 74 69 63 65 20 61 6e 64 20 74 68 69 t notice and thi
0380: 73 20 70 65 72 6d 69 73 73 69 6f 6e 20 6e 6f 74 s permission not
0390: 69 63 65 20 73 68 61 6c 6c 20 62 65 0a 23 20 69 ice shall be.# i
03a0: 6e 63 6c 75 64 65 64 20 69 6e 20 61 6c 6c 20 63 ncluded in all c
03b0: 6f 70 69 65 73 20 6f 72 20 73 75 62 73 74 61 6e opies or substan
03c0: 74 69 61 6c 20 70 6f 72 74 69 6f 6e 73 20 6f 66 tial portions of
03d0: 20 74 68 65 20 53 6f 66 74 77 61 72 65 2e 0a 23 the Software..#
03e0: 0a 23 20 54 48 45 20 53 4f 46 54 57 41 52 45 20 .# THE SOFTWARE
03f0: 49 53 20 50 52 4f 56 49 44 45 44 20 22 41 53 20 IS PROVIDED "AS
0400: 49 53 22 2c 20 57 49 54 48 4f 55 54 20 57 41 52 IS", WITHOUT WAR
0410: 52 41 4e 54 59 20 4f 46 20 41 4e 59 20 4b 49 4e RANTY OF ANY KIN
0420: 44 2c 0a 23 20 45 58 50 52 45 53 53 20 4f 52 20 D,.# EXPRESS OR
0430: 49 4d 50 4c 49 45 44 2c 20 49 4e 43 4c 55 44 49 IMPLIED, INCLUDI
0440: 4e 47 20 42 55 54 20 4e 4f 54 20 4c 49 4d 49 54 NG BUT NOT LIMIT
0450: 45 44 20 54 4f 20 54 48 45 20 57 41 52 52 41 4e ED TO THE WARRAN
0460: 54 49 45 53 20 4f 46 0a 23 20 4d 45 52 43 48 41 TIES OF.# MERCHA
0470: 4e 54 41 42 49 4c 49 54 59 2c 20 46 49 54 4e 45 NTABILITY, FITNE
0480: 53 53 20 46 4f 52 20 41 20 50 41 52 54 49 43 55 SS FOR A PARTICU
0490: 4c 41 52 20 50 55 52 50 4f 53 45 20 41 4e 44 20 LAR PURPOSE AND
04a0: 4e 4f 4e 49 4e 46 52 49 4e 47 45 4d 45 4e 54 2e NONINFRINGEMENT.
04b0: 0a 23 20 49 4e 20 4e 4f 20 45 56 45 4e 54 20 53 .# IN NO EVENT S
04c0: 48 41 4c 4c 20 54 48 45 20 41 55 54 48 4f 52 53 HALL THE AUTHORS
04d0: 20 4c 49 53 54 45 44 20 41 42 4f 56 45 20 42 45 LISTED ABOVE BE
04e0: 20 4c 49 41 42 4c 45 20 46 4f 52 20 41 4e 59 20 LIABLE FOR ANY
04f0: 43 4c 41 49 4d 2c 0a 23 20 44 41 4d 41 47 45 53 CLAIM,.# DAMAGES
0500: 20 4f 52 20 4f 54 48 45 52 20 4c 49 41 42 49 4c OR OTHER LIABIL
0510: 49 54 59 2c 20 57 48 45 54 48 45 52 20 49 4e 20 ITY, WHETHER IN
0520: 41 4e 20 41 43 54 49 4f 4e 20 4f 46 20 43 4f 4e AN ACTION OF CON
0530: 54 52 41 43 54 2c 20 54 4f 52 54 0a 23 20 4f 52 TRACT, TORT.# OR
0540: 20 4f 54 48 45 52 57 49 53 45 2c 20 41 52 49 53 OTHERWISE, ARIS
0550: 49 4e 47 20 46 52 4f 4d 2c 20 4f 55 54 20 4f 46 ING FROM, OUT OF
0560: 20 4f 52 20 49 4e 20 43 4f 4e 4e 45 43 54 49 4f OR IN CONNECTIO
0570: 4e 20 57 49 54 48 20 54 48 45 20 53 4f 46 54 57 N WITH THE SOFTW
0580: 41 52 45 0a 23 20 4f 52 20 54 48 45 20 55 53 45 ARE.# OR THE USE
0590: 20 4f 52 20 4f 54 48 45 52 20 44 45 41 4c 49 4e OR OTHER DEALIN
05a0: 47 53 20 49 4e 20 54 48 45 20 53 4f 46 54 57 41 GS IN THE SOFTWA
05b0: 52 45 2e 0a 23 0a 23 20 45 78 63 65 70 74 20 61 RE..#.# Except a
05c0: 73 20 63 6f 6e 74 61 69 6e 65 64 20 69 6e 20 74 s contained in t
05d0: 68 69 73 20 6e 6f 74 69 63 65 2c 20 74 68 65 20 his notice, the
05e0: 6e 61 6d 65 73 20 6f 66 20 74 68 65 20 61 75 74 names of the aut
05f0: 68 6f 72 73 20 61 62 6f 76 65 0a 23 20 73 68 61 hors above.# sha
0600: 6c 6c 20 6e 6f 74 20 62 65 20 75 73 65 64 20 69 ll not be used i
0610: 6e 20 61 64 76 65 72 74 69 73 69 6e 67 20 6f 72 n advertising or
0620: 20 6f 74 68 65 72 77 69 73 65 20 74 6f 20 70 72 otherwise to pr
0630: 6f 6d 6f 74 65 20 74 68 65 20 73 61 6c 65 2c 0a omote the sale,.
0640: 23 20 75 73 65 20 6f 72 20 6f 74 68 65 72 20 64 # use or other d
0650: 65 61 6c 69 6e 67 73 20 69 6e 20 74 68 69 73 20 ealings in this
0660: 53 6f 66 74 77 61 72 65 20 77 69 74 68 6f 75 74 Software without
0670: 20 70 72 69 6f 72 20 77 72 69 74 74 65 6e 0a 23 prior written.#
0680: 20 61 75 74 68 6f 72 69 7a 61 74 69 6f 6e 20 66 authorization f
0690: 72 6f 6d 20 74 68 6f 73 65 20 61 75 74 68 6f 72 rom those author
06a0: 73 2e 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 s..#############
06b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
06c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
06d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
06e0: 23 23 23 23 23 23 23 23 23 23 23 0a 0a 69 6d 70 ###########..imp
06f0: 6f 72 74 20 6f 73 0a 0a 23 20 41 6e 63 68 6f 72 ort os..# Anchor
0700: 20 64 69 72 65 63 74 6f 72 69 65 73 2e 20 20 54 directories. T
0710: 68 65 73 65 20 68 61 76 65 20 74 6f 20 62 65 20 hese have to be
0720: 73 74 61 74 69 63 61 6c 6c 79 20 64 65 66 69 6e statically defin
0730: 65 64 20 66 6f 72 20 74 68 65 0a 23 20 64 65 76 ed for the.# dev
0740: 65 6c 6f 70 6d 65 6e 74 20 76 73 20 69 6e 73 74 elopment vs inst
0750: 61 6c 6c 61 74 69 6f 6e 20 63 61 73 65 73 20 62 allation cases b
0760: 65 63 61 75 73 65 20 63 68 61 6e 63 65 73 20 61 ecause chances a
0770: 72 65 20 68 69 67 68 20 74 68 61 74 20 62 6f 74 re high that bot
0780: 68 0a 23 20 74 72 65 65 73 20 65 78 69 73 74 20 h.# trees exist
0790: 6f 6e 20 74 68 65 20 64 69 73 6b 2c 20 61 6e 64 on the disk, and
07a0: 20 74 68 65 73 65 20 61 72 65 20 61 62 73 6f 6c these are absol
07b0: 75 74 65 20 70 61 74 68 73 2c 20 73 6f 20 77 65 ute paths, so we
07c0: 20 63 61 6e 27 74 0a 23 20 6a 75 73 74 20 64 6f can't.# just do
07d0: 20 61 20 22 70 61 74 68 20 65 78 69 73 74 73 22 a "path exists"
07e0: 20 74 65 73 74 20 74 6f 20 64 65 74 65 72 6d 69 test to determi
07f0: 6e 65 20 77 68 69 63 68 20 77 65 20 73 68 6f 75 ne which we shou
0800: 6c 64 20 62 65 20 75 73 69 6e 67 2e 0a 23 20 53 ld be using..# S
0810: 6f 2c 20 61 75 74 6f 73 65 74 75 70 20 73 75 62 o, autosetup sub
0820: 73 20 69 6e 20 74 68 65 20 70 72 6f 70 65 72 20 s in the proper
0830: 76 61 6c 75 65 73 20 69 6e 74 6f 20 74 68 65 20 values into the
0840: 2e 70 79 20 76 65 72 73 69 6f 6e 20 6f 66 20 74 .py version of t
0850: 68 69 73 0a 23 20 66 69 6c 65 20 69 6e 20 74 68 his.# file in th
0860: 65 20 64 65 76 65 6c 6f 70 6d 65 6e 74 20 74 72 e development tr
0870: 65 65 20 61 6e 64 20 74 68 65 20 69 6e 73 74 61 ee and the insta
0880: 6c 6c 20 73 63 72 69 70 74 20 6f 76 65 72 77 72 ll script overwr
0890: 69 74 65 73 20 74 68 65 73 65 0a 23 20 66 6f 72 ites these.# for
08a0: 20 74 68 65 20 69 6e 73 74 61 6c 6c 61 74 69 6f the installatio
08b0: 6e 20 74 72 65 65 2e 0a 62 75 69 6c 64 20 3d 20 n tree..build =
08c0: 22 40 62 75 69 6c 64 64 69 72 40 22 0a 73 72 63 "@builddir@".src
08d0: 20 20 20 3d 20 22 40 61 62 73 5f 74 6f 70 5f 73 = "@abs_top_s
08e0: 72 63 64 69 72 40 22 0a 0a 23 20 44 65 72 69 76 rcdir@"..# Deriv
08f0: 65 64 20 64 69 72 65 63 74 6f 72 69 65 73 2e 20 ed directories.
0900: 20 57 68 65 72 65 20 69 74 20 6d 61 74 74 65 72 Where it matter
0910: 73 2c 20 74 68 65 73 65 20 61 72 65 20 74 68 65 s, these are the
0920: 20 64 65 76 65 6c 6f 70 6d 65 6e 74 20 74 72 65 development tre
0930: 65 0a 23 20 70 61 74 68 73 2c 20 6f 76 65 72 72 e.# paths, overr
0940: 69 64 64 65 6e 20 6f 72 20 61 64 6a 75 73 74 65 idden or adjuste
0950: 64 20 62 65 6c 6f 77 20 69 66 20 77 65 27 72 65 d below if we're
0960: 20 69 6e 73 74 61 6c 6c 65 64 2e 0a 62 69 6e 20 installed..bin
0970: 20 20 3d 20 6f 73 2e 70 61 74 68 2e 6a 6f 69 6e = os.path.join
0980: 20 28 62 75 69 6c 64 2c 20 22 62 69 6e 2f 22 29 (build, "bin/")
0990: 0a 6f 62 6a 20 20 20 3d 20 6f 73 2e 70 61 74 68 .obj = os.path
09a0: 2e 6a 6f 69 6e 20 28 62 75 69 6c 64 2c 20 22 6f .join (build, "o
09b0: 62 6a 2f 22 29 0a 6c 6f 67 20 20 20 3d 20 6f 73 bj/").log = os
09c0: 2e 70 61 74 68 2e 6a 6f 69 6e 20 28 62 75 69 6c .path.join (buil
09d0: 64 2c 20 22 6f 62 6a 2f 22 29 0a 6d 65 64 69 61 d, "obj/").media
09e0: 20 3d 20 6f 73 2e 70 61 74 68 2e 6a 6f 69 6e 20 = os.path.join
09f0: 28 73 72 63 2c 20 22 6d 65 64 69 61 2f 22 29 0a (src, "media/").
0a00: 6f 73 38 6d 69 20 3d 20 6f 73 2e 70 61 74 68 2e os8mi = os.path.
0a10: 6a 6f 69 6e 20 28 6d 65 64 69 61 2c 20 22 6f 73 join (media, "os
0a20: 38 2f 22 29 20 20 20 20 23 20 6f 73 38 20 6d 65 8/") # os8 me
0a30: 64 69 61 20 69 6e 70 75 74 73 0a 6f 73 38 6d 6f dia inputs.os8mo
0a40: 20 3d 20 62 69 6e 20 20 20 20 20 20 20 20 20 20 = bin
0a50: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0a60: 20 20 20 23 20 6f 73 38 20 6d 65 64 69 61 20 6f # os8 media o
0a70: 75 74 70 75 74 73 0a 0a 23 20 41 64 6a 75 73 74 utputs..# Adjust
0a80: 20 70 61 74 68 73 20 66 6f 72 20 74 68 65 20 22 paths for the "
0a90: 69 6e 73 74 61 6c 6c 65 64 22 20 63 61 73 65 0a installed" case.
0aa0: 69 66 20 6e 6f 74 20 6f 73 2e 70 61 74 68 2e 65 if not os.path.e
0ab0: 78 69 73 74 73 28 6c 6f 67 29 3a 0a 20 20 20 20 xists(log):.
0ac0: 23 20 54 68 65 20 6f 62 6a 2f 20 64 69 72 20 64 # The obj/ dir d
0ad0: 6f 65 73 6e 27 74 20 65 78 69 73 74 20 69 6e 20 oesn't exist in
0ae0: 74 68 65 20 69 6e 73 74 61 6c 6c 20 74 72 65 65 the install tree
0af0: 0a 20 20 20 20 6c 6f 67 20 3d 20 22 2f 74 6d 70 . log = "/tmp
0b00: 2f 22 0a 0a 69 66 20 6e 6f 74 20 6f 73 2e 70 61 /"..if not os.pa
0b10: 74 68 2e 65 78 69 73 74 73 28 6d 65 64 69 61 29 th.exists(media)
0b20: 3a 0a 20 20 20 20 23 20 57 65 20 62 75 72 79 20 :. # We bury
0b30: 6d 65 64 69 61 20 6f 6e 65 20 65 78 74 72 61 20 media one extra
0b40: 6c 65 76 65 6c 20 64 65 65 70 65 72 20 69 6e 20 level deeper in
0b50: 74 68 65 20 69 6e 73 74 61 6c 6c 20 74 72 65 65 the install tree
0b60: 0a 20 20 20 20 6d 65 64 69 61 20 3d 20 6d 65 64 . media = med
0b70: 69 61 2e 72 65 70 6c 61 63 65 28 27 2f 6d 65 64 ia.replace('/med
0b80: 69 61 2f 27 2c 20 27 2f 73 68 61 72 65 2f 6d 65 ia/', '/share/me
0b90: 64 69 61 2f 27 29 0a 0a 20 20 20 20 23 20 6f 73 dia/').. # os
0ba0: 38 2d 72 75 6e 20 73 63 72 69 70 74 73 20 6f 75 8-run scripts ou
0bb0: 74 70 75 74 20 2a 2e 72 6b 30 35 20 61 6e 64 20 tput *.rk05 and
0bc0: 2a 2e 74 75 35 36 20 69 6e 74 6f 20 62 69 6e 2f *.tu56 into bin/
0bd0: 20 61 74 20 62 75 69 6c 64 20 74 69 6d 65 2e 0a at build time..
0be0: 20 20 20 20 23 20 41 74 20 69 6e 73 74 61 6c 6c # At install
0bf0: 20 74 69 6d 65 2c 20 74 68 65 79 20 61 72 65 20 time, they are
0c00: 6d 6f 76 65 64 20 74 6f 20 6d 65 64 69 61 2f 6f moved to media/o
0c10: 73 38 20 64 69 72 65 63 74 6f 72 79 2e 0a 20 20 s8 directory..
0c20: 20 20 23 20 49 66 20 77 65 27 72 65 20 62 75 69 # If we're bui
0c30: 6c 64 69 6e 67 20 6f 72 20 6d 6f 64 69 66 79 69 lding or modifyi
0c40: 6e 67 20 74 68 65 20 4f 53 2f 38 20 6d 65 64 69 ng the OS/8 medi
0c50: 61 20 69 6e 20 74 68 65 20 69 6e 73 74 61 6c 6c a in the install
0c60: 61 74 69 6f 6e 0a 20 20 20 20 23 20 74 72 65 65 ation. # tree
0c70: 2c 20 74 68 6f 75 67 68 2c 20 77 65 20 6e 65 65 , though, we nee
0c80: 64 20 74 6f 20 77 72 69 74 65 20 73 74 72 61 69 d to write strai
0c90: 67 68 74 20 74 6f 20 74 68 65 20 6d 65 64 69 61 ght to the media
0ca0: 20 64 69 72 65 63 74 6f 72 79 2e 0a 20 20 20 20 directory..
0cb0: 6f 73 38 20 3d 20 6d 65 64 69 61 0a os8 = media.