diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 41 |
1 files changed, 17 insertions, 24 deletions
@@ -3,8 +3,7 @@ DATE = 1970-01-01 VERSION = 0.1.0 NAME = papo NAME_UC = $(NAME) -URL = papo.im -MAILING_LIST = list@$(URL) +MAILING_LIST = public-inbox LANGUAGES = ## Installation prefix. Defaults to "/usr". PREFIX = /usr @@ -38,25 +37,22 @@ DESTDIR = all: include deps.mk -manpages = $(manpages.in:.in=) - sources = \ + src/$(NAME).go \ + src/cmd/$(NAME).go \ $(sources.static) \ $(sources.sql) \ - src/papo.go \ - src/cmd/papo.go \ derived-assets = \ - $(manpages) \ $(NAME).bin \ - tests/papo_test.bin \ + tests/$(NAME)_test.bin \ side-assets = \ - papo.pipe \ - papo.socket \ - lighttpd.socket \ + papo.public.socket \ + papo.command.socket \ wscat.socket \ + glaze.socket \ @@ -65,24 +61,22 @@ side-assets = \ all: $(derived-assets) -$(NAME).bin: src/papo.go src/cmd/papo.go - CGO_ENABLED=0 go build -o $@ -v \ - -ldflags='-s -w -extldflags "-static"' src/cmd/papo.go +$(NAME).bin: src/$(NAME).go src/cmd/$(NAME).go Makefile + go build -o $@ -v src/cmd/$(NAME).go -tests/papo_test.bin: src/papo.go tests/papo_test.go - CGO_ENABLED=0 go test -c -o $@ -v \ - -ldflags='-s -w -extldflags "-static"' tests/papo_test.go +tests/$(NAME)_test.bin: src/$(NAME).go tests/$(NAME)_test.go Makefile + go test -c -o $@ -v tests/$(NAME)_test.go -check-unit: tests/papo_test.bin - ./tests/papo_test.bin +check-unit: tests/$(NAME)_test.bin + ./tests/$(NAME)_test.bin integration-tests = \ - tests/cli-opts.sh \ + tests/cli-opts.sh \ -$(integration-tests): ALWAYS +$(integration-tests): $(NAME).bin ALWAYS sh $@ check-integration: $(integration-tests) @@ -116,7 +110,6 @@ install: all mkdir -p "$$dir"; \ cp -P "$$f" "$$dir"; \ done - doctool -ip '$(DESTDIR)$(MANDIR)' $(manpages) ## Uninstalls from $(DESTDIR)$(PREFIX). This is a perfect mirror ## of the "install" target, and removes *all* that was installed. @@ -124,8 +117,8 @@ install: all uninstall: rm -rf \ '$(DESTDIR)$(BINDIR)'/$(NAME) \ + '$(DESTDIR)$(LIBDDIR)' \ '$(DESTDIR)$(SRCDIR)' - doctool -up '$(DESTDIR)$(MANDIR)' $(manpages) run-papo: all @@ -146,7 +139,7 @@ run-binder-web: run-binder-ircd: binder localhost:6667 papo.public.socket -## Run papo locally and its helper programs. +## Run it locally, alongside its helper programs. run: all for c in wscat papo binder-web binder-ircd glaze; do \ $(MAKE) run-$$c & \ |
