Skip to content

Commit

Permalink
Setup basic variables for makelx.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
mesheets committed Jul 13, 2024
1 parent 4fecb92 commit d3428ec
Showing 1 changed file with 23 additions and 6 deletions.
29 changes: 23 additions & 6 deletions util/user/makelx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,32 @@
### bibo - another LEGO Mindstorms OS
### --------------------------------------------------------------------------

# Constants
MAKE_PROGRAM=make

# Variable Initialization
SCRIPT_NAME=$(basename $0)
MAIN_PROGRAM_SOURCE=$1
PROGRAM_NAME=$(basename ${1%.*})
shift
ADDITIONAL_SOURCES=$*

# Usage information
echo "Makes an LX program file from source"
echo "Usage: $(basename $0) <main source file> [additional source files]..."
echo "Usage: $SCRIPT_NAME <main source file> [additional source files]..."

echo ""
echo "(Placeholder only - functionality not yet implemented)"
echo "Main program source file: '$MAIN_PROGRAM_SOURCE'"

echo "Additional source files for $PROGRAM_NAME:"
echo " - $ADDITIONAL_SOURCES"

MAKE_COMMAND="${MAKE_PROGRAM} SOURCES='${MAIN_PROGRAM_SOURCE}' ${PROGRAM_NAME}_SRC='${ADDITIONAL_SOURCES}'"

echo ""
echo "Main source file: '$1'"
echo "Additional source files for $(basename ${1%.*}):"
shift
echo " - $*"
echo "Command to execute: ${MAKE_COMMAND}"
echo "(Placeholder only - functionality not yet implemented)"

echo ""
echo "NOTE: make cannot handle spaces in file names"
echo " - https://savannah.gnu.org/bugs/?712"

0 comments on commit d3428ec

Please sign in to comment.