-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Relying on external dependencies to build such a small project as pick has always been troublesome to me. Instead, replace auto{conf,make} with a shell-script and plain Makefile(s).
- Loading branch information
Showing
21 changed files
with
463 additions
and
281 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,3 @@ | ||
*.o | ||
core* | ||
pick | ||
vgcore* | ||
|
||
# Generated by Autotools | ||
.deps | ||
INSTALL.md | ||
Makefile | ||
Makefile.in | ||
aclocal.m4 | ||
autom4te.cache/ | ||
compile | ||
config.guess | ||
Makefile.inc | ||
config.h | ||
config.log | ||
config.status | ||
config.sub | ||
configure | ||
depcomp | ||
install-sh | ||
missing | ||
stamp-h1 | ||
.dirstamp | ||
test-driver | ||
test-suite.log | ||
tests/pick-test | ||
tests/*.log | ||
tests/*.trs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,9 +11,8 @@ you agree to abide by its [Code of Conduct][conduct]. | |
2. Build and make sure all tests pass: | ||
|
||
```sh | ||
$ ./autogen.sh | ||
$ ./configure | ||
$ make check | ||
$ make test | ||
``` | ||
|
||
3. Make your changes. | ||
|
@@ -56,45 +55,31 @@ Internal documentation on crafting a release. | |
2. Update `CHANGELOG.md` and commit the change: | ||
```sh | ||
$ git commit -m 'Update CHANGELOG' | ||
$ git commit -m 'update changelog' | ||
``` | ||
3. Update the version in `configure.ac`: | ||
``` | ||
AC_INIT([pick], [0.0.2], [[email protected]]) | ||
``` | ||
... and commit the change: | ||
3. Update the version in `Makefile` and commit the change: | ||
```sh | ||
$ git commit -m 'Update version to 0.0.2' | ||
$ git commit -m 'update version to 0.0.2' | ||
``` | ||
4. Create and verify the tarball: | ||
```sh | ||
$ make distcheck | ||
$ tar tvzf pick-0.0.2.tar.gz | ||
``` | ||
5. Create and verify checksum: | ||
```sh | ||
$ sha256 pick-0.0.2.tar.gz >pick-0.0.2.sha256 | ||
$ sha256 -c pick-0.0.2.sha256 | ||
$ make dist | ||
``` | ||
6. Tag and push: | ||
5. Tag and push: | ||
```sh | ||
$ git tag v0.0.2 | ||
$ git push --tags origin master | ||
``` | ||
7. [Announce the release on GitHub][announce]. | ||
6. [Announce the release on GitHub][announce]. | ||
8. Contact package maintainers: | ||
7. Contact package maintainers: | ||
* Aggelos Avgerinos <[email protected]> (Debian & Ubuntu) | ||
* Chunyang Xu <[email protected]> (MacPorts) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.CURDIR= ${CURDIR} | ||
.OBJDIR= ${CURDIR} | ||
|
||
include ${.CURDIR}/Makefile |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
include ${.CURDIR}/Makefile.inc | ||
|
||
VERSION= 2.0.2 | ||
|
||
PROG= pick | ||
|
||
SRCS+= compat-pledge.c | ||
SRCS+= compat-reallocarray.c | ||
SRCS+= compat-strtonum.c | ||
SRCS+= pick.c | ||
|
||
OBJS= ${SRCS:.c=.o} | ||
DEPS= ${SRCS:.c=.d} | ||
|
||
CFLAGS+= ${DEBUG} | ||
CFLAGS+= -DVERSION=\"${VERSION}\" | ||
|
||
DISTFILES+= CHANGELOG.md | ||
DISTFILES+= CODE_OF_CONDUCT.md | ||
DISTFILES+= CONTRIBUTING.md | ||
DISTFILES+= GNUmakefile | ||
DISTFILES+= LICENSE | ||
DISTFILES+= Makefile | ||
DISTFILES+= README.md | ||
DISTFILES+= compat-pledge.c | ||
DISTFILES+= compat-reallocarray.c | ||
DISTFILES+= compat-strtonum.c | ||
DISTFILES+= configure | ||
DISTFILES+= pick.1 | ||
DISTFILES+= pick.c | ||
DISTFILES+= tests/GNUmakefile | ||
DISTFILES+= tests/Makefile | ||
DISTFILES+= tests/README.md | ||
DISTFILES+= tests/key-alt-enter.t | ||
DISTFILES+= tests/key-backspace.t | ||
DISTFILES+= tests/key-ctrl-a.t | ||
DISTFILES+= tests/key-ctrl-c.t | ||
DISTFILES+= tests/key-ctrl-e.t | ||
DISTFILES+= tests/key-ctrl-k.t | ||
DISTFILES+= tests/key-ctrl-l.t | ||
DISTFILES+= tests/key-ctrl-o.t | ||
DISTFILES+= tests/key-ctrl-u.t | ||
DISTFILES+= tests/key-ctrl-w.t | ||
DISTFILES+= tests/key-del.t | ||
DISTFILES+= tests/key-end.t | ||
DISTFILES+= tests/key-enter.t | ||
DISTFILES+= tests/key-home.t | ||
DISTFILES+= tests/key-left.t | ||
DISTFILES+= tests/key-line-down.t | ||
DISTFILES+= tests/key-line-up.t | ||
DISTFILES+= tests/key-page-down.t | ||
DISTFILES+= tests/key-page-up.t | ||
DISTFILES+= tests/key-printable.t | ||
DISTFILES+= tests/key-right.t | ||
DISTFILES+= tests/key-unknown.t | ||
DISTFILES+= tests/misc-match.t | ||
DISTFILES+= tests/misc-realloc.t | ||
DISTFILES+= tests/opt-d.t | ||
DISTFILES+= tests/opt-h.t | ||
DISTFILES+= tests/opt-k.t | ||
DISTFILES+= tests/opt-o.t | ||
DISTFILES+= tests/opt-q.t | ||
DISTFILES+= tests/opt-s.t | ||
DISTFILES+= tests/opt-unknown.t | ||
DISTFILES+= tests/opt-v.t | ||
DISTFILES+= tests/opt-x.t | ||
DISTFILES+= tests/pick-test.c | ||
DISTFILES+= tests/pick-test.sh | ||
|
||
PREFIX= /usr/local | ||
|
||
all: ${PROG} | ||
|
||
${PROG}: ${OBJS} | ||
${CC} ${DEBUG} -o ${PROG} ${OBJS} ${LDFLAGS} | ||
|
||
clean: | ||
rm -f ${DEPS} ${OBJS} ${PROG} | ||
.PHONY: clean | ||
|
||
dist: | ||
set -e; \ | ||
d=${PROG}-${VERSION}; \ | ||
mkdir $$d; \ | ||
for f in ${DISTFILES}; do \ | ||
mkdir -p $$d/`dirname $$f`; \ | ||
cp ${.CURDIR}/$$f $$d/$$f; \ | ||
done; \ | ||
tar czvf ${.CURDIR}/$$d.tar.gz $$d; \ | ||
(cd ${.CURDIR}; sha256 $$d.tar.gz >$$d.sha256); \ | ||
rm -r $$d | ||
.PHONY: dist | ||
|
||
distclean: clean | ||
rm -f ${.CURDIR}/Makefile.inc ${.CURDIR}/config.h \ | ||
${.CURDIR}/config.log ${.CURDIR}/${PROG}-${VERSION}.tar.gz \ | ||
${.CURDIR}/${PROG}-${VERSION}.sha256 | ||
.PHONY: distclean | ||
|
||
install: ${PROG} | ||
@mkdir -p ${DESTDIR}${PREFIX}/bin | ||
${INSTALL} ${PROG} ${DESTDIR}${PREFIX}/bin | ||
@mkdir -p ${DESTDIR}${PREFIX}/man/man1 | ||
${INSTALL} ${.CURDIR}/pick.1 ${DESTDIR}${PREFIX}/man/man1 | ||
.PHONY: install | ||
|
||
test: ${PROG} | ||
${MAKE} -C ${.CURDIR}/tests \ | ||
"MALLOC_OPTIONS=${MALLOC_OPTIONS}" "PICK=${.OBJDIR}/${PROG}" | ||
.PHONY: test | ||
|
||
-include ${DEPS} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include "config.h" | ||
|
||
int unused; | ||
|
||
#ifndef HAVE_PLEDGE | ||
|
||
int | ||
pledge(const char *promises __attribute__((__unused__)), | ||
const char *execpromises __attribute__((__unused__))) | ||
{ | ||
return 0; | ||
} | ||
|
||
#endif /* !HAVE_PLEDGE */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
#ifdef HAVE_CONFIG_H | ||
#include "config.h" | ||
#endif | ||
|
||
int unused; | ||
|
||
|
Oops, something went wrong.