summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--Makefile1
-rw-r--r--build-aux/Makefile.head.mk2
-rw-r--r--build-aux/Makefile.once.head/00-gitfiles.mk5
-rw-r--r--build-aux/Makefile.once.tail/00-dist.mk3
-rw-r--r--config.mk19
6 files changed, 29 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index c8c9ae9..fb2bda6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,7 +8,7 @@
.tmp.*
*.o
*~
-parabola-keyring-*.tar.gz
+parabola-keyring-*
+parabola-hackers-*
-/config.mk
/gitfiles.mk
diff --git a/Makefile b/Makefile
index 507c903..a07239d 100644
--- a/Makefile
+++ b/Makefile
@@ -16,6 +16,7 @@
include config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
+files.src.src := $(filter-out go/golang.org/x/sys/plan9/% go/golang.org/x/sys/windows/%,$(files.src.src))
var = .var.
programs = nshd nshd-setuid nshd-tester common.rb
scripts = $(filter-out %.c %.o $(programs) common.rb common.rb.in,$(notdir $(wildcard $(srcdir)/bin/*)))
diff --git a/build-aux/Makefile.head.mk b/build-aux/Makefile.head.mk
index 33ef9c1..8299bc7 100644
--- a/build-aux/Makefile.head.mk
+++ b/build-aux/Makefile.head.mk
@@ -100,7 +100,7 @@ endif # _at.NO_ONCE
outdir := $(call _at.path,$(dir $(lastword $(_at.MAKEFILE_LIST))))
ifeq ($(call _at.is_subdir,$(topoutdir),$(outdir)),)
-$(error Autothing: not a subdirectory of topoutdir=«$(topoutdir)»: «$(outdir)»)
+$(error Autothing: not a subdirectory of topoutdir=$(topoutdir): $(outdir))
endif
# Don't use at.out2src because we *know* that $(outdir) is inside $(topoutdir),
diff --git a/build-aux/Makefile.once.head/00-gitfiles.mk b/build-aux/Makefile.once.head/00-gitfiles.mk
index dbb4ae9..f1474cf 100644
--- a/build-aux/Makefile.once.head/00-gitfiles.mk
+++ b/build-aux/Makefile.once.head/00-gitfiles.mk
@@ -65,10 +65,11 @@ _gitfiles.all =
ifneq ($(wildcard $(topsrcdir)/.git),)
$(topsrcdir)/$(gitfiles.file): _gitfiles.FORCE
- @(cd $(@D) && git ls-files -z) | sed -z -e 's/\$$/\$$$$/g' -e 's/\n/$$(at.nl)/g' | xargs -r0 printf '_gitfiles.all+=%s\n' | $(WRITE_IFCHANGED) $@
+ @(cd $(@D) && git ls-files --recurse-submodules -z) | sed -z -e 's/\$$/\$$$$/g' -e 's/\n/$$(at.nl)/g' | xargs -r0 printf '_gitfiles.all+=%s\n' | $(WRITE_IFCHANGED) $@
.PHONY: _gitfiles.FORCE
endif
_gitfiles.dir = $(call at.relto,$(topsrcdir),$(srcdir))
-_gitfiles.dir.all = $(patsubst $(_gitfiles.dir)/%,%,$(filter $(_gitfiles.dir)/%,$(_gitfiles.all)))
+_gitfiles.pat = $(patsubst ./%,%,$(_gitfiles.dir)/%)
+_gitfiles.dir.all = $(patsubst $(_gitfiles.pat),%,$(filter $(_gitfiles.pat),$(_gitfiles.all)))
_gitfiles.dir.src = $(filter-out $(addsuffix /%,$(nested.subdirs)),$(_gitfiles.dir.all))
diff --git a/build-aux/Makefile.once.tail/00-dist.mk b/build-aux/Makefile.once.tail/00-dist.mk
index a890d9d..3bd38da 100644
--- a/build-aux/Makefile.once.tail/00-dist.mk
+++ b/build-aux/Makefile.once.tail/00-dist.mk
@@ -13,6 +13,9 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# NB: intentionally resolve symlinks (tack on the -P flag to `cp` to
+# not resolve them). The GNU Coding Standards say to avoid symlinks
+# in tarballs.
_dist.copyfile = $(MKDIR_P) $(dir $2) && $(CP) -T $1 $2
_dist.addfile = $(call _dist.copyfile,$3,$2/$(call at.relto,$1,$3))
$(topoutdir)/$(dist.pkgname)-$(dist.version): $(_dist.files)
diff --git a/config.mk b/config.mk
new file mode 100644
index 0000000..5815d64
--- /dev/null
+++ b/config.mk
@@ -0,0 +1,19 @@
+ifeq ($(origin topsrcdir),undefined)
+topoutdir := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
+topsrcdir := $(topoutdir)
+
+PACKAGE = parabola-hackers
+VERSION = 20170117
+
+sysusersdir=$(prefix)/lib/sysusers.d
+systemunitdir=$(prefix)/lib/systemd/system
+conf_file = $(sysconfdir)/$(PACKAGE).yml
+shadow_file = $(sysconfdir)/nshd/shadow
+NET ?=
+#NET ?= FORCE
+user = nshd
+CFLAGS += -Wall -Wextra -Werror -pedantic
+CC = gcc -std=c99
+.LIBPATTERNS = lib%.so lib%.a
+
+endif