diff options
| author | Selene ToyKeeper | 2023-11-07 15:01:31 -0700 |
|---|---|---|
| committer | Selene ToyKeeper | 2023-11-07 15:01:31 -0700 |
| commit | b0def630e3489f0e2a78dd27a1c0bb4b77663c6e (patch) | |
| tree | eb252347f9003b0a79d89350cb251566ee845c8f | |
| parent | oops, missed a venv name change in the readme (diff) | |
| download | anduril-b0def630e3489f0e2a78dd27a1c0bb4b77663c6e.tar.gz anduril-b0def630e3489f0e2a78dd27a1c0bb4b77663c6e.tar.bz2 anduril-b0def630e3489f0e2a78dd27a1c0bb4b77663c6e.zip | |
added a Makefile, so either `make` or `./make` can be used for most tasks
`make` doesn't always work, like when the user tries to do certain types
of CLI args, but it's handy to have as a convenience sometimes.
What works:
- make
- make clean
- make hank boost
- make me a sandwich
What doesn't work:
- make foo --bar
- make foo BAR=1
The `make` program eats some types of arguments.
Diffstat (limited to '')
| -rw-r--r-- | Makefile | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2f3aaed --- /dev/null +++ b/Makefile @@ -0,0 +1,28 @@ +# Tiny Makefile to simply "exec ./make $*" +# Copyright (C) 2023 Selene ToyKeeper +# SPDX-License-Identifier: GPL-3.0-or-later + +# Note: Does not pass args in the form "-a", "--arg", or "VAR=value" +# because 'make' does not put those into $MAKECMDGOALS +# but this is still helpful in case the user forgets the './' before 'make' + +# for 'make foo bar baz', don't run 3 times +# (generate no-op rules for args 2+) +ARGS := $(wordlist 2, $(words $(MAKECMDGOALS)), $(MAKECMDGOALS)) +$(eval $(ARGS):;@:) + +# handle the case with no args +all: + @./make + +# catch everything else and parse the command line ourselves +.PHONY: % +%: + @./make $(MAKECMDGOALS) + +# handle targets with the same name as a dir, +# because 'make' skips those otherwise +.PHONY: docs +docs: + @./make docs + |
