-
Notifications
You must be signed in to change notification settings - Fork 38
ENT-12600: compile: Documented script #1775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
e730841
d831459
b143756
e5dc631
e4d98d8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,55 @@ | ||
#!/bin/sh -x | ||
#!/bin/sh | ||
|
||
. `dirname "$0"`/functions | ||
# Usage: PROJECT=[nova|community] ROLE=[hub|agent] ./buildscripts/build-scripts/compile | ||
# | ||
# This script compiles and installs the CFEngine repositories into | ||
# '$BASEDIR/cfengine/dist'. You should first run the 'autogen' script, then | ||
# 'configure' script before running this script. | ||
# | ||
# The script expects the following repositories to exist side by side: | ||
# . | ||
# ├── buildscripts | ||
# ├── core | ||
# ├── enterprise | ||
# ├── nova | ||
# └── masterfiles | ||
Comment on lines
+13
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. here, as in another script I reviewed you might include two blocks: one for community, the other for ent. |
||
|
||
. "$(dirname "$0")"/functions | ||
. detect-environment | ||
. compile-options | ||
|
||
case "$PROJECT" in | ||
community) | ||
NOVA=no | ||
;; | ||
nova) | ||
NOVA=yes | ||
;; | ||
*) | ||
echo "Unknown project: $PROJECT" | ||
exit 42;; | ||
community) | ||
NOVA=no | ||
;; | ||
nova) | ||
NOVA=yes | ||
;; | ||
*) | ||
echo "$(basename "$0"): Error: Unknown project: $PROJECT" | ||
exit 42 | ||
;; | ||
esac | ||
|
||
$MAKE -C $BASEDIR/core -k | ||
$MAKE -C $BASEDIR/core install DESTDIR=$BASEDIR/cfengine/dist | ||
echo "$(basename "$0"): Debug: Running make in core repo..." | ||
run_and_print_on_failure $MAKE -C "$BASEDIR"/core -k | ||
echo "$(basename "$0"): Debug: Running make install in core repo..." | ||
run_and_print_on_failure $MAKE -C "$BASEDIR"/core install DESTDIR="$BASEDIR"/cfengine/dist | ||
|
||
if test "x$NOVA" = "xyes"; then | ||
$MAKE -C $BASEDIR/enterprise -k | ||
$MAKE -C $BASEDIR/enterprise install DESTDIR=$BASEDIR/cfengine/dist | ||
if test "x$ROLE" = "xhub"; then | ||
$MAKE -C $BASEDIR/nova -k | ||
$MAKE -C $BASEDIR/nova install DESTDIR=$BASEDIR/cfengine/dist | ||
$MAKE -C $BASEDIR/masterfiles install DESTDIR=$BASEDIR/cfengine/dist | ||
if [ "$NOVA" = yes ]; then | ||
echo "$(basename "$0"): Debug: Running make in enterprise repo..." | ||
run_and_print_on_failure $MAKE -C "$BASEDIR"/enterprise -k | ||
echo "$(basename "$0"): Debug: Running make install in enterprise repo..." | ||
run_and_print_on_failure $MAKE -C "$BASEDIR"/enterprise install DESTDIR="$BASEDIR"/cfengine/dist | ||
if [ "$ROLE" = hub ]; then | ||
Comment on lines
+40
to
+43
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting to break it up separate for nova and the |
||
echo "$(basename "$0"): Debug: Running make in nova repo..." | ||
run_and_print_on_failure $MAKE -C "$BASEDIR"/nova -k | ||
echo "$(basename "$0"): Debug: Running make install in nova repo..." | ||
run_and_print_on_failure $MAKE -C "$BASEDIR"/nova install DESTDIR="$BASEDIR"/cfengine/dist | ||
echo "$(basename "$0"): Debug: Running make install in masterfiles repo..." | ||
run_and_print_on_failure $MAKE -C "$BASEDIR"/masterfiles install DESTDIR="$BASEDIR"/cfengine/dist | ||
fi | ||
else | ||
$MAKE -C $BASEDIR/masterfiles install DESTDIR=$BASEDIR/cfengine/dist | ||
echo "$(basename "$0"): Debug: Running make install in masterfiles repo..." | ||
run_and_print_on_failure $MAKE -C "$BASEDIR"/masterfiles install DESTDIR="$BASEDIR"/cfengine/dist | ||
fi | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not for this PR, but we should probably align this with the names we use elsewhere, i.e.
enterprise instead of nova and client instead of agent.