1*88c86054Sdaviddnl $OpenBSD: MAKEDEV.sub,v 1.14 2005/02/07 06:14:18 david Exp $ 2a5e63cf5Stodddnl 32c1f0813Stodddnl Copyright (c) 2001-2004 Todd T. Fries <todd@OpenBSD.org> 4a5e63cf5Stodddnl 53632945aStodddnl Permission to use, copy, modify, and distribute this software for any 63632945aStodddnl purpose with or without fee is hereby granted, provided that the above 73632945aStodddnl copyright notice and this permission notice appear in all copies. 8a5e63cf5Stodddnl 93632945aStodddnl THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 103632945aStodddnl WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 113632945aStodddnl MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 123632945aStodddnl ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 133632945aStodddnl WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 143632945aStodddnl ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 153632945aStodddnl OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16a5e63cf5Stodddnl 17a5e63cf5Stodddnl 18a5e63cf5Stodddnl This file is an m4 file 19a5e63cf5Stodddnl 20a5e63cf5Stodddnl Conventions: 21a5e63cf5Stodddnl 22a5e63cf5Stodddnl o First, a change of quote to make shell statements like: `command` 23a5e63cf5Stodddnl possible 24a5e63cf5Stodddnl 25a5e63cf5Stoddchangequote(`{-', `-}')dnl 26a5e63cf5Stodddnl 2799285250Sdanhdnl o Next, change the comment character to make shell parameter 2899285250Sdanhdnl substitution possible 2999285250Sdanhdnl 3099285250Sdanhchangecom(`/*', `*/')dnl 3199285250Sdanhdnl 32a5e63cf5Stodddnl o version info must be stripped of $ so we can say 'generated from' below 33a5e63cf5Stodddnl 34a5e63cf5Stodddnl If we just use the version string how are we going to know what arch 35a5e63cf5Stodddnl 'MAKEDEV.md,v' came from? 36a5e63cf5Stodddnl 37a5e63cf5Stodddnl Thus, I have used the below to create a version string looking like 38a5e63cf5Stodddnl 'OpenBSD: etc.sparc/MAKEDEV.inc,v...' which works, although requires 39a5e63cf5Stodddnl some attention if ported to another Id string setup. 40a5e63cf5Stodddnl 41a5e63cf5Stodddnl 42a5e63cf5Stodddnl Initialize the stacks stored in _m4_* 43a5e63cf5Stodddnl 44a5e63cf5Stoddundefine({-_m4_cvs_ver-})dnl 45a5e63cf5Stoddpushdef({-_m4_cvs_ver-}, {-done-})dnl 46a5e63cf5Stodddnl 47a5e63cf5Stoddundefine({-_m4_devs-})dnl 48a5e63cf5Stoddpushdef({-_m4_devs-}, {-done-})dnl 49a5e63cf5Stodddnl 50a5e63cf5Stoddundefine({-_m4_disks-})dnl 51a5e63cf5Stoddundefine({-_m4_disks2-})dnl 52a5e63cf5Stoddpushdef({-_m4_disks-}, {-done-})dnl 53a5e63cf5Stoddpushdef({-_m4_disks2-}, {-done-})dnl 54a5e63cf5Stodddnl 55a5e63cf5Stodddnl define stack 'add to' functions, only unique names queued 56a5e63cf5Stodddnl 57a5e63cf5Stodddefine({-ver_q-}, {-ifelse(index($1_ver, y), 0, , 58a5e63cf5Stodd{-pushdef({-_m4_cvs_ver-}, {-$2-})define({-$1_ver-}, {-y-})-})-})dnl ver_q 59a5e63cf5Stodddnl 60a5e63cf5Stodddefine({-dev_q-}, {-ifelse(index(_q_$1_dev, :), 0, 61a5e63cf5Stodd{-errprint({-duplicated dev id: $1 at -}__file__{-:-}__line__ originally at _q_$1_dev)-}, 62a5e63cf5Stodd{-pushdef({-_m4_devs-}, {-$1-})dnl 63a5e63cf5Stodddefine({-_q_$1_dev-}, {-:-}__file__{-:-}__line__)-})-})dnl dev_q 64a5e63cf5Stodddnl 65a5e63cf5Stodddefine({-disk_q-}, {-ifelse(index(_q_$1_disk, :), 0, 66a5e63cf5Stodd{-errprint({-duplicated disk id: $1 at -}__file__{-:-}__line__ originally at _q_$1_disk)-}, {-pushdef({-_m4_disks-}, {-$1-})dnl 67a5e63cf5Stoddpushdef({-_m4_disks2-}, {-$1-})dnl 68a5e63cf5Stodddefine({-_q_$1_disks-}, {-:-}__file__{-:-}__line__)-})-})dnl disk_q 69a5e63cf5Stodddnl 70a5e63cf5Stodddnl store a version string for 'this' file 71a5e63cf5Stodddnl 72a5e63cf5Stodddnl vers ( uniqueidstring, versionstring, subdir ) 73a5e63cf5Stodddnl 74*88c86054Sdaviddnl example1: vers(__file__, {-$OpenBSD: MAKEDEV.sub,v 1.14 2005/02/07 06:14:18 david Exp $-}) 75*88c86054Sdaviddnl example2: vers(__file__, {-$OpenBSD: MAKEDEV.sub,v 1.14 2005/02/07 06:14:18 david Exp $-}, etc.MACHINE) 76a5e63cf5Stodddnl 77a5e63cf5Stodddnl if subdir is defined, prepend it to the filename in the version string 78a5e63cf5Stodddnl 79a5e63cf5Stodddefine({-vers-}, 80a5e63cf5Stodd{-ifelse({-$3-}, {--}, 81a5e63cf5Stodd{-ver_q(hstcl({-$1-}), {-translit({-{-$2-}-}, {-$-}, {--})-})-}, 82a5e63cf5Stodd{-ver_q(hstcl({-$1-}), {-_addsubdir({-{-$2-}-}, $3)-})-})-})dnl 83a5e63cf5Stodddnl 84a5e63cf5Stodddnl Version info for this file: 85a5e63cf5Stodddnl 86*88c86054Sdavidvers(__file__, {-$OpenBSD: MAKEDEV.sub,v 1.14 2005/02/07 06:14:18 david Exp $-})dnl 87a5e63cf5Stodddnl 88a5e63cf5Stodddnl 89a5e63cf5Stodddefine({-_addsubdir-}, 90a5e63cf5Stodd{-patsubst({-$1-}, {-\$(OpenBSD:) ([^\$]*)\$-}, {-\1 $2/\2-})-})dnl 91a5e63cf5Stodddnl 92a5e63cf5Stodddnl do the 'showing' of the version info 93a5e63cf5Stodddnl 94884154f4Smioddefine({-do_vers-}, {-COMM $1-})dnl 95a5e63cf5Stodddnl 96a5e63cf5Stodddnl show version function, to be called at the place when all versions are 97a5e63cf5Stodddnl queued, and it is time to show all of them 98a5e63cf5Stodddnl 99a5e63cf5Stodddefine({-show_vers-}, 100a5e63cf5Stodd{-ifelse(_m4_cvs_ver, {-done-}, {--}, 101a5e63cf5Stodd{-do_vers(_m4_cvs_ver) 102a5e63cf5Stoddpopdef({-_m4_cvs_ver-})dnl 103a5e63cf5Stoddshow_vers()dnl 104a5e63cf5Stodd-})-})dnl 105a5e63cf5Stodddnl 106a5e63cf5Stodddnl show the routines to generate devices 107a5e63cf5Stodddefine({-show_devs-}, 108a5e63cf5Stodd{-ifelse(_m4_devs, {-done-}, {--}, 109a5e63cf5Stodd{-_MKDEV(_m4_devs){--}dnl 110a5e63cf5Stoddpopdef({-_m4_devs-})dnl 111a5e63cf5Stoddshow_devs()dnl 112a5e63cf5Stodd-})-})dnl 113a5e63cf5Stodddnl 114a5e63cf5Stodddnl routines to generate disks 115a5e63cf5Stodddefine({-show_disks-}, 116a5e63cf5Stodd{-ifelse(_m4_disks, {-done-}, {--}, 117a5e63cf5Stodd{-ifcase(_m4_disks, _m4_disks{--}*)dnl 118a5e63cf5Stoddpopdef({-_m4_disks-})dnl 119a5e63cf5Stoddshow_disks()dnl 120a5e63cf5Stodd-})-})dnl 121a5e63cf5Stodddnl 122a5e63cf5Stodddefine({-show_disks2-}, 123a5e63cf5Stodd{-ifelse(_m4_disks2, {-done-}, {--}, 124a5e63cf5Stodd{-CasE(_m4_disks2)dnl 125a5e63cf5Stoddpopdef({-_m4_disks2-})dnl 126a5e63cf5Stoddshow_disks2()dnl 127a5e63cf5Stodd-})-})dnl 128a5e63cf5Stodddnl 129a5e63cf5Stodddnl 130a5e63cf5Stodddnl Some m4 math functions: 131a5e63cf5Stodddnl 132a5e63cf5Stodddnl Add(a, b) - displays the result of a+b 133a5e63cf5Stodddnl Mult(a, b) - displays the result of a*b 134a5e63cf5Stodddnl trunc a b - displays the string a minus b removed from the RHS 135a5e63cf5Stodddnl hex a - displays the hex equivalent of 0-15 136a5e63cf5Stodddnl unt a - s/[a-z]*([0-9]*).*/\1/ aka sd0a -> 0 137a5e63cf5Stodddnl 138a5e63cf5Stodddnl Functions: 139a5e63cf5Stodddnl 140a5e63cf5Stodddnl --> Addition 141a5e63cf5Stodddnl 142a5e63cf5Stodddefine({-Add-}, {-$({-(-}$1+$2{-)-})-})dnl 143a5e63cf5Stodddnl 144a5e63cf5Stodddnl --> Multiplication 145a5e63cf5Stodddnl 146a5e63cf5Stodddefine({-Mult-}, {-$({-(-}$1*$2{-)-})-})dnl 147a5e63cf5Stodddnl 148a5e63cf5Stodddnl 149a5e63cf5Stodddnl TRUNC 150a5e63cf5Stodddnl 151a5e63cf5Stodddefine({-expr_trunc-}, {-$1trunc() 152a5e63cf5Stodd$1{ 153a5e63cf5Stodd$1 case {-$-}3 in 154a5e63cf5Stodd$1 l) {-expr-} {-$-}1 : '\(.*\)'{-$-}2 ;; 155a5e63cf5Stodd$1 r|*) {-expr-} ${--}1 : ${--}2'\(.*\)' ;; 156a5e63cf5Stodd$1 esac 157a5e63cf5Stodd$1}-})dnl 158a5e63cf5Stodddnl 159a5e63cf5Stodddnl 160a5e63cf5Stodddefine({-_SHELL-}, {-sh-})dnl 161a5e63cf5Stodddefine({-_this-}, {-{-$-}T-})dnl 162a5e63cf5Stodddnl define({-_recurse-}, {-_SHELL _this-})dnl 163a5e63cf5Stodddefine({-_recurse-}, {-R-})dnl 164a5e63cf5Stodddnl 165a5e63cf5Stodddnl _devitem(pattern, description) 166a5e63cf5Stodddnl 167a5e63cf5Stodddefine({-_devitem-}, 168a5e63cf5Stodd{-{-#-} $1 {-$2-}-})dnl 169a5e63cf5Stodddnl 170a5e63cf5Stodddnl _devtitle(description) 171a5e63cf5Stodddnl 172a5e63cf5Stodddefine({-_devtitle-}, {-{-#-} $1:-})dnl 173a5e63cf5Stodddnl 174a5e63cf5Stodddnl _DEV(name, [character major], [block major]) 175a5e63cf5Stodddnl 176a5e63cf5Stodddefine({-_DEV-}, {-$1_dev{--}dnl 177a5e63cf5Stodddnl 178a5e63cf5Stodddnl _DEV 'ifelse' .. $2 - major_$1_c 179a5e63cf5Stodddnl 180a5e63cf5Stoddifelse($2, , , {-define(major_$1_c, $2)-})dnl 181a5e63cf5Stodddnl 182c8a8c367Stodddnl _DEV 'ifelse' .. $3 - major_$1_b 183a5e63cf5Stodddnl 184a5e63cf5Stoddifelse($3, , , {-define(major_$1_b, $3)-})dnl 185a5e63cf5Stodddnl 18681fbde6dStodddnl _DEV 'ifelse' .. $4 - step_$1 18781fbde6dStodddnl 18881fbde6dStoddifelse($4, , , {-define(step_$1, {-$4-})-})dnl 18981fbde6dStodddnl 190a5e63cf5Stodddnl Some magic here, defining a devitem also defines another 191a5e63cf5Stodddnl string so that later we can check if a particular devitem was 192a5e63cf5Stodddnl defined, and thus determine if the devices themselves are to 193a5e63cf5Stodddnl be built 194a5e63cf5Stodddnl 195a5e63cf5Stodddefine({-$1__DEV-}, {-Y-})dnl 196a5e63cf5Stodddnl 197a5e63cf5Stodddnl More magic, put device string name into a queue of script segments to 198c8a8c367Stodddnl be shown later if it has been defined as a device in MAKEDEV.mi 199a5e63cf5Stodddnl 200a5e63cf5Stoddifdef({-$1_mkdev-}, {-__mkdev({-$1-})-})dnl 201a5e63cf5Stodddnl 202a5e63cf5Stodddnl 203a5e63cf5Stodd-})dnl _DEV 204c8a8c367Stodddnl 205c8a8c367Stodddnl 206a5e63cf5Stodddefine({-ifdev-}, {-ifelse($1__DEV, Y, {-$2-})-})dnl 207a5e63cf5Stodddnl 208a5e63cf5Stodddefine({-_MKDEV-}, {-$1_mkdev-})dnl 209a5e63cf5Stodddefine({-_TITLE-}, {-$1_title-})dnl 2106d09f9dfSmioddefine({-__devitem-}, {-define($1_dev, {-_devitem($2, $3)-})-})dnl 211a5e63cf5Stodddefine({-__devtitle-}, {-define($1_title, {-_devtitle($2)-})-})dnl 212a5e63cf5Stodddnl 213a5e63cf5Stodddnl Beginning and ending of case entries, just incase we change in the 214a5e63cf5Stodddnl future, save chasing things down again 215a5e63cf5Stodddnl 216a5e63cf5Stodddefine({-_end-}, {- 217a5e63cf5Stodd ;; 218a5e63cf5Stodd 219a5e63cf5Stodd-})dnl 220a5e63cf5Stodddefine({-_beg-}, {-{-)-} 221a5e63cf5Stodd -})dnl 222a5e63cf5Stodddnl 223a5e63cf5Stodddnl create the script segment for making devices 224a5e63cf5Stodddnl $1 $2 $3 225a5e63cf5Stodddnl _mkdev(shortname, devpatt, action)dnl 226a5e63cf5Stodddefine({-_mkdev-}, {-define($1_mkdev, {-$2{--}_beg{--}$3{--}_end-})-})dnl 227a5e63cf5Stodddnl 228a5e63cf5Stodddnl define a major character device 229a5e63cf5Stodddnl $1 $2 $3 $4 2301c451745Stodddnl _mcdev(shortname, devpatt, devbase, devmajor [, group [ owner ] ])dnl 231a5e63cf5Stodddnl 232a5e63cf5Stodddefine({-_mcdev-}, {-define($1_mkdev, {-{-$2-}_beg{--}M $3$U c $4 $U{--}dnl 233a5e63cf5Stoddifelse($6, , ifelse($5, , , {- -}$5), {- -}ifelse($5, , 600, $5){- -}$6){--}_end-})-})dnl 234a5e63cf5Stodddnl 235a5e63cf5Stodddnl $1 $2 $3 $4 $5 $6 236a5e63cf5Stodddnl _cdev(shortname, devpatt, devmajor, devminor[, devmod, devgrp])dnl 237a5e63cf5Stodddefine({-_cdev-}, 238a5e63cf5Stodd{-dnl 239a5e63cf5Stodddefine($1_mkdev, {-$2{--}_beg{--}M $2 c $3 $4 $5 $6{--}_end-}){--}-})dnl 240a5e63cf5Stodddnl 241a5e63cf5Stodddnl 242a5e63cf5Stodddefine({-__mkdev-}, {-dev_q($1)-})dnl 243a5e63cf5Stodddnl 244a5e63cf5Stodddnl for showing disks 245a5e63cf5Stodddnl 246a5e63cf5Stodddefine({-CasE-}, 247a5e63cf5Stodd{-ifdev({-$1-}, 24881fbde6dStodd{- $1*) dodisk $1 $U major_$1_b major_$1_c $U 0{--}ifstep($1);; 249a5e63cf5Stodd-})-})dnl 250a5e63cf5Stodddnl 251a5e63cf5Stodddnl 252a5e63cf5Stodddefine({-ifcase-}, {-dnl 253a5e63cf5Stoddifelse(C_ase, Y, ifdev({-$1-}, {-|$2-}), 254a5e63cf5Stodd{-ifdev({-$1-}, {-$2define({-C_ase-}, Y)-})-})-})dnl 255a5e63cf5Stodddnl 256a5e63cf5Stodddnl 257a5e63cf5Stodddnl device list .. list devices 'iff' they are defined 258a5e63cf5Stodddnl 259a5e63cf5Stodddnl input: 260a5e63cf5Stodddnl 261a5e63cf5Stodddnl _dl({-usb-}, {-usb0 usb1-}, {-urio-}, {-urio-}, ...) 262a5e63cf5Stodddnl 263a5e63cf5Stodddnl output: 264a5e63cf5Stodddnl 265a5e63cf5Stodddnl {-<tab>_recurse usb0 usb1 urio 266a5e63cf5Stodddnl <tab>_recurse uhid0 uhid2 uhid3-} 267a5e63cf5Stodddnl 268a5e63cf5Stodddnl wrap if more than 60 chars wide 269a5e63cf5Stodddnl 270a5e63cf5Stodddnl .. wrap it all up in an 'ifelse({-$1-}, , {- ... -})' for neatness ?? 271a5e63cf5Stodddnl 272a5e63cf5Stodddefine({-_dl-}, {-dnl 273a5e63cf5Stoddifdef({-_dt-}, , {-define({-_dt-})-})dnl 274a5e63cf5Stoddifdef({-_do-}, , {-_dt{--}_recurse{--}define({-_do-}, 0)dnl 275a5e63cf5Stodddefine({-_dt-}, {- -})-})dnl 276a5e63cf5Stoddifdef({-$1__DEV-}, 277a5e63cf5Stodd{-define({-_di-}, {-$2-})-}, 278a5e63cf5Stodd{-define({-_di-})-})dnl 279a5e63cf5Stoddifelse(eval(len(_di)+_do<60), 1, 280a5e63cf5Stodd{-ifelse(eval(len(_di)>0), 1, 281a5e63cf5Stodd{- _di{--}define({-_do-}, eval(1+_do+len(_di)))-})-}, 282a5e63cf5Stodd{- 283a5e63cf5Stodd_dt{--}_recurse _di{--}dnl 284a5e63cf5Stodddefine({-_do-}, len(_di))-})dnl 285a5e63cf5Stoddifelse({-$3-}, {--}, 286a5e63cf5Stodd{-undefine({-_dt-}, {-_do-})-}, dnl <--- The END 287a5e63cf5Stodd{-_dl(shift(shift($@)))-})-})dnl 288a5e63cf5Stodddnl 28954d9ecc6Stodddnl 29054d9ecc6Stodddefine({-_show_target-}, {-dnl 29154d9ecc6Stoddifdef({-$1__DEV-}, {-disp_dev({-$2-})-})dnl 29254d9ecc6Stoddifelse({-$3-}, {--}, 29354d9ecc6Stodd{-_disp_dev_end()-}, dnl <--- The END 29454d9ecc6Stodd{-_show_target(shift(shift($@)))-})-})dnl 29554d9ecc6Stodddnl 29654d9ecc6Stodddefine({-disp_dev-}, {-dnl 29754d9ecc6Stoddifdef({-_disp_dev_tab-}, , {-define({-_disp_dev_tab-})-})dnl 29854d9ecc6Stoddifdef({-_disp_dev_len-}, , {-dnl 29954d9ecc6Stodddefine({-_disp_dev_len-}, 0)dnl 30054d9ecc6Stodd_disp_dev_tab{--}_recurse{--}dnl 30154d9ecc6Stodddefine({-_disp_dev_tab-}, {- -})-})dnl 30254d9ecc6Stoddifelse(eval(len($1)+_disp_dev_len<60), 1, 30354d9ecc6Stodd{- $1{--}define({-_disp_dev_len-}, eval(1+_disp_dev_len+len($1)))-}, {- 30454d9ecc6Stodd_disp_dev_tab{--}_recurse $1{--}dnl 30554d9ecc6Stodddefine({-_disp_dev_len-}, len($1))-})dnl 30654d9ecc6Stodd-})dnl 30754d9ecc6Stodddefine({-_disp_dev_end-}, {-undefine({-_disp_dev_tab-}, {-_disp_dev_len-})-})dnl 30854d9ecc6Stodddnl 309a5e63cf5Stodddnl A word about the above: 310a5e63cf5Stodddnl 311a5e63cf5Stodddnl _dt -> 'tab' .. at first, defined to nothing, as the tab is already there 312a5e63cf5Stodddnl then define it to a tab every time through 313a5e63cf5Stodddnl undefine it at the end 314a5e63cf5Stodddnl 315a5e63cf5Stodddnl _do -> 'old' count .. stores the length of the old string already displayed 316a5e63cf5Stodddnl it is initialized to 0, added to the length plus 1 of '_di' each 317a5e63cf5Stodddnl iteration the line is less than 60 chars long 318a5e63cf5Stodddnl undefined at the end 319a5e63cf5Stodddnl _di -> 'iteration' string .. the string used in this iteration, is empty if 320a5e63cf5Stodddnl the device does not exist 321a5e63cf5Stodddnl 32230d6f335Stodddnl 32330d6f335Stodddnl ifstep(devstr) 32430d6f335Stodddnl .. if stepping is defined for the particular device, emit ' step', else 32530d6f335Stodddnl nothing 32681fbde6dStodddefine({-ifstep-}, {-ifdef({-step_$1-}, {- -}step_$1{--})-})dnl 32754d9ecc6Stodddnl 32854d9ecc6Stodddnl 32954d9ecc6Stodddefine({-target-}, {-twrget({-$1-}, {-$2-}, {-$2-}, shift(shift($@)))-})dnl 33054d9ecc6Stodddnl 33154d9ecc6Stodddnl twrget(target, devname, prefix, str1, str2, str3) 33254d9ecc6Stodddnl $1 $2 $3 $4 $5 $6 33354d9ecc6Stodddnl 33454d9ecc6Stodddefine({-twrget-}, {-dnl 33554d9ecc6Stodddnl 33654d9ecc6Stoddifdef({-$1_target-}, , {-pushdef({-$1_target-}, {-done-})-})dnl 33754d9ecc6Stodddnl 33854d9ecc6Stoddifelse({-$4-}, , , {-dnl 33954d9ecc6Stoddifelse({-$4-}, {-_done-}, , {-dnl 34054d9ecc6Stoddifelse({-$5-}, , , {-dnl 34154d9ecc6Stodddnl errprint({-recurse: $1, $2, $3, $4, $5, $6, ...-})dnl 34254d9ecc6Stoddtwrget({-$1-}, {-$2-}, {-$3-}, shift(shift(shift(shift($@)))))dnl 34354d9ecc6Stodd-})-})-})dnl 34454d9ecc6Stodddnl 34554d9ecc6Stoddifelse({-$4-}, {-_done-}, , {-dnl 34654d9ecc6Stodddnl errprint({-recurse: $1_$2_dev, $3$4, $3$4, _done-})dnl 34754d9ecc6Stoddtwrget({-$1_$2_dev-}, {-$3$4-}, {-$3$4-}, {-_done-})dnl 34854d9ecc6Stodd-})dnl 34954d9ecc6Stodddnl 35054d9ecc6Stoddifdef({-$1$2target-}, , {-dnl 35154d9ecc6Stoddpushdef({-$1_target-}, {-$2-})define({-$1$2target-})dnl 35254d9ecc6Stodd-})dnl 35354d9ecc6Stodddnl 35454d9ecc6Stodd-})dnl 35554d9ecc6Stodddnl 35654d9ecc6Stodddnl 35754d9ecc6Stodddefine({-show_target-}, {-dnl 35854d9ecc6Stoddifelse($1_target, {-done-}, {-_disp_dev_end()-}, 35954d9ecc6Stodd{-dnl $1_target: 36054d9ecc6Stoddshow_dev($1, -}$1_target{-)dnl 36154d9ecc6Stoddpopdef({-$1_target-})dnl 36254d9ecc6Stoddshow_target({-$1-})dnl 36354d9ecc6Stodd-})-})dnl 36454d9ecc6Stodddnl 36554d9ecc6Stodddefine({-show_dev-}, {-dnl 36654d9ecc6Stoddifdef({-$2__DEV-}, {-dnl 36754d9ecc6Stoddifelse($1_$2_dev_target, {-done-}, , {-dnl 36854d9ecc6Stodddisp_dev({-$1_$2_dev_target-})dnl 36954d9ecc6Stoddpopdef({-$1_$2_dev_target-})dnl 37054d9ecc6Stoddshow_dev({-$1-}, {-$2-})-})dnl 37154d9ecc6Stodd-})dnl 37254d9ecc6Stodd-})dnl 37354d9ecc6Stodddnl 374