makeEspArduino icon indicating copy to clipboard operation
makeEspArduino copied to clipboard

Duplicate SKETCH when including on working directory

Open maximweb opened this issue 3 years ago • 0 comments

It may be more of a cosmetic thing, but I noticed that my main script gets processed twice (Duplicate warning) as soon as i include a config.h file from base folder.

My minimal test example

Makefile:

SKETCH=app.cpp
include ./libs/makeEspArduino/makeEspArduino.mk

app.cpp in basefolder:

#include "config.h"     // if I remove this, the duplicate warning disappears
#include <Arduino.h>

void setup() {}

void loop() {}

config.h in basefolder:

#define VERSION_STRING "2034"

Output (excerpt)

* Duplicate:
    <redacted>/example/app.cpp
  copied to:
    $(BUILD_DIR)/1_app.cpp
* Duplicate:
    app.cpp
  copied to:
    $(BUILD_DIR)/2_app.cpp

After moving config.h to a subfolder, duplication warning disappears

Question

While it does not affect my build, I was still wondering if this is normal/expected behavior, and if it's possible to avoid duplicate processing of my main script while keeping the file structure identical?

maximweb avatar Nov 27 '22 14:11 maximweb