s6-frontend-config-preprocess reads a s6-frontend configuration file and executes all its inclusion directives, also preprocessing the included files. It streams the result to stdout, which is a complete configuration file without inclusions.
s6-frontend-config-preprocess file
s6-frontend-config-preprocess reads file and prints it to stdout. It removes lines starting with !!.
When it finds a !include or !includeonce directive in file, it replaces it with the contents of the included file - recursively preprocessed.
When it finds a !includedir or !includedironce directive in file, it replaces it with the recursively preprocessed contents of every file present in the included directory. The files are sorted alphabetically according to the C locale.
!includeonce and !includedironce only print a file (resp. a directory) the first time they encounter it, and silently ignore subsequent instances. !include and !includedir directives will happily include the same files several times.
To avoid loops, a nesting limit exists. s6-frontend-config-preprocess will fail if there are too many nested inclusions.