Miscellaneous cleanup (#261)

This commit is contained in:
Casey Rodarmor 2017-11-19 23:16:55 -08:00 committed by GitHub
parent 861173581c
commit def1bda9ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 41 additions and 40 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/target /target
/.vagrant /.vagrant
/README.html /README.html
/tmp

View File

@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased] ## [Unreleased]
- Do not evaluate backticks in assignments during dry runs (#253)
## [0.3.1] - 2017-10-06 ## [0.3.1] - 2017-10-06
### Added ### Added
- Started keeping a changelog in CHANGELOG.md - Started keeping a changelog in CHANGELOG.md (#220)
- Recipes whose names begin with an underscore will not appear in `--list` or `--summary` - Recipes whose names begin with an underscore will not appear in `--list` or `--summary` (#229)

34
FAQ.md
View File

@ -1,34 +0,0 @@
Frequently Asked Questions
==========================
### What are the idiosyncrasies of make that just avoids?
Make has some behaviors which are either confusing, complicated, or make it unsuitable for use as a general command runner.
One example is that sometimes make won't run the commands in a recipe. For example, if you have a file called `test` and the the following makefile that runs it:
```make
test:
./test
```
Make will actually refuse to run it:
```sh
$ make test
make: `test' is up to date.
```
Make see the recipe `test` and assumes that it produces a file called `test`. It then sees that this file exists and thus assumes that the recipe doesn't need to be run.
To be fair, this behavior is desirable when using make as a build system, but not when using it as a command runner.
Some other examples include having to understand the difference between `=` and `:=` assignment, the confusing error messages that can be produced if you mess up your makefile, having to use `$$` to write recipes that use environment variables, and incompatibilites between different flavors of make.
### What's the relationship between just and cargo build scripts?
[Cargo build scripts](http://doc.crates.io/build-script.html) have a pretty specific use, which is to control how cargo builds your rust project. This might include adding flags to `rustc` invocations, building an external dependency, or running some kind of codegen step.
`just`, on the other hand, is for all the other miscellaneous commands you might run as part of development. Things like running tests in different configurations, linting your code, pushing build artifacts to a server, removing temporary files, and the like.
Also, although `just` is written in rust, it can be used regardless of the language or build system your project uses.

View File

@ -515,6 +515,40 @@ $ just foo/build
$ just foo/ $ just foo/
``` ```
== Frequently Asked Questions
=== What are the idiosyncrasies of make that just avoids?
Make has some behaviors which are either confusing, complicated, or make it unsuitable for use as a general command runner.
One example is that sometimes make won't run the commands in a recipe. For example, if you have a file called `test` and the the following makefile that runs it:
```make
test:
./test
```
Make will actually refuse to run it:
```sh
$ make test
make: `test' is up to date.
```
Make sees the recipe `test` and assumes that it produces a file called `test`. It then sees that this file exists and thus assumes that the recipe doesn't need to be run.
To be fair, this behavior is desirable when using make as a build system, but not when using it as a command runner.
Some other examples include having to understand the difference between `=` and `:=` assignment, the confusing error messages that can be produced if you mess up your makefile, having to use `$$` to write recipes that use environment variables, and incompatibilites between different flavors of make.
=== What's the relationship between just and cargo build scripts?
http://doc.crates.io/build-script.html[Cargo build scripts] have a pretty specific use, which is to control how cargo builds your rust project. This might include adding flags to `rustc` invocations, building an external dependency, or running some kind of codegen step.
`just`, on the other hand, is for all the other miscellaneous commands you might run as part of development. Things like running tests in different configurations, linting your code, pushing build artifacts to a server, removing temporary files, and the like.
Also, although `just` is written in rust, it can be used regardless of the language or build system your project uses.
== Miscellanea == Miscellanea
=== Shell Alias === Shell Alias

View File

@ -90,12 +90,14 @@ test-quine:
# make a quine, compile it, and verify it # make a quine, compile it, and verify it
quine: quine:
mkdir -p tmp
@echo '{{quine-text}}' > tmp/gen0.c @echo '{{quine-text}}' > tmp/gen0.c
cc tmp/gen0.c -o tmp/gen0 cc tmp/gen0.c -o tmp/gen0
./tmp/gen0 > tmp/gen1.c ./tmp/gen0 > tmp/gen1.c
cc tmp/gen1.c -o tmp/gen1 cc tmp/gen1.c -o tmp/gen1
./tmp/gen1 > tmp/gen2.c ./tmp/gen1 > tmp/gen2.c
diff tmp/gen1.c tmp/gen2.c diff tmp/gen1.c tmp/gen2.c
rm -r tmp
@echo 'It was a quine!' @echo 'It was a quine!'
quine-text = ' quine-text = '

2
notes
View File

@ -1,2 +0,0 @@
todo
====

2
tmp/.gitignore vendored
View File

@ -1,2 +0,0 @@
*
!.gitignore