home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / gccdist / bison / install_bison.com < prev    next >
Encoding:
Text File  |  1992-06-25  |  1.3 KB  |  46 lines

  1. $!
  2. $!    This command file sets up the necessary logical names for
  3. $!    Bison.
  4. $!
  5. $! Find the directory spec. for the install procedure
  6. $!
  7. $ Procedure:='f$environment("PROCEDURE")'
  8. $ Device:='f$parse(Procedure,,,"DEVICE","NO_CONCEAL")'
  9. $ Directory:='f$parse(Procedure,,,"DIRECTORY","NO_CONCEAL")'
  10. $ Path:="''Device'''Directory'"
  11. $!
  12. $! Check for "rooted" directory specs
  13. $!
  14. $ l = 'f$length(Path)'
  15. $ tmp = 'f$locate(".][",Path)'
  16. $ if 'tmp' .ne. 'l' then goto 10$
  17. $ tmp = 'f$locate(".><",Path)'
  18. $ if 'tmp' .ne. 'l' then goto 10$
  19. $ goto 100$
  20. $!
  21. $! Eliminate rooted directory specs
  22. $!
  23. $ 10$:
  24. $ if "''f$extract(tmp,255,Path)'" .eqs. ".][000000]" then goto 20$
  25. $ if "''f$extract(tmp,255,Path)'" .eqs. ".><000000>" then goto 20$
  26. $ l = tmp + 3
  27. $ Path:="''f$extract(0,tmp,Path)'.''f$extract(l,255,Path)'"
  28. $ goto 100$
  29. $ 20$:
  30. $ l = tmp + 1
  31. $ Path:="''f$extract(0,tmp,Path)'''f$extract(l,1,Path)'"
  32. $ 100$:
  33. $!
  34. $! Calculate the prefix and suffix (used in generating desired paths)
  35. $!
  36. $ l = 'f$length(Path)' - 1
  37. $ Prefix:='f$Extract(0,l,Path)'
  38. $ Suffix:='f$extract(l,1,Path)'
  39. $!
  40. $ Bison_Directory:="''Prefix'.''Suffix'"
  41. $!
  42. $ system = "/job"
  43. $ if f$priv("SYSNAM").eqs."TRUE" then system = "/system"
  44. $ if f$priv("SYSPRV").eqs."TRUE" then system = "/system"
  45. $ assign'system' 'Bison_Directory' GNU_BISON/tran=(conc)
  46.