mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Don't build empty project // Resolve #483
This commit is contained in:
@ -83,12 +83,18 @@ def BuildProgram(env):
|
|||||||
LIBPATH=["$BUILD_DIR"]
|
LIBPATH=["$BUILD_DIR"]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
sources = env.LookupSources(
|
||||||
|
"$BUILDSRC_DIR", "$PROJECTSRC_DIR", duplicate=False,
|
||||||
|
src_filter=getenv("PLATFORMIO_SRC_FILTER", env.get("SRC_FILTER")))
|
||||||
|
|
||||||
|
if not sources:
|
||||||
|
env.Exit(
|
||||||
|
"Error: Nothing to build. Please put your source code files "
|
||||||
|
"to '%s' folder" % env.subst("$PROJECTSRC_DIR"))
|
||||||
|
|
||||||
return env.Program(
|
return env.Program(
|
||||||
join("$BUILD_DIR", env.subst("$PROGNAME")),
|
join("$BUILD_DIR", env.subst("$PROGNAME")),
|
||||||
env.LookupSources(
|
sources
|
||||||
"$BUILDSRC_DIR", "$PROJECTSRC_DIR", duplicate=False,
|
|
||||||
src_filter=getenv("PLATFORMIO_SRC_FILTER",
|
|
||||||
env.get("SRC_FILTER")))
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user