From 47c47168e82f74659a40ed01d1d82d1a7c6d7164 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 14 Jun 2014 22:12:32 +0300 Subject: [PATCH] Renamed project's "libs" directory to "lib" --- README.rst | 10 +++++----- platformio/builder/main.py | 6 +++++- platformio/commands/init.py | 4 ++-- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/README.rst b/README.rst index 51bc3040..3de52230 100644 --- a/README.rst +++ b/README.rst @@ -35,9 +35,9 @@ instruments. **Platformio** is well suited for **embedded development**. It can: -* Automatic dependency analysis -* Reliable detection of build changes -* Compile framework or library sources to static libraries +* Automatically analyse dependency +* Reliably detect of build changes +* Build framework or library source code to static library * Build *ELF* (executable and linkable firmware) * Convert *ELF* to *HEX* or *BIN* file * Extract *EEPROM* data @@ -287,14 +287,14 @@ Initialize new platformio based project. # Example $ platformio init Project successfully initialized. - Please put your source code to `src` directory, external libraries to `libs` + Please put your source code to `src` directory, external libraries to `lib` and setup environments in `platformio.ini` file. Then process project with `platformio run` command. After this command ``platformio`` will create: * ``.pioenvs`` - a temporary working directory. -* ``libs`` - a directory for project specific libraries. Platformio will +* ``lib`` - a directory for project specific libraries. Platformio will compile their to static libraries and link to executable file * ``src`` - a source directory. Put code here. * ``platformio.ini`` - a configuration file for project diff --git a/platformio/builder/main.py b/platformio/builder/main.py index 54ab2722..47e15941 100644 --- a/platformio/builder/main.py +++ b/platformio/builder/main.py @@ -41,7 +41,11 @@ DefaultEnvironment( PLATFORMFW_DIR=join("$PLATFORM_DIR", "frameworks", "$FRAMEWORK"), PLATFORMTOOLS_DIR=join("$PLATFORM_DIR", "tools"), - BUILD_DIR=join("$PROJECT_DIR", ".pioenvs", "$PIOENV") + BUILD_DIR=join("$PROJECT_DIR", ".pioenvs", "$PIOENV"), + LIBSOURCE_DIRS=[ + join("$PROJECT_DIR", "lib"), + join("$PLATFORMFW_DIR", "libraries"), + ] ) env = DefaultEnvironment() diff --git a/platformio/commands/init.py b/platformio/commands/init.py index 10e3670a..b1dd14bd 100644 --- a/platformio/commands/init.py +++ b/platformio/commands/init.py @@ -16,7 +16,7 @@ def cli(): if isfile("platformio.ini") and isdir("src"): raise ProjectInitialized() - for d in (".pioenvs", "libs", "src"): + for d in (".pioenvs", "lib", "src"): if not isdir(d): makedirs(d) if not isfile("platformio.ini"): @@ -24,7 +24,7 @@ def cli(): "platformio.ini") secho("Project successfully initialized.\n" "Please put your source code to `src` directory, " - "external libraries to `libs` and " + "external libraries to `lib` and " "setup environments in `platformio.ini` file.\n" "Then process project with `platformio run` command.", fg="green")