Go to file
Felix Salfelder 77242fd407 synchronize with gnucap/develop 2023-04-19 00:00:00 +00:00
tests missing file 2020-06-29 11:02:46 +01:00
.gitignore gitignore 2018-10-07 22:39:10 +01:00
COPYING configure, Makefile polish etc 2018-10-07 22:39:20 +01:00
ChangeLog configure, Makefile polish etc 2018-10-07 22:39:20 +01:00
INSTALL follow unsigned change 2020-08-27 22:26:15 +01:00
Makefile.in get CXX from gnucap-conf 2020-06-06 04:14:08 +01:00
README README 2019-01-24 20:58:01 +00:00
c_cmk.cc synchronize with gnucap/develop 2023-04-19 00:00:00 +00:00
c_history.cc synchronize with gnucap/develop 2023-04-19 00:00:00 +00:00
c_include.cc synchronize with gnucap/develop 2023-04-19 00:00:00 +00:00
c_make_attach.cc testing 2023-02-16 00:00:00 +00:00
c_message.cc more conditional stuff 2018-05-24 21:59:38 +01:00
c_uninst.cc import c_uninst from gnucsator 2020-06-29 10:58:45 +01:00
c_vpp.cc synchronize with gnucap/develop 2023-04-19 00:00:00 +00:00
config.h.in archaic configure script 2018-05-17 13:20:30 +01:00
configure fix cxx assignment blunder in configure 2020-06-07 10:29:37 +01:00
d_subckt_p.cc testing 2023-02-16 00:00:00 +00:00
gncp.rc d_subckt_p test 2020-06-06 04:13:55 +01:00
gnucap.mk.1 import gnucap-make 2019-01-24 20:37:40 +00:00
gnucap.mk.in import gnucap-make 2019-01-24 20:37:40 +00:00
lang_verilog.cc synchronize with gnucap/develop 2023-04-19 00:00:00 +00:00
main.cc testing 2023-02-16 00:00:00 +00:00
tab_completion.cc synchronize with gnucap/develop 2023-04-19 00:00:00 +00:00

README

gnucap-custom provides a basis for gnucap customisations including stuff and
work in progress that I find useful.

== gnucap-custom (the binary)

an executable allowing for easy customisation. This replaces the
upstream gnucap executable in some situations.

 options are (some are subject to plugins)
   -v file.v          # process verilog file
   -DXXX, -UXXX       # "`define XXX", "`undef XXX"
   -I/path/to/stuff   # append to `include path

== 'gncp'. out of the box example

this is just a symlink to gnucap-custom, and a corresponding rc.
it has all available features enabled.

- readline persistent history
- make transitive relative includes work
- GNUCAP_INCLUDEPATH environment controls `include
- (partial) verilog preprocessing, `if(n)def etc.
- load .cc files directly (compile on demand).

== plugins

most functionality is provided as plugins, and extends libgnucap. It can be
used from whichever gnucap program, e.g.

$ gnucap -a custom/c_include.so       # provides `include command
$ gnucap -a custom/tab_completion.so  # enables tab_completion
$ gnucap -a custom/c_cmk.so           # node ordering
$ gnucap -a custom/c_make_attach.so   # build and load plugins in 1 go
(etc.)

== creating custom executables

gnucap loads $sysconfdir/basename(argv[0]).rc upon startup. it takes
GNUCAP_SYSCONFDIR (if specified) from the environment as an override for
$sysconfdir.

now its possible to have local custom installations.
$ export GNUCAP_SYSCONFDIR=$HOME/.gnucap:/etc    # put in ~/.profile?
$ echo stuff > $HOME/.gnucap/foocap.rc           # configure something
$ ln -s  /usr/bin/gnucap $HOME/.bin/foocap       # or wherever it is.
$ foocap                                         # reads stuff
your-own-flavour> ...

== installation

you need to install gnucap-custom (the binary) so this works without
additional environment tweaks (recommended).

see INSTALL for instructions

== TODO/WIP

- -b is still missing (and other slight deviations)
- per directory rc
- undef-all/reset command (hook into clear)
- verilog `constant expansion
- exit codes (fix exception handling)

== BUGS/LIMITATIONS

- lang_vpp:
 - not sure if verilog has `if 0/1
 - requires patched lang_verilog
 - preprocessor conditionals must be aligned to scopes.
- tab_completion: needs work.