summary refs log tree commit diff
path: root/bin/1sh/Makefile
blob: afd0350be41c3a39d330e77f10b4a7f6e2ae2e0c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
PREFIX = /usr/local
MANDIR = ${PREFIX}/share/man

CFLAGS += -std=c99 -Wall -Wextra -DSHELL
LDLIBS = -ledit

-include config.mk

SRCS += alias.c
SRCS += arith_yacc.c
SRCS += arith_yylex.c
SRCS += cd.c
SRCS += echo.c
SRCS += error.c
SRCS += eval.c
SRCS += exec.c
SRCS += expand.c
SRCS += histedit.c
SRCS += input.c
SRCS += jobs.c
SRCS += kill.c
SRCS += mail.c
SRCS += main.c
SRCS += memalloc.c
SRCS += miscbltin.c
SRCS += mystring.c
SRCS += options.c
SRCS += output.c
SRCS += parser.c
SRCS += printf.c
SRCS += redir.c
SRCS += show.c
SRCS += test.c
SRCS += trap.c
SRCS += var.c

GENSRCS = builtins.c nodes.c syntax.c
GENHDRS = builtins.h nodes.h syntax.h token.h

SRCS += ${GENSRCS}
OBJS = ${SRCS:.c=.o}

MANS = 1sh.1 1sh-kill.1 1sh-printf.1 1sh-test.1

all: tags 1sh

1sh: ${OBJS}
	${CC} ${LDFLAGS} ${OBJS} ${LDLIBS} -o $@

${OBJS}: ${GENHDRS}

builtins.c builtins.h: mkbuiltins builtins.def
	sh mkbuiltins .

nodes.c nodes.h: mknodes nodetypes nodes.c.pat
	./mknodes nodetypes nodes.c.pat

syntax.c syntax.h: mksyntax
	./mksyntax

token.h: mktokens
	sh mktokens

tags: *.h *.c
	ctags -w *.h *.c

depend: ${SRCS} ${GENHDRS}
	${CC} ${CFLAGS} -MM ${SRCS} > .depend

-include .depend

clean:
	rm -f 1sh ${OBJS} mknodes mksyntax ${GENSRCS} ${GENHDRS} tags .depend

install: 1sh ${MANS}
	install -d ${PREFIX}/bin ${MANDIR}/man1
	install 1sh ${PREFIX}/bin
	install -m 644 ${MANS} ${MANDIR}/man1

uninstall:
	rm -f ${PREFIX}/bin/1sh ${MANS:%=${MANDIR}/man1/%}

shell:
	grep -q '^${PREFIX}/bin/1sh$$' /etc/shells \
		|| echo '${PREFIX}/bin/1sh' >> /etc/shells

unshell:
	sed -i sed '\;^${PREFIX}/bin/1sh$$;d' /etc/shells
llow=1'>Revert "Add AutoClose"June McEnroe This reverts commit 2705f4b91a56caf4cf2b3b89b247580debd5d453. This fixes the delay when leaving insert mode 2012-01-22Revert "Disable powerline for now"June McEnroe This reverts commit 171b1aa0d1d445a1223d0d638f2798b780c3e1ce. 2012-01-22Revert "Add VCS repo directories to wildignore"June McEnroe This reverts commit f4cc36a0aca465eea866fa7131a19497d46e63f0. This fixes not being able to commit with vim-fugitive 2012-01-22Disable powerline for nowJune McEnroe 2012-01-22Update some pluginsJune McEnroe 2012-01-22Add VCS repo directories to wildignoreJune McEnroe 2012-01-22Map ,e and ,b to CtrlP file and buffer respectivelyJune McEnroe 2012-01-22Add vim-spaceJune McEnroe 2012-01-22Add AutoCloseJune McEnroe 2012-01-22Add binding for GundoJune McEnroe 2012-01-22Add GundoJune McEnroe 2012-01-22Add Jellybeans colorschemeJune McEnroe 2012-01-22Add syntasticJune McEnroe 2012-01-21Add PowerlineJune McEnroe 2012-01-21Add quicktaskJune McEnroe 2012-01-15Moved comments out of mapsJune McEnroe 2012-01-14Disable scrollbarsJune McEnroe