Software /
code /
prosody
Comparison
tools/migration/Makefile @ 4216:ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 26 Feb 2011 00:23:48 +0000 |
child | 4224:8b8d2b8e4d0b |
comparison
equal
deleted
inserted
replaced
4214:1674cd17557c | 4216:ff80a8471e86 |
---|---|
1 | |
2 include ../../config.unix | |
3 | |
4 BIN = $(DESTDIR)$(PREFIX)/bin | |
5 CONFIG = $(DESTDIR)$(SYSCONFDIR) | |
6 SOURCE = $(DESTDIR)$(PREFIX)/lib/prosody | |
7 DATA = $(DESTDIR)$(DATADIR) | |
8 MAN = $(DESTDIR)$(PREFIX)/share/man | |
9 | |
10 INSTALLEDSOURCE = $(PREFIX)/lib/prosody | |
11 INSTALLEDCONFIG = $(SYSCONFDIR) | |
12 INSTALLEDMODULES = $(PREFIX)/lib/prosody/modules | |
13 INSTALLEDDATA = $(DATADIR) | |
14 | |
15 SOURCE_FILES = main.lua migrator/*.lua | |
16 | |
17 all: prosody-migrator.install migrator.cfg.lua.install $(SOURCE_FILES) | |
18 | |
19 install: prosody-migrator.install migrator.cfg.lua.install | |
20 install -d $(BIN) $(CONFIG) $(SOURCE) $(SOURCE)/migrator | |
21 install -d $(MAN)/man1 | |
22 install -d $(SOURCE)/migrator | |
23 install -m755 ./prosody-migrator.install $(BIN)/prosody-migrator | |
24 install -m644 $(SOURCE_FILES) $(SOURCE)/migrator | |
25 test -e $(CONFIG)/migrator.cfg.lua || install -m644 migrator.cfg.lua.install $(CONFIG)/migrator.cfg.lua | |
26 | |
27 clean: | |
28 rm -f prosody-migrator.install | |
29 rm -f migrator.cfg.lua.install | |
30 | |
31 prosody-migrator.install: main.lua | |
32 sed "s|^CFG_SOURCEDIR=.*;$$|CFG_SOURCEDIR='$(INSTALLEDSOURCE)';|; \ | |
33 s|^CFG_CONFIGDIR=.*;$$|CFG_CONFIGDIR='$(INSTALLEDCONFIG)';|;" \ | |
34 < main.lua > prosody-migrator.install | |
35 | |
36 migrator.cfg.lua.install: migrator.cfg.lua | |
37 sed "s|^local data_path = .*;$$|local data_path = '$(INSTALLEDDATA)';|;" \ | |
38 < migrator.cfg.lua > migrator.cfg.lua.install |