make packaging simexec(1) easier
This commit is contained in:
parent
a256b92ce8
commit
65fb6c194e
40
simexec/packaging.md
Normal file
40
simexec/packaging.md
Normal file
@ -0,0 +1,40 @@
|
||||
# Packaging simexec.c
|
||||
|
||||
## License
|
||||
|
||||
Simexec is Public Domain so there are basically no barriers when it comes to
|
||||
licensing. And if you somehow violate my already-forfeited copyright, I promise
|
||||
I won't sue you.
|
||||
|
||||
## Files
|
||||
|
||||
Simexec is a single C file (`simexec.c`) that builds to a single executable,
|
||||
which should be named `simexec` and placed in a user-accessible binaries
|
||||
directory. A `Makefile` is provided as courtesy but isn't really necessary.
|
||||
|
||||
The `src/simexec` directory can be moved to a system sources directory if you
|
||||
wish to keep the source on hand; it doesn't reference anything else in the
|
||||
repository.
|
||||
|
||||
The included manual page, `simexec.1` can be placed in the appropriate manual
|
||||
pages directory. If it displays weirdly feel free to e-mail me and I'll attempt
|
||||
to fix it.
|
||||
|
||||
## Compilation
|
||||
|
||||
On systems that provide `<sysexits.h>`, the following is all that's needed:
|
||||
|
||||
```
|
||||
cc -o simexec simexec.c
|
||||
```
|
||||
|
||||
If you're not sure whether your system provides `<sysexits.h>`, try it and see.
|
||||
If it doesn't work, compile `simexec.c` with the following:
|
||||
|
||||
```
|
||||
cc -DEX_USAGE=1 -o simexec simexec.c
|
||||
```
|
||||
|
||||
Other than `<sysexits.h>` simexec(1) only relies on headers found in the C
|
||||
standard library. Outside of POSIX environments `simexec.c` probably won't work
|
||||
but it wouldn't be of much use anyway.
|
@ -1,7 +1,10 @@
|
||||
#include <stdio.h> /* fprintf(3), NULL */
|
||||
#include <sysexits.h> /* EX_USAGE */
|
||||
#include <unistd.h> /* execv(3), */
|
||||
|
||||
#if !defined EX_USAGE
|
||||
# include <sysexits.h> /* EX_USAGE */
|
||||
#endif
|
||||
|
||||
static char *program_name = "simexec";
|
||||
|
||||
int main(int argc, char *argv[]){
|
||||
|
Loading…
Reference in New Issue
Block a user