summaryrefslogtreecommitdiff
path: root/bin/setup
diff options
context:
space:
mode:
Diffstat (limited to 'bin/setup')
-rwxr-xr-xbin/setup25
1 files changed, 22 insertions, 3 deletions
diff --git a/bin/setup b/bin/setup
index ea6b92c..2a81748 100755
--- a/bin/setup
+++ b/bin/setup
@@ -2,10 +2,23 @@
CFLAGS += -std=c99 -Wall -Wextra -Werror
-all: $(HOME)/bin/autobuild $(HOME)/.ssh/id_rsa $(HOME)/.ssh/id_rsa.pub $(HOME)/.gnupg/secring.gpg
+dirs = \
+ $(HOME)/packages/pkgdest \
+ $(HOME)/packages/srcdest \
+ $(HOME)/packages/srcpkgdest \
+ $(HOME)/packages/logdest \
+ $(HOME)/packages/builddir
-$(HOME)/bin/autobuild: $(HOME)/bin/autobuild.c
- $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@ && chmod 6755 $@
+all: \
+ $(HOME)/bin/autobuild \
+ $(HOME)/.ssh/id_rsa \
+ $(HOME)/.ssh/id_rsa.pub \
+ $(HOME)/.gnupg/secring.gpg \
+ $(HOME)/packages/abslibre \
+ $(dirs)
+
+autobuild $(HOME)/bin/autobuild: $(HOME)/bin/autobuild.c
+ $(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@ && chmod 6755 $@
$(HOME)/.ssh/id_rsa $(HOME)/.ssh/id_rsa.pub:
ssh-keygen -N '' -f $@
@@ -19,4 +32,10 @@ $(HOME)/.gnupg/secring.gpg:
'Expire-Date: 0' \
| gpg --gen-key --batch
+$(HOME)/packages/abslibre:
+ createworkdir
+
+$(dirs): %:
+ mkdir -p -- $@
+
.DELETE_ON_ERROR: