forked from mikewarot/mstoical
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.in
57 lines (45 loc) · 1.4 KB
/
Makefile.in
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
# Makefile for Stoical.
#
# See src/config.h for build options.
VERS= @PACKAGE_VERSION@
META= Makefile
OBJS= kernel.o term.o mem.o hash.o dict.o debug.o string.o signal.o
SRCS= kernel.c term.c dict.c string.c hash.c debug.c mem.c signal.c
PREFIX= @prefix@
NAME = stoical-$(VERS)
LIBROOT= $(PREFIX)/lib/stoical
CFLAGS= -c -DVERSION=\"$(VERS)\" -DLIBROOT=\"$(LIBROOT)\" -Wall @CFLAGS@
LIBS= @LIBS@
all: src/.depend
cd src && $(MAKE)
src/.depend:
@echo Generating dependencies
@cd src && $(CC) -MM $(SRCS) > .depend
doc:
@echo Generating documentation
@./stoical -l lib util/docex src/words.c lib/def doc/words.d
@echo Generating Vim syntax
@mkdir -p vim/syntax
@./stoical -l lib util/genvim doc/words.d >vim/syntax/stoical.vim
@cat doc/words.d/* >doc/words; rm -rf doc/words.d
test:
cd $@ && $(MAKE)
install: all doc
install -s stoical $(PREFIX)/bin
mkdir -p $(LIBROOT); cp -R lib/* $(LIBROOT)
mkdir -p $(PREFIX)/share/doc/stoical
cp -R COPYING README doc/Stoical doc/words $(PREFIX)/share/doc/stoical
cp doc/stoical.1 $(PREFIX)/share/man/man1
clean:
rm -f stoical
cd src && $(MAKE) $@
distclean: clean
rm -f Makefile src/Makefile config.cache config.h config.log
echo -e 'all:\n%:\n\t./configure && $(MAKE) $$@' > Makefile
pkg: distclean
rm -f $(NAME)
ln -sf . $(NAME)
cat MANIFEST | sed 's/^/$(NAME)\//' | xargs tar czvf $(NAME).tar.gz
rm -f $(NAME)
.PHONY: doc test clean
.EXPORT_ALL_VARIABLES: