icmstart.rc(7)

πŸ’… icmstart.rc β€” the icmstart.rc(7) glow-up

okay so bestie, welcome to the resource file era πŸŽ€ this whole page is about icmstart.rc, which is literally the icmstart(1) resource file. it's giving config-girlie, it's giving "i decide what gets installed", and we're gonna read it together. no cap. ✨


🌸 NAME

icmstart.rc β€” the icmstart(1) resource file, bestie. that's it, that's the vibe. πŸ’–


πŸ¦‹ DESCRIPTION

so icmstart.rc is the file that specifies which files get installed by icmstart(1). it's the guest list, and icmstart is the bouncer. periodt.

there's a default icmstart.rc chilling at /etc/icmake/icmstart.rc β€” but 🚨 if $HOME/.icmake/icmstart.rc exists, then icmstart(1) uses that one instead. homegirl gets priority. and then $HOME/.icmake/icmstart.rc in turn is overruled if you specify a -c option when invoking icmstart(1). so it's a whole hierarchy, iykyk. not me explaining three whole levels of priority at once 😭

the default resource file contains the following specifications, preparing for the construction of a C++ program using icmbuild(1):

CLASSES
icmconf
P  main.cc
P  main.ih
Pb usage.cc
Pb version.cc
P ? scanner
P ? parser

and the icmstart.rc file may contain:

  • empty lines, which are ignored (they're just there for the aesthetic ✨);
  • lines beginning with a hash-character (#), also ignored (comments, we love her);
  • an optional installation mode followed by a source-destination specification.

πŸŽ€ INSTALLATION MODE

an installation mode is a combination of these lil guys:

  • either a P (don’t install with icmstart xxx library) or an L (don’t install with icmstart xxx program);
  • a D, indicating that the source must also be installed by default, i.e., if neither program or library was specified as second argument;
  • a b, indicating that the file must not be installed if the -b (basic installation) option was specified when calling icmstart;
  • following the optional P, L, D, or b character a space delimited optional ? may be specified. if specified the installation of the file or directory must be confirmed by the user. yes, she wants a vibe check before committing πŸ™ˆ
so like, these letters are stackable, and the order matters. Pb hits different from bP, okay? πŸ’…

πŸ‘‘ SOURCE-DESTINATION SPECIFICATIONS

the following source-destination specifications can be used in an icmstart.rc file β€” and we're using "skeletons" below to refer to icmstart’s skeleton files directory, bestie 🦴

  • source β€” a file named source must exist in skeletons. it is installed in the destination directory dest that’s specified when calling icmstart(1). example:
CLASSES

skeletons/CLASSES is installed as dest/CLASSES;

  • pathspec β€” if pathspec does not begin with a slash it must exist in skeletons. it is installed as pathspec in the destination directory specified when calling icmstart(1). example:
dir/file

skeletons/file is installed as dest/dir/file;

  • /pathspec or ~/pathspec β€” the ~-character is expanded to the user’s home directory. the pathspec’s final element is installed in the destination directory specified when calling icmstart(1). example:
~/.icmake/file

$HOME/.icmake/file is installed as dest/file

when the above source specifications are followed by a destination specification destspec (a file or non-absolute directory specification) then the source specification is installed as dest/destspec below the destination directory specified when calling icmstart(1). examples, and yes the comments are part of the look πŸ’–

CLASSES CLASSES             # skeletons/CLASSES is installed as
                            #   dest/CLASSES
dir/file dir/file           # skeletons/dir/file is installed as
                            #   dest/dir/file
~/.icmake/file .icmake/file # $HOME/.icmake/file is installed as
                            #   dest/.icmake/file

icmstart converts destination specifications to absolute paths. and 🚨 if these absolute paths do not begin with dest’s absolute path then an error message is displayed and icmstart ends. she said "not under my roof" and logged off πŸ’€


🧚 FINE-TUNING ICMCONF

okay this section is the main character energy one, buckle up 🌈

the default icmconf file contains #defines which are used when a project uses a parser (by default generated by bisonc++(1)) and/or a scanner (by default generated by flexc++(1)). all those #defines are commented out in the default icmconf file. they are:

#define PARSER_DIR          ""
#define PARSGEN             "bisonc++"
#define PARSFLAGS           "-V"
#define PARSSPEC            "grammar"
#define PARSFILES           ""
#define PARSOUT             "parse.cc"

#define SCANNER_DIR         ""
#define SCANGEN             "flexc++"
#define SCANFLAGS           ""
#define SCANSPEC            "lexer"
#define SCANFILES            ""
#define SCANOUT             "lex.cc"

however β€” and this is the slay part β€” the icmstart.rc file can be modified so that these #defines are omitted from the project’s icmconf file unless a parser and/or scanner is actually used by the project. for this:

  • copy the files in /usr/share/icmake to ~/.icmake;
  • if the program uses a parser then define the file ~/.icmake/parser/icmconf containing
#define PARSER_DIR          "parser"
#define PARSGEN             "bisonc++"
#define PARSFLAGS           "-V"
#define PARSSPEC            "grammar"
#define PARSFILES           ""
#define PARSOUT             "parse.cc"

(here parser is the name of the directory containing the parser’s implementation; optionally another directory name can be specified); remove the parser-defines from ~/.icmake/icmconf; in ~/.icmake/icmconf/icmstart.rc replace the parser-directory specification, like

? parser    parser

by

? ~/.icmake/parser    parser
  • if the program uses a scanner then define the file ~/.icmake/scanner/icmconf containing
#define SCANNER_DIR         "scanner"
#define SCANGEN             "flexc++"
#define SCANFLAGS           ""
#define SCANSPEC            "lexer"
#define SCANFILES            ""
#define SCANOUT             "lex.cc"

(here scanner is the name of the directory containing the scanner’s implementation; optionally another directory name can be specified); remove the scanner-defines from ~/.icmake/icmconf; in ~/.icmake/icmconf/icmstart.rc replace the scanner-directory specification, like

? scanner    scanner

by

? ~/.icmake/scanner    scanner

in general: icmconf #defines can be redefined by removing them from ~/.icmake/icmconf, specifying their redefinitions in icmconf files in subdirectories of ~/.icmake/icmconf. that's the whole trick, and honestly? ate. πŸ”₯


πŸ“ FILES

the mentioned paths are suggestive only and may be installation dependent β€” so don't come for me if your distro did its own thing πŸ™ˆ

  • /usr/share/icmake/icmconf: example of an icmbuild configuration file;
  • /usr/share/icmake/CLASSES: example of an icmbuild CLASSES file;
  • /usr/share/icmake/icmstart.rc: default skeleton resource file.

πŸ’œ SEE ALSO

bisonc++(1), flexc++(1), icmake(1), icmbuild(1), icmconf(7), icmstart(1) β€” go read them, bestie, they're all linked in the group chat πŸ“š


πŸ’€ BUGS

none reported. we're flawless. (allegedly.) ✨


this is free software, distributed under the terms of the GNU General Public License (GPL). open source icon behavior, we love to see it πŸ‘‘


🫢 AUTHOR

Frank B. Brokken (f.b.brokken@rug.nl).


and that's the page, bestie πŸŽ€ mwah πŸ’‹ β€” this lil rewrite is brought to you by icmake.13.07.00, dated 1992-2026, and it's still icmstart.rc(7) at the end of the day. slay, bye! 🌈⭐

πŸ“¦ where this page comes from