Usage: xmake macro|m [options] [name] [arguments] Run the given macro. Options: --backtrace Print backtrace information for debugging. --version Print the version number and exit. -h, --help Print this help message and exit. -F FILE, --file=FILE Read a given xmake.lua file. -P PROJECT, --project=PROJECT Change to the given project directory. Search priority: 1. The Given Command Argument 2. The Envirnoment Variable: XMAKE_PROJECT_DIR 3. The Current Directory -v, --verbose Print lots of verbose information. -b, --begin Start to record macro. .e.g Record macro with name: test xmake macro --begin xmake config --plat=macosx xmake clean xmake -r xmake package xmake macro --end test -e, --end Stop to record macro. --show Show the content of the given macro. -l, --list List all macros. -d, --delete Delete the given macro. -c, --clear Clear the all macros. --import=IMPORT Import the given macro file or directory. .e.g xmake macro --import=/xxx/macro.lua test xmake macro --import=/xxx/macrodir --export=EXPORT Export the given macro to file or directory. .e.g xmake macro --export=/xxx/macro.lua test xmake macro --export=/xxx/macrodir name Set the macro name. (default: .) .e.g Run the given macro: xmake macro test Run the anonymous macro: xmake macro . arguments ... Set the macro arguments.
-
Manually record and play back multiple executed xmake commands -
Support fast anonymous macro creation and playback -
Support long-term recording and reuse of named macros -
Support the batch import and export of macro scripts -
Support macro script deletion, display and other management functions -
Support user-defined advanced macro script and parameter configuration
xmake f -p android --ndk=/xxx/ndk -a armv7-a xmake p xmake f -p mingw --sdk=/mingwsdk xmake p xmake f -p linux --sdk=/toolsdk --toolchains=/xxxx/bin xmake p xmake f -p iphoneos -a armv7 xmake p xmake f -p iphoneos -a arm64 xmake p xmake f -p iphoneos -a armv7s xmake p xmake f -p iphoneos -a i386 xmake p xmake f -p iphoneos -a x86_64 xmake p
#Start recording macros xmake macro --begin #Execute some xmake commands xmake f -p android --ndk=/xxx/ndk -a armv7-a xmake p xmake f -p mingw --sdk=/mingwsdk xmake p xmake f -p linux --sdk=/toolsdk --toolchains=/xxxx/bin xmake p xmake f -p iphoneos -a armv7 xmake p xmake f -p iphoneos -a arm64 xmake p xmake f -p iphoneos -a armv7s xmake p xmake f -p iphoneos -a i386 xmake p xmake f -p iphoneos -a x86_64 xmake p #End macro recording. The macro name is not set here, so it is an anonymous macro xmake macro --end
#Last Anonymous Macro Recorded Previously xmake macro .
--End recording and name it as test macro xmake macro --end test --Play back the test macro xmake macro test
function main() os.exec("xmake f -p android --ndk=/xxx/ndk -a armv7-a") os.exec("xmake p") os.exec("xmake f -p mingw --sdk=/mingwsdk") os.exec("xmake p") os.exec("xmake f -p linux --sdk=/toolsdk --toolchains=/xxxx/bin") os.exec("xmake p") os.exec("xmake f -p iphoneos -a armv7") os.exec("xmake p") os.exec("xmake f -p iphoneos -a arm64") os.exec("xmake p") os.exec("xmake f -p iphoneos -a armv7s") os.exec("xmake p") os.exec("xmake f -p iphoneos -a i386") os.exec("xmake p") os.exec("xmake f -p iphoneos -a x86_64") os.exec("xmake p") end