Skip to content

Commit

Permalink
Merge pull request #562 from amazonlinux/buildsys-bin
Browse files Browse the repository at this point in the history
simplify build system
  • Loading branch information
bcressey authored Dec 3, 2019
2 parents 3344d85 + 87c36aa commit 68649dc
Show file tree
Hide file tree
Showing 134 changed files with 2,460 additions and 4,494 deletions.
45 changes: 19 additions & 26 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ fi
dependencies = ["setup"]
script = [
'''
for ws in workspaces packages images ; do
for ws in workspaces packages images tools/buildsys ; do
cargo fetch --locked --manifest-path ${ws}/Cargo.toml
done
chmod o+r -R ${CARGO_HOME}
Expand Down Expand Up @@ -107,34 +107,37 @@ ${BUILDSYS_TOOLS_DIR}/docker-go \
'''
]

[tasks.build-packages]
[tasks.build-tools]
dependencies = ["setup", "fetch"]
script = [
'''
cargo build \
${CARGO_BUILD_ARGS} \
cargo install \
${CARGO_MAKE_CARGO_ARGS} \
--manifest-path packages/Cargo.toml \
--all
--path tools/buildsys \
--root tools \
--force \
--quiet
'''
]

[tasks.world-packages]
dependencies = ["setup", "fetch"]
[tasks.build-packages]
dependencies = ["build-tools"]
script = [
'''
export PATH="${BUILDSYS_TOOLS_DIR}/bin:${PATH}"
cargo build \
${CARGO_BUILD_ARGS} \
${CARGO_MAKE_CARGO_ARGS} \
--manifest-path packages/Cargo.toml \
--all --all-features
--all
'''
]

[tasks.build-images]
dependencies = ["build-packages"]
script = [
'''
export PATH="${BUILDSYS_TOOLS_DIR}/bin:${PATH}"
cargo build \
${CARGO_BUILD_ARGS} \
${CARGO_MAKE_CARGO_ARGS} \
Expand All @@ -143,17 +146,11 @@ cargo build \
'''
]

[tasks.world-packages]
alias = "build-packages"

[tasks.world-images]
dependencies = ["world-packages"]
script = [
'''
cargo build \
${CARGO_BUILD_ARGS} \
${CARGO_MAKE_CARGO_ARGS} \
--manifest-path images/Cargo.toml \
--package ${IMAGE}
'''
]
alias = "build-images"

[tasks.check-licenses]
dependencies = ["fetch"]
Expand Down Expand Up @@ -202,22 +199,18 @@ dependencies = [
]

[tasks.world]
dependencies = [
"link-clean",
"world-images",
"check-licenses",
"link-images",
]
alias = "build"

[tasks.preview-docs]
script = ['tools/gen-docs.sh']

[tasks.clean]
script = [
'''
for ws in workspaces packages images ; do
for ws in workspaces packages images tools/buildsys ; do
cargo clean --manifest-path ${ws}/Cargo.toml
done
rm -f ${BUILDSYS_TOOLS_DIR}/bin/buildsys
for ext in rpm tar lz4 img ; do
rm -f ${BUILDSYS_OUTPUT_DIR}/*.${ext}
done
Expand Down
Loading

0 comments on commit 68649dc

Please sign in to comment.