Skip to content

Commit

Permalink
make: Add ConditionalValue expression structure
Browse files Browse the repository at this point in the history
`ConditionalValue` represents an expression in a Makefile in the form of
`VARIABLE-$(CONDITION) += VALUE`.  This is a typical convention in C-
based projects where the `$(CONDITION)` variable either resolves itself
to a variable or value, e.g. `y`.

Signed-off-by: Alexander Jung <[email protected]>
  • Loading branch information
nderjung committed Jan 20, 2023
1 parent e4200be commit 4ee5c82
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions make/value.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors.
// Licensed under the BSD-3-Clause License (the "License").
// You may not use this file except in compliance with the License.
package make

// ConditionalValue represents an expression in a Makefile in the form of
// `VARIABLE-$(CONDITION) += VALUE`. This is a typical convention in C-based
// projects where the `$(CONDITION)` variable either resolves itself to a
// variable or value, e.g. `y`.
type ConditionalValue struct {
DependsOn *string
Value string
}

0 comments on commit 4ee5c82

Please sign in to comment.