diff options
| author | kx <kx@radix-linux.su> | 2026-10-02 08:45:51 +0300 |
|---|---|---|
| committer | kx <kx@radix-linux.su> | 2026-10-02 08:45:51 +0300 |
| commit | 9d5894a43e3b4dcc4c3b2756b289aba51eef6c63 (patch) | |
| tree | 5df3a0f2d7c387180da675aec606e276c0d76f11 /doc | |
| parent | ba1b04d64bdfaf377915b22f77520216ebe47674 (diff) | |
| download | mcpu-cpp-9d5894a43e3b4dcc4c3b2756b289aba51eef6c63.tar.xz | |
Move per-user configuration to /home/kx/.mcpu/etc/mcpu-cpp.conf and add --sys-root=PATH
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/mcpu-cpp-en.md | 34 | ||||
| -rw-r--r-- | doc/mcpu-cpp-ru.md | 34 |
2 files changed, 46 insertions, 22 deletions
diff --git a/doc/mcpu-cpp-en.md b/doc/mcpu-cpp-en.md index 5429456..bcab282 100644 --- a/doc/mcpu-cpp-en.md +++ b/doc/mcpu-cpp-en.md @@ -258,14 +258,14 @@ runtime-derived defaults ↓ /etc/mcpu/mcpu-cpp.conf ↓ -$HOME/.mcpu/mcpu-cpp.conf +$HOME/.mcpu/etc/mcpu-cpp.conf ``` `<runtime-root>/etc/mcpu-cpp.conf` is installed with MCPU-CPP, but deliberately does not contain an absolute default `MCPU_CPP_SYSTEM_INCLUDE_PATH`: otherwise moving the tree would restore the old path. `/etc/mcpu/mcpu-cpp.conf` is an optional machine-wide override; `make install` does not create `/etc/mcpu`. -`$HOME/.mcpu/mcpu-cpp.conf` is also optional, is not versioned, and has the +`$HOME/.mcpu/etc/mcpu-cpp.conf` is also optional, is not versioned, and has the highest configuration priority. If one variable is defined more than once, the last definition wins, including @@ -300,10 +300,21 @@ file may later enable it again with a nonempty value. `--config-file FILE` applies an explicitly selected file on top of the runtime-derived default. `--no-config` disables **only configuration-file reading**: `<runtime-root>/etc/mcpu-cpp.conf`, `/etc/mcpu/mcpu-cpp.conf`, and -`$HOME/.mcpu/mcpu-cpp.conf` are not read, but `<runtime-root>/include` remains -the standard system root. Only `-nostdinc` removes the effective standard -system tree from include search for one invocation; an explicit `-isystem` -still remains a command-line directory. +`$HOME/.mcpu/etc/mcpu-cpp.conf` are not read, but `<runtime-root>/include` remains +the standard system root. + +`--sys-root=PATH` is a stronger command-line override. It uses `PATH` as the +MCPU system root, makes `PATH/include` the runtime-derived +`MCPU_CPP_SYSTEM_INCLUDE_PATH`, and implicitly disables all configuration-file +reading, including an explicitly supplied `--config-file`. `PATH` may be +absolute or relative. A relative value is resolved against the invocation +working directory before the effective include root is formed. This makes it +possible to select another complete MCPU tree for one invocation without +changing either the installed tree or persistent configuration. + +Only `-nostdinc` removes the effective standard system tree from include search +for one invocation; an explicit `-isystem` still remains a command-line +directory. ### 4.3. Normative include-file search order @@ -1240,7 +1251,7 @@ exist for the future high-level language. The version of `mcpu-cpp` has its own unambiguous name: ```text -#define __MCPU_CPP_VERSION__ "1.0.2" +#define __MCPU_CPP_VERSION__ "1.0.3" ``` The value is obtained automatically from `PACKAGE_VERSION`. When a compiler @@ -1435,7 +1446,7 @@ WIDTH, and SIZEOF are defined: #define __SIZEOF_UINT1024__ 128 ``` -With the current LibMPU 1.0.25, `NB_I_MAX == 8192`, so the family extends to +With the current LibMPU 1.0.35, `NB_I_MAX == 8192`, so the family extends to `int65536`/`uint65536`, with `__SIZEOF_INT65536__ == 8192`. Decimal-digit metadata is defined for **every** permitted integer width: @@ -1528,7 +1539,7 @@ __REAL<bits>_MAX_10_EXP__ __REAL<bits>_MIN_10_EXP__ ``` -For example, with LibMPU 1.0.25, the current `real128` profile gives values of +For example, with LibMPU 1.0.35, the current `real128` profile gives values of the form: ```text @@ -1644,7 +1655,8 @@ mcpu-cpp -dconfig requires no input file and prints the effective configuration-variable layer after runtime configuration, optional system override, home user override, or a selected `--config-file` have been read, including `$NAME`/`${NAME}` -expansion. Lines are sorted by name and printed as: +expansion. With `--sys-root=PATH`, configuration files are not read and the +dump instead exposes the command-line-selected `PATH/include` system root. Lines are sorted by name and printed as: ```text NAME = value; @@ -1652,7 +1664,7 @@ NAME = value; This makes it possible to inspect actual include paths without manually searching `<runtime-root>/etc/mcpu-cpp.conf`, `/etc/mcpu/mcpu-cpp.conf`, and -`$HOME/.mcpu/mcpu-cpp.conf`. +`$HOME/.mcpu/etc/mcpu-cpp.conf`. ### 8.13. Verbose configuration snapshot: `-v` diff --git a/doc/mcpu-cpp-ru.md b/doc/mcpu-cpp-ru.md index f8f762a..f9719e0 100644 --- a/doc/mcpu-cpp-ru.md +++ b/doc/mcpu-cpp-ru.md @@ -259,14 +259,14 @@ runtime-derived defaults ↓ /etc/mcpu/mcpu-cpp.conf ↓ -$HOME/.mcpu/mcpu-cpp.conf +$HOME/.mcpu/etc/mcpu-cpp.conf ``` `<runtime-root>/etc/mcpu-cpp.conf` устанавливается вместе с MCPU-CPP, но сам файл намеренно не содержит абсолютного штатного `MCPU_CPP_SYSTEM_INCLUDE_PATH`: иначе перенос всего дерева восстановил бы старый путь. `/etc/mcpu/mcpu-cpp.conf` является необязательным machine-wide override: `make install` каталог -`/etc/mcpu` не создаёт. Домашний `$HOME/.mcpu/mcpu-cpp.conf` также необязателен, +`/etc/mcpu` не создаёт. Домашний `$HOME/.mcpu/etc/mcpu-cpp.conf` также необязателен, не версионируется и имеет максимальный config-приоритет. Если одна переменная определена несколько раз, побеждает последнее @@ -300,10 +300,21 @@ MCPU_CPP_SYSTEM_INCLUDE_PATH = ; `--config-file FILE` применяет явно выбранный файл поверх runtime-derived default. `--no-config` отключает **только чтение файлов конфигурации**: `<runtime-root>/etc/mcpu-cpp.conf`, `/etc/mcpu/mcpu-cpp.conf` и -`$HOME/.mcpu/mcpu-cpp.conf` не читаются, но `<runtime-root>/include` остаётся -штатным system root. Только `-nostdinc` удаляет effective standard-system tree -из include search для конкретного запуска; явно переданный `-isystem` при этом -остаётся command-line каталогом. +`$HOME/.mcpu/etc/mcpu-cpp.conf` не читаются, но `<runtime-root>/include` остаётся +штатным system root. + +`--sys-root=PATH` является более сильным command-line override. Он считает +`PATH` системным корнем MCPU, формирует runtime-derived +`MCPU_CPP_SYSTEM_INCLUDE_PATH` как `PATH/include` и неявно отключает чтение всех +configuration files, включая явно заданный `--config-file`. `PATH` может быть +абсолютным или относительным. Относительное значение разрешается относительно +рабочего каталога, из которого была запущена команда, до формирования +effective include root. Это позволяет для одного запуска выбрать другое полное +дерево MCPU без изменения установленного дерева и persistent configuration. + +Только `-nostdinc` удаляет effective standard-system tree из include search для +конкретного запуска; явно переданный `-isystem` при этом остаётся command-line +каталогом. ### 4.3. Нормативный порядок поиска include-файлов @@ -1249,7 +1260,7 @@ rescan. пока нет. Собственная версия `mcpu-cpp` имеет отдельное однозначное имя: ```text -#define __MCPU_CPP_VERSION__ "1.0.2" +#define __MCPU_CPP_VERSION__ "1.0.3" ``` Значение автоматически берётся из `PACKAGE_VERSION`. Когда появится compiler @@ -1438,7 +1449,7 @@ Computed MIN expressions вроде `(-__PTRDIFF_MAX__ - 1)` в predefined table #define __SIZEOF_UINT1024__ 128 ``` -На текущей LibMPU 1.0.25 `NB_I_MAX == 8192`, поэтому family доходит до +На текущей LibMPU 1.0.35 `NB_I_MAX == 8192`, поэтому family доходит до `int65536`/`uint65536`, а `__SIZEOF_INT65536__ == 8192`. Decimal-digit metadata определяется для **каждой** разрешённой integer width: @@ -1529,7 +1540,7 @@ __REAL<bits>_MAX_10_EXP__ __REAL<bits>_MIN_10_EXP__ ``` -Например, на LibMPU 1.0.25 для `real128` текущий profile даёт значения вида: +Например, на LibMPU 1.0.35 для `real128` текущий profile даёт значения вида: ```text #define __REAL128_EPSILON__ 2.524354896707237777317531409e-29 @@ -1642,7 +1653,8 @@ mcpu-cpp -dconfig не требует input file и выводит effective variables configuration layer после чтения runtime config, необязательного system override, домашнего user override или выбранного `--config-file`, включая expansion -`$NAME`/`${NAME}`. Строки сортируются по имени и печатаются в форме: +`$NAME`/`${NAME}`. При `--sys-root=PATH` configuration files не читаются, а +dump показывает выбранный из командной строки system root `PATH/include`. Строки сортируются по имени и печатаются в форме: ```text NAME = value; @@ -1650,7 +1662,7 @@ NAME = value; Это позволяет проверить реальные include paths без ручного поиска `<runtime-root>/etc/mcpu-cpp.conf`, `/etc/mcpu/mcpu-cpp.conf` и -`$HOME/.mcpu/mcpu-cpp.conf`. +`$HOME/.mcpu/etc/mcpu-cpp.conf`. ### 8.13. Verbose configuration snapshot: `-v` |
