Skip to content

Commit

Permalink
[tools] use project's dir basename as default project name
Browse files Browse the repository at this point in the history
  • Loading branch information
judecumt committed Nov 6, 2024
1 parent 0468686 commit b7868fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/action_tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
if: ${{ success() }}
run: |
echo "Test to dist project"
scons --dist -C $TEST_BSP_ROOT
scons --dist --project-name=project -C $TEST_BSP_ROOT
scons --dist-ide -C $TEST_BSP_ROOT
ls $TEST_BSP_ROOT
ls $TEST_BSP_ROOT/dist
Expand Down
5 changes: 3 additions & 2 deletions tools/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@
# 2022-04-20 WuGensheng Add Options to SCons
#

from SCons.Script import AddOption
from SCons.Script import AddOption, Dir
import platform
import os

def AddOptions():
''' ===== Add generic options to SCons ===== '''
Expand All @@ -45,7 +46,7 @@ def AddOptions():
AddOption('--project-name',
dest = 'project-name',
type = 'string',
default = "project",
default = os.path.basename(Dir('#').abspath),
help = 'set project name')
AddOption('--cscope',
dest = 'cscope',
Expand Down

0 comments on commit b7868fe

Please sign in to comment.