Skip to content

Commit 382d23c

Browse files
committed
configure: Documented the script
Ticket: ENT-12600 Signed-off-by: Lars Erik Wik <[email protected]>
1 parent 908238b commit 382d23c

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

build-scripts/configure

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,32 @@
11
#!/bin/sh
22

3+
#
4+
# This script runs configure on each of the CFEngine repositories.
5+
# It determines which configure options and compiler flags to use based on the dependencies found in compile-options script.
6+
#
7+
# The script expects the following repositories to exist side by side:
8+
# .
9+
# ├── buildscripts
10+
# ├── core
11+
# ├── enterprise
12+
# ├── nova
13+
# └── masterfiles
14+
#
15+
# ^ When building community you won't need enterprise, nova.
16+
#
17+
# The script can be run as follows:
18+
# ```
19+
# $ PROJECT=[nova|community] BUILD_TYPE=[DEBUG|RELEASE] EXPLICIT_ROLE=[hub|agent] ./buildscripts/build-scripts/configure
20+
# ```
21+
#
22+
323

424
. "$(dirname "$0")"/functions
525
. detect-environment
626
. compile-options
727
. version
828

29+
# Make sure the PROJECT variable is set correctly
930
case "$PROJECT" in
1031
community)
1132
NOVA=no
@@ -86,6 +107,7 @@ case "$ARCH-${OS_FAMILY}" in
86107
esac
87108

88109

110+
# Select configure options and compiler flags based on BUILD_TYPE
89111
case "$BUILD_TYPE" in
90112
RELEASE)
91113
CFLAGS="-g2 -O2 -DNDEBUG $CFLAGS"
@@ -103,6 +125,7 @@ esac
103125

104126
if [ "$OS" = solaris ]
105127
then
128+
# Otherwise, we pick wrong pkg-config file (from OS), with a lower version of libxml dependency than we would like to have.
106129
export PKG_CONFIG_PATH="$BUILDPREFIX/lib/pkgconfig"
107130
fi
108131

0 commit comments

Comments
 (0)