summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 14 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index faa4c51..feff636 100644
--- a/Makefile
+++ b/Makefile
@@ -10,7 +10,7 @@ TRANSLATIONS =
PREFIX = /usr
BINDIR = $(PREFIX)/bin
LIBDIR = $(PREFIX)/lib
-JSLIBDIR = $(LIBDIR)/node_modules/$(NAME)
+JSLIBDIR = $(LIBDIR)/node/$(NAME)
SHAREDIR = $(PREFIX)/share
LOCALEDIR = $(SHAREDIR)/locale
MANDIR = $(SHAREDIR)/man
@@ -40,6 +40,7 @@ manpages.en.in = \
doc/$(NAME).CHANGELOG.en.7.in \
doc/$(NAME).TODOs.en.7.in \
doc/$(NAME).en.1.in \
+ doc/$(NAME).en.3js.in \
doc/$(NAME).tutorial.en.7.in \
doc/$(NAME).recipes.en.7.in \
doc/$(NAME).why.en.7.in
@@ -61,7 +62,8 @@ sources = \
derived-assets = \
- $(manpages) \
+ $(manpages) \
+ src/index.js \
@@ -72,6 +74,9 @@ all: $(derived-assets)
$(manpages): Makefile
+src/index.js:
+ ln -fs api.js $@
+
.SUFFIXES: .js .js-t
@@ -83,10 +88,11 @@ check-t: $(tests.js-t)
assert-tests = \
- tests/assert-deps.sh \
+ tests/assert-deps.sh \
+ tests/assert-install.sh \
$(assert-tests): ALWAYS
- sh $@
+ +sh $@
check-asserts: $(assert-tests)
@@ -108,10 +114,9 @@ clean:
install: all
mkdir -p \
'$(DESTDIR)$(BINDIR)' \
- '$(DESTDIR)$(JSLIBDIR)'/src
- cp package.json '$(DESTDIR)$(JSLIBDIR)'
- cp src/*.js '$(DESTDIR)$(JSLIBDIR)'/src
- ln -frs '$(DESTDIR)$(JSLIBDIR)'/src/cli.js '$(DESTDIR)$(BINDIR)'/$(NAME)
+ '$(DESTDIR)$(JSLIBDIR)'
+ cp src/*.js '$(DESTDIR)$(JSLIBDIR)'
+ ln -fs '$(DESTDIR)$(JSLIBDIR)'/cli.js '$(DESTDIR)$(BINDIR)'/$(NAME)
sh tools/manpages.sh -ip '$(DESTDIR)$(MANDIR)' $(manpages)
## Uninstalls from $(DESTDIR)$(PREFIX). This is a perfect mirror
@@ -130,7 +135,7 @@ run-ircd:
run-web:
$(JSIMPL) src/server/web.js server -l http://localhost:3003
-## Run the web and IRC server locally
+## Run the web and IRC server locally.
run:
$(MAKE) run-ircd & $(MAKE) run-web & wait