Skip to content

Commit 98b1337

Browse files
committed
[build] Relicense top-level build script to BSD
These scripts are intended to be modified by the user for their project without the need to publish their changes to it.
1 parent 72d6564 commit 98b1337

File tree

4 files changed

+54
-22
lines changed

4 files changed

+54
-22
lines changed

tools/build_script_generator/make/module.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ applications:
99
- a `modm/config.mk` file: configures the toolchain, device-specific information
1010
and sets up generic and special build rules based on the `modm:build` options.
1111
- a `modm/repo.mk` file: contains all build rules to build the modm library.
12-
- a top-level `Makefile` file: globs the application sources and provides all
13-
the Makefile targets for the device-specific embedded tools.
12+
- a top-level BSD-licensed `Makefile` file: globs the application sources and
13+
provides all the Makefile targets for the device-specific embedded tools.
1414

1515
We do not intend to serve every possible use-case with this module.
1616
**If you need something special, write your own Makefile, maybe starting by
17-
modifying ours.**
17+
modifying ours.** It is intentionally BSD-licensed so that you do not have to
18+
publish your changes to it.
19+
1820
Remember to set `modm:build:make:include_makefile` to `False`, so that your
1921
custom `Makefile` does not get overwritten by `lbuild build`.
2022

tools/build_script_generator/make/resources/Makefile.in

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,25 @@
11
# Copyright (c) 2021, Niklas Hauser
22
#
3-
# This file is part of the modm project.
3+
# Redistribution and use in source and binary forms, with or without
4+
# modification, are permitted provided that the following conditions are met:
45
#
5-
# This Source Code Form is subject to the terms of the Mozilla Public
6-
# License, v. 2.0. If a copy of the MPL was not distributed with this
7-
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
6+
# 1. Redistributions of source code must retain the above copyright notice, this
7+
# list of conditions and the following disclaimer.
8+
#
9+
# 2. Redistributions in binary form must reproduce the above copyright notice,
10+
# this list of conditions and the following disclaimer in the documentation
11+
# and/or other materials provided with the distribution.
12+
#
13+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
14+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
17+
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19+
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
20+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
21+
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
823

924
%% if is_unittest
1025
unittest_runner.cpp:

tools/build_script_generator/scons/module.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ This module generates two files:
99
- a `modm/SConscript` file: configures all required SCons tools with
1010
the right settings (also using information from the `modm:build` module) to
1111
compile the modm library.
12-
- a top-level `SConstruct` file: configures additional, optional tools and sets
13-
up all the relevant SCons functions for your target.
12+
- a top-level BSD-licensed `SConstruct` file: configures additional, optional
13+
tools and sets up all the relevant SCons functions for your target.
1414

1515
The `SConscript` file is self contained and does not depend on anything outside of
1616
the `modm/` directory. This allows it to be combined with `SConscript` of other
@@ -20,12 +20,14 @@ In fact, if you look at your generated `SConstruct` file, you'll notice that
2020
it doesn't contain a lot of logic or specific data, it is only meant for calling
2121
the right SCons tool with the right arguments.
2222

23-
We do not intend to serve every possible use-case with this module.
24-
**If you need something special, write your own SConstruct file, maybe
25-
starting by modifying ours.**
23+
We do not intend to serve every possible use-case with this module. **If you
24+
need something special, write your own SConstruct file, maybe starting by
25+
modifying ours.** It is intentionally BSD-licensed so that you do not have to
26+
publish your changes to it.
27+
2628
Remember to set `modm:build:scons:include_sconstruct` to `False`, so that your
2729
custom `SConstruct` does not get overwritten by `lbuild build`.
28-
See the instructions inside our generated default `SConstruct`.
30+
See the instructions inside our generated default `SConstruct` file.
2931

3032

3133
## SCons Methods

tools/build_script_generator/scons/resources/SConstruct.in

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,25 @@
1-
# Copyright (c) 2017-2018, Niklas Hauser
1+
# Copyright (c) 2017-2021, Niklas Hauser
22
#
3-
# This file is part of the modm project.
3+
# Redistribution and use in source and binary forms, with or without
4+
# modification, are permitted provided that the following conditions are met:
45
#
5-
# This Source Code Form is subject to the terms of the Mozilla Public
6-
# License, v. 2.0. If a copy of the MPL was not distributed with this
7-
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
8-
9-
#!/usr/bin/env python3
6+
# 1. Redistributions of source code must retain the above copyright notice, this
7+
# list of conditions and the following disclaimer.
8+
#
9+
# 2. Redistributions in binary form must reproduce the above copyright notice,
10+
# this list of conditions and the following disclaimer in the documentation
11+
# and/or other materials provided with the distribution.
12+
#
13+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
14+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
17+
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19+
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
20+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
21+
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1023

1124
import os
1225
from os.path import join, abspath
@@ -36,15 +49,15 @@ sources = []
3649

3750
%% if has_image_source
3851
# Generating image sources
39-
env.Append(CPPPATH="{{ image_source }}")
52+
env.Append(CPPPATH=abspath("{{ image_source }}"))
4053
ignored.append("{{ image_source }}")
4154
for image in env.FindFiles("{{ image_source }}", ".pbm"):
4255
source, _ = env.Bitmap(str(image))
4356
sources.append(source)
4457
%% endif
4558
%% if has_xpcc_generator
4659
# Generating XPCC sources
47-
env.Append(CPPPATH="{{ generator_path }}")
60+
env.Append(CPPPATH=abspath("{{ generator_path }}"))
4861
ignored.append("{{ generator_path }}")
4962
sources += env.XpccCommunication(
5063
xmlfile=abspath("{{ generator_source }}"),

0 commit comments

Comments
 (0)