Skip to content

Commit

Permalink
spec: targets: rename attribute mapfile to library/mapfile
Browse files Browse the repository at this point in the history
Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]>
  • Loading branch information
metux committed Dec 10, 2023
1 parent a5a34f9 commit 961c748
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
42 changes: 21 additions & 21 deletions doc/spec/targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,31 +91,31 @@ pkgconf _(`*.pc`)_, symbolic link _(`*.so`)_ for development, header files, etc.

The attributes are those of `c/executable` plus some more:

| Attribute | Default | Description |
|----------------|----------------|-----------------------------------------------------------|
| abi | 1 | shared object version |
| compiler/lang | C | compiler language |
| description | ${description} | description _(for pkgconf)_ |
| install | true | whether to install |
| install/dir | | installation dir |
| install/subdir | | installation subdir |
| library/name | ${@@^::@id} | library name _(as used in `-l...` flag)` |
| mapfile | | linker map file |
| pkgconf | | map of pkg-config metadata _(`name:` and `description:`)_ |
| skip/devlink | | skip devlink _(to shared object)_ |
| skip/pkgconf | | skip `.pc` file |
| skip/shared | | skip shared object |
| skip/static | | skip static archive |
| version | ${version} | version _(for pkgconf)_ |
| Attribute | Default | Description |
|-----------------|----------------|-----------------------------------------------------------|
| abi | 1 | shared object version |
| compiler/lang | C | compiler language |
| description | ${description} | description _(for pkgconf)_ |
| install | true | whether to install |
| install/dir | | installation dir |
| install/subdir | | installation subdir |
| library/name | ${@@^::@id} | library name _(as used in `-l...` flag)` |
| library/mapfile | | linker map file |
| pkgconf | | map of pkg-config metadata _(`name:` and `description:`)_ |
| skip/devlink | | skip devlink _(to shared object)_ |
| skip/pkgconf | | skip `.pc` file |
| skip/shared | | skip shared object |
| skip/static | | skip static archive |
| version | ${version} | version _(for pkgconf)_ |

#### Example:
```
zlib:
type: c/library
mapfile: zlib.map
version: 1
library/name: z
c/defines: ${buildconf::host::flags::c/defines}
type: c/library
version: 1
library/mapfile: zlib.map
library/name: z
c/defines: ${buildconf::host::flags::c/defines}
pkgconf:
name: zlib
description: ZLib compression library
Expand Down
8 changes: 4 additions & 4 deletions examples/pkg/zlib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ configure:

targets:
zlib{c/library}:
mapfile: zlib.map
version: 1
library/name: z
c/defines: ${buildconf::host::flags::c/defines}
version: 1
library/name: z
library/mapfile: zlib.map
c/defines: ${buildconf::host::flags::c/defines}
pkgconf:
name: zlib
description: ZLib compression library
Expand Down
4 changes: 2 additions & 2 deletions spec/target/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const (

// library main
KeyHeaders = Key("headers")
KeyMapfile = Key("mapfile")
KeyLibraryName = Key("library/name")
KeyStaticLib = Key("static::file")

Expand All @@ -56,7 +55,8 @@ const (
// libraries
const (
// pkgconf ID for internal libs
KeyLibraryPkgId = Key("library/pkgid")
KeyLibraryPkgId = Key("library/pkgid")
KeyLibraryMapFile = Key("library/mapfile")
)

// internal builder configuration
Expand Down

0 comments on commit 961c748

Please sign in to comment.