Dear Nick,
I would hesitate just a little bit on this one. It will possibly work OK on
Unix/Linux systems, but the WIN32 version has a few problems. I tested this
routine out on a small example in the source directory
C:\EPICS\src\example\capfast that contained a single example.sch file. My
EPICS symbols are in C:\EPICS\install\R3.13.4\templates\capfast\sym. As
nearly as I can tell from the on-line documentation, the correct command
should be
schfiles -h -l -o example.depends example.sch
1) Every invocation of SCHFILES.EXE pops up a pair of nested windows, even
if an explicit output file is requested. It does not appear possible to
suppress these windows.
2) The resulting output file contains a LOT of explanatory text:
DESIGN HIERACHY
===============
In the following design hierachy tree, lower levels of hierachy are
indented to
the right. The number of dots preceding a name indicates the depth.
The general format of an entry is,
schematic/design name (instance name <-> symbol name),
NOTE: instance name and symbol name are listed only where
appropriate.
example.sch
Schematic: .\example.sch
Symbol: c:\EPICS\install\R3.13.4\templates\capfast\sym\eais.sym
(1)
Symbol:
c:\EPICS\install\R3.13.4\templates\capfast\sym\ecalct.sym (1)
Symbol: c:\EPICS\install\R3.13.4\templates\capfast\sym\hwin.sym
(1)
It does not appear possible to get JUST the hierarchy. I suspect it might be
almost as much work parsing this file as it is to parse the original
schematic files.
3) The code seems to be stuck in the 8.3 file-naming era. With the stated
command the actual file generated was example.dep. The extension was
truncated to 3 characters without even a warning. This is harmless enough,
except that it complicates the make files if the program cannot generate
files with the expected naming conventions.
4) According to the help message that is displayed when schfiles is invoked
without parameters
SCHFILES: CapFast File List and Archive Utility, Release 3.02
Copyright (c) 1993 by Phase Three Logic, Inc.
Usage: schfiles [options] filename...
options are:
-a directory: copy design and all related files to directory
-h : list out the schematic hierarchy
-l : omit files from ~p3\library and its subdirectories
-o outfile : write file list to outfile
-p pathlist : set data file search path to pathlist
The intent is clearly that the -l option should suppress the listing of the
primitive symbols. These, in a normal EPICS installation, are generally in
the extensions/edif directory, or its installed equivalent. Although it
would technically be possible to force these to be located under the
~p3\library directory, I do not think many EPICS sites do.
As a general comment, the use of the flag "-h" to list the hierarchy strikes
me as a little odd. Intuitively, I would have expected that "-h" would
supply a help message.
I think the original purpose of this program is explained by the "-a"
option. It follows all the dependencies, then copies all and only the
required files into another directory, effectively packaging the application
for standalone operation. This is a very interesting operation, but not
quite the same as we need.
5) In principle, we can restrict the search path to the current directory,
which would be acceptable for simple EPICS applications, by adding the "-p."
switch to the command line. This produces a large number of errors,
however, for the references to unresolved symbols:
schfiles: Reading file example.sch ...
schfiles: error: unable to open file ecalct.sym for reading
schfiles: error: unable to open file hwin.sym for reading
schfiles: error: unable to open file eais.sym for reading
schfiles: fatal error: Reading file example.sch failed
Perhaps Phase3 might add some options to SCHFILES to
a) -w => no windows, i.e. suppress the opening of the windows (command line
operation only with all output directed to stdout and stderr).
Alternately,
suppress the opening of the windows when -o is specified.
b) -m <filename> => format the output as a makefile dependency, i.e.
target : list of dependencies
with no extraneous text. Preferably, relative paths should be used,
not
absolute paths, so that files in the same directory do not have the
full path name prepended.
c) -q <path> => (opposite of -p) i.e. omit from the list any files that
appear
in this search path. This would allow us to selectively supress the
listing
of standard symbols that are located in nonstandard places like
epics/base
and epics/extensions.
The program should always honour the requested file name in the -o switch
unless the file system rejects it as invalid.
Alternatively, might it not be easier, faster, and more in the spirit of
EPICS, to translate Brian Bevan's csh script into perl so that it will run
on more platforms?
Cheers,
Russell O. Redman
-----Original Message-----
From: Nick Rees [mailto:[email protected]]
Sent: Thursday, May 03, 2001 6:10 PM
To: [email protected]
Subject: Re: Capfast Rules in 3.13.4 RULES.Host
Something I realised a while ago and meant to post to the exploder about
Capfast dependencies. Brian Bevins posted a script to generate a Capfast
heirarchy - but I found that the Capfast distribution includes a program
to do the same thing called schfiles. So the upshot of the discussion is
that I intend to implement a depends target for Capfast using schfiles.
Cheers,
Nick Rees
Joint Astronomy Centre Ph: +1 (808) 961-3756
660 N. Aohoku Place Fax: +1 (808) 961-6516
Hilo, HI. 96720 Internet: [email protected]
- Replies:
- Re: CapFast Rules in 3.13.4 RULES.Host Dr. Chong Lee
- Navigate by Date:
- Prev:
Re: Capfast Rules in 3.13.4 RULES.Host Nick Rees
- Next:
Re: CapFast Rules in 3.13.4 RULES.Host Dr. Chong Lee
- Index:
1994
1995
1996
1997
1998
1999
2000
<2001>
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Capfast Rules in 3.13.4 RULES.Host Nick Rees
- Next:
Re: CapFast Rules in 3.13.4 RULES.Host Dr. Chong Lee
- Index:
1994
1995
1996
1997
1998
1999
2000
<2001>
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|