Skip to content

Commit

Permalink
Fix #include path issue
Browse files Browse the repository at this point in the history
MacOS uses case-insensitive filenames and warns about conflict between "jerryscript.h" and "Jerryscript.h"

Refactor to isolate jerryscript paths which aren't required by applications
  • Loading branch information
mikee47 committed Jun 16, 2024
1 parent 6b0b07a commit 756874a
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 16 deletions.
3 changes: 3 additions & 0 deletions component.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ COMPONENT_SRCDIRS := \

COMPONENT_INCDIRS := \
src/include \
$(JERRYSCRIPT_ROOT)

EXTRA_INCDIR := \
$(JERRYSCRIPT_ROOT)/jerry-core \
$(JERRYSCRIPT_SRCDIRS)

Expand Down
1 change: 0 additions & 1 deletion src/Context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
*/

#include "include/Jerryscript/Context.h"
#include <jerryscript.h>

namespace Jerryscript
{
Expand Down
1 change: 0 additions & 1 deletion src/Debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
*/

#include "include/Jerryscript/Debug.h"
#include <jerryscript.h>
#include <debug_progmem.h>

namespace Jerryscript
Expand Down
2 changes: 1 addition & 1 deletion src/Types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <debug_progmem.h>

extern "C" {
#include <ecma/base/ecma-helpers.h>
#include <jerry-core/ecma/base/ecma-helpers.h>
}

// Check Ecma values are correct
Expand Down
8 changes: 0 additions & 8 deletions src/include/Jerryscript.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
#pragma once

#ifdef __cplusplus

#include "Jerryscript/Task.h"
#include "Jerryscript/Debug.h"
#include "Jerryscript/Function.h"
#include "Jerryscript/Except.h"
#include "Jerryscript/Context.h"

#else

#include_next <jerryscript.h>

#endif
2 changes: 1 addition & 1 deletion src/include/Jerryscript/Debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#pragma once

#include <include/jerryscript.h>
#include <jerry-core/include/jerryscript.h>

namespace Jerryscript
{
Expand Down
2 changes: 1 addition & 1 deletion src/include/Jerryscript/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#pragma once

#include <include/jerryscript.h>
#include <jerry-core/include/jerryscript.h>
#include ".typemaps.h"
#include <WString.h>
#include <WVector.h>
Expand Down
4 changes: 2 additions & 2 deletions src/jerry-port.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

#include "include/Jerryscript/Except.h"
#include "include/Jerryscript/Context.h"
#include <include/jerryscript-port.h>
#include <include/jerryscript-core.h>
#include <jerry-core/include/jerryscript-port.h>
#include <jerry-core/include/jerryscript-core.h>
#include "include/jerry_port_vm.h"
#include <debug_progmem.h>
#include <Platform/RTC.h>
Expand Down
1 change: 0 additions & 1 deletion test/modules/types.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include <JerryTest.h>
#include <jcontext.h>

namespace
{
Expand Down

0 comments on commit 756874a

Please sign in to comment.