Skip to content

Commit

Permalink
Make Extended Macros default on all branches.
Browse files Browse the repository at this point in the history
  • Loading branch information
kareltucek committed Aug 21, 2021
1 parent d06b654 commit 8d1e0c7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
9 changes: 3 additions & 6 deletions right/src/macros.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,6 @@ static bool dispatchText(const char* text, uint16_t textLen)

static bool processTextAction(void)
{
#ifdef EXTENDED_MACROS
if (s->ms.currentMacroAction.text.text[0] == '$') {
bool actionInProgress = processCommandAction();
s->as.currentConditionPassed = actionInProgress;
Expand All @@ -611,7 +610,6 @@ static bool processTextAction(void)
} else if (s->ms.currentMacroAction.text.text[0] == '/' && s->ms.currentMacroAction.text.text[1] == '/') {
return false;
}
#endif

return dispatchText(s->ms.currentMacroAction.text.text, s->ms.currentMacroAction.text.textLen);
}
Expand Down Expand Up @@ -2370,6 +2368,8 @@ static bool processCommand(const char* cmd, const char* cmdEnd)
return false;
}

//TODO: removethis
/*
static bool processStockCommandAction(const char* cmd, const char* cmdEnd)
{
const char* cmdTokEnd = TokEnd(cmd, cmdEnd);
Expand Down Expand Up @@ -2416,6 +2416,7 @@ static bool processStockCommandAction(const char* cmd, const char* cmdEnd)
}
return false;
}
*/


static bool processCommandAction(void)
Expand All @@ -2432,11 +2433,7 @@ static bool processCommandAction(void)
return false;
}

#ifdef EXTENDED_MACROS
return processCommand(cmd, cmdEnd);
#else
return processStockCommandAction(cmd, cmdEnd);
#endif
}

static bool processCurrentMacroAction(void)
Expand Down
3 changes: 1 addition & 2 deletions scripts/Makedefs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ CFLAGS = -mthumb \
-Wrestrict \
-Wnull-dereference \
-Wshadow \
$(BUILD_FLAGS) \
$(CUSTOM_CFLAGS)
$(BUILD_FLAGS)

# Compiler options for C++ only.
CXXFLAGS = -felide-constructors -fno-exceptions -fno-rtti
Expand Down
10 changes: 2 additions & 8 deletions scripts/make-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,8 @@ const package = JSON.parse(fs.readFileSync(`${__dirname}/package.json`));
const version = package.firmwareVersion;
const releaseName = `uhk-firmware-${version}`;
const releaseDir = `${__dirname}/${releaseName}`;
const releaseFile = `${__dirname}/${releaseName}.tar.gz`;
const agentDir = `${__dirname}/../lib/agent`;
var releaseFile = `${__dirname}/${releaseName}.tar.gz`;
var mkArgs = '';

if( process.argv.includes('--extendedMacros')) {
mkArgs = mkArgs + 'CUSTOM_CFLAGS=-DEXTENDED_MACROS'
releaseFile = `${__dirname}/${releaseName}-extendedMacros.tar.gz`;
}

const deviceSourceFirmwares = package.devices.map(device => `${__dirname}/../${device.source}`);
const moduleSourceFirmwares = package.modules.map(module => `${__dirname}/../${module.source}`);
Expand All @@ -32,7 +26,7 @@ const sourcePaths = [
for (sourcePath of sourcePaths) {
const buildDir = path.dirname(`${__dirname}/../${sourcePath}`);
mkdir('-p', buildDir);
exec(`cd ${buildDir}/..; make clean; make -j8 ${mkArgs}`);
exec(`cd ${buildDir}/..; make clean; make -j8`);
}

exec(`npm ci; npm run build`, { cwd: agentDir });
Expand Down

0 comments on commit 8d1e0c7

Please sign in to comment.