muon-build / muon

An implementation of the meson build system in c99
https://muon.build
GNU General Public License v3.0
166 stars 14 forks source link

How to build code using the built-in samu? #44

Closed ghost closed 5 months ago

ghost commented 5 months ago

I always use a standalone ninja up to now. I found that samu is embedded into the muon executable itself. But the equivalent command to meson, muon compile -C build, doesn't work (see: #43). Since there is no standalone samu executable and there is also no way to start the build via muon itself, how could I use the built-in samu?

Update: Maybe the syntax is muon -C build [something] based on the commands on Stage 2? But how to know what this [something] is? Take this project for example: https://github.com/franko/fox. I have tried everything I could think of but it always said err invalid command [something]!

ma8ma commented 5 months ago

Hi @iahunq2

Try muon samu -C build instead of muon compile -C build.

ghost commented 5 months ago

Hi @iahunq2

Try muon samu -C build instead of muon compile -C build.

Take this project for example: https://github.com/franko/fox

According to you, the command will be muon [something] -C build. But how to know what this [something] is?

Update: Ah, I get it. samu is an applet of muon. It's like busybox. So to invoke samu one has to use the command muon samu. Btw, I'm stuck with #45. Thank you anyway.

ma8ma commented 5 months ago

command line option -h shows feature list.

for example,

$ ./muon -h
usage: ./muon [opts] [command]
opts:
  -v - turn on debug messages
  -C <path> - chdir to path
  -h - show this message
commands:
  analyze     - run a static analyzer on the current project.
  benchmark   - run benchmarks
  check       - check if a meson file parses
  fmt         - format meson source file
  install     - install project
  internal    - internal subcommands
  meson       - meson compatible cli proxy
  options     - list project options
  samu        - run samurai
  setup       - setup a build directory
  subprojects - manage subprojects
  summary     - print a configured project's summary
  test        - run tests
  version     - print version information