Browse Source

Tweak Makefile ordering and naming

master
Causal Agent 5 months ago
parent
commit
e95a6b776e
Signed by: Curtis McEnroe <june@causal.agency> GPG Key ID: CEA2F97ADCFCD77C
2 changed files with 16 additions and 16 deletions
  1. 1
    1
      Darwin.mk
  2. 15
    15
      Makefile

+ 1
- 1
Darwin.mk View File

@@ -1,4 +1,4 @@
1 1
 LIBRESSL_PREFIX = /usr/local/opt/libressl
2 2
 LDLIBS = -lcurses -ltls -framework Cocoa
3 3
 BINS += sandman
4
-MANS += sandman.1
4
+MAN1 += sandman.1

+ 15
- 15
Makefile View File

@@ -1,5 +1,5 @@
1 1
 PREFIX = ~/.local
2
-MANDIR = $(PREFIX)/share/man/man
2
+MANDIR = $(PREFIX)/share/man
3 3
 CHROOT_USER = chat
4 4
 CHROOT_GROUP = $(CHROOT_USER)
5 5
 LIBRESSL_PREFIX = /usr/local
@@ -10,7 +10,7 @@ LDFLAGS += -L$(LIBRESSL_PREFIX)/lib
10 10
 LDLIBS = -lcursesw -ltls
11 11
 
12 12
 BINS = catgirl
13
-MANS = catgirl.1
13
+MAN1 = catgirl.1
14 14
 
15 15
 -include config.mk
16 16
 
@@ -35,30 +35,30 @@ TESTS += term.t
35 35
 
36 36
 all: tags $(BINS) test
37 37
 
38
-$(OBJS): chat.h
39
-
40 38
 catgirl: $(OBJS)
41 39
 	$(CC) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@
42 40
 
41
+$(OBJS): chat.h
42
+
43
+test: $(TESTS)
44
+	set -e; $(TESTS:%=./%;)
45
+
43 46
 .SUFFIXES: .t
44 47
 
45 48
 .c.t:
46 49
 	$(CC) $(CFLAGS) -DTEST $(LDFLAGS) $< $(LDLIBS) -o $@
47 50
 
48
-test: $(TESTS)
49
-	set -e; $(TESTS:%=./%;)
50
-
51
-tags: *.h *.c
52
-	ctags -w *.h *.c
51
+tags: *.c *.h
52
+	ctags -w *.c *.h
53 53
 
54
-install: $(BINS) $(MANS)
55
-	install -d $(PREFIX)/bin $(MANDIR)1
54
+install: $(BINS) $(MAN1)
55
+	install -d $(PREFIX)/bin $(MANDIR)/man1
56 56
 	install $(BINS) $(PREFIX)/bin
57
-	install -m 644 $(MANS) $(MANDIR)1
57
+	install -m 644 $(MAN1) $(MANDIR)/man1
58 58
 
59 59
 uninstall:
60 60
 	rm -f $(BINS:%=$(PREFIX)/bin/%)
61
-	rm -f $(MAN:%=%(MANDIR)1/%)
61
+	rm -f $(MAN1:%=$(MANDIR)/man1/%)
62 62
 
63 63
 chroot.tar: catgirl catgirl.1 man.sh
64 64
 	install -d -o root -g wheel \
@@ -93,10 +93,10 @@ chroot.tar: catgirl catgirl.1 man.sh
93 93
 	tar -cf chroot.tar -C root bin etc home lib libexec usr
94 94
 
95 95
 install-chroot: chroot.tar
96
-	tar -xf chroot.tar -C /home/$(CHROOT_USER)
96
+	tar -x -f chroot.tar -C /home/$(CHROOT_USER)
97 97
 
98 98
 clean:
99
-	rm -fr $(OBJS) $(BINS) $(TESTS) tags root chroot.tar
99
+	rm -fr $(BINS) $(OBJS) $(TESTS) tags root chroot.tar
100 100
 
101 101
 README: catgirl.7
102 102
 	mandoc catgirl.7 | col -bx > README

Loading…
Cancel
Save