Makefile
author Matthew Wild <mwild1@gmail.com>
Sat, 29 Nov 2008 03:27:50 +0000
changeset 467 66f145f5c932
parent 465 9ab51c483cf3
child 480 5d00d623904e
permissions -rw-r--r--
Update Makefile to now pass config paths to prosody. Update prosody, modulemanager and connectionlisteners to obey these paths.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
463
a2452d3bd828 Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
     1
a2452d3bd828 Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
     2
include config.unix
a2452d3bd828 Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
     3
a2452d3bd828 Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
     4
BIN = $(DESTDIR)$(PREFIX)/bin
a2452d3bd828 Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
     5
CONFIG = $(DESTDIR)$(SYSCONFDIR)
a2452d3bd828 Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
     6
MODULES = $(DESTDIR)$(PREFIX)/lib/prosody/modules
464
f1827353fd58 More Makefile improvements
Matthew Wild <mwild1@gmail.com>
parents: 463
diff changeset
     7
SOURCE = $(DESTDIR)$(PREFIX)/lib/prosody
463
a2452d3bd828 Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
     8
a2452d3bd828 Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
     9
all:
a2452d3bd828 Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    10
	$(MAKE) all -C util-src
a2452d3bd828 Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    11
467
66f145f5c932 Update Makefile to now pass config paths to prosody. Update prosody, modulemanager and connectionlisteners to obey these paths.
Matthew Wild <mwild1@gmail.com>
parents: 465
diff changeset
    12
install: prosody.install util/encodings.so util/encodings.so
464
f1827353fd58 More Makefile improvements
Matthew Wild <mwild1@gmail.com>
parents: 463
diff changeset
    13
	install -d $(BIN) $(CONFIG) $(MODULES) $(SOURCE)
f1827353fd58 More Makefile improvements
Matthew Wild <mwild1@gmail.com>
parents: 463
diff changeset
    14
	install -d $(SOURCE)/core $(SOURCE)/net $(SOURCE)/util
467
66f145f5c932 Update Makefile to now pass config paths to prosody. Update prosody, modulemanager and connectionlisteners to obey these paths.
Matthew Wild <mwild1@gmail.com>
parents: 465
diff changeset
    15
	install ./prosody.install $(BIN)/prosody
464
f1827353fd58 More Makefile improvements
Matthew Wild <mwild1@gmail.com>
parents: 463
diff changeset
    16
	install -m644 core/* $(SOURCE)/core
f1827353fd58 More Makefile improvements
Matthew Wild <mwild1@gmail.com>
parents: 463
diff changeset
    17
	install -m644 net/* $(SOURCE)/net
f1827353fd58 More Makefile improvements
Matthew Wild <mwild1@gmail.com>
parents: 463
diff changeset
    18
	install -m644 util/* $(SOURCE)/util
463
a2452d3bd828 Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    19
	install -m644 plugins/* $(MODULES)
465
9ab51c483cf3 Rename and update config. Update Makefile for this change.
Matthew Wild <mwild1@gmail.com>
parents: 464
diff changeset
    20
	install -m644 prosody.cfg.lua.dist $(CONFIG)/prosody.cfg.lua
463
a2452d3bd828 Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    21
	$(MAKE) install -C util-src
a2452d3bd828 Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    22
a2452d3bd828 Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    23
clean:
467
66f145f5c932 Update Makefile to now pass config paths to prosody. Update prosody, modulemanager and connectionlisteners to obey these paths.
Matthew Wild <mwild1@gmail.com>
parents: 465
diff changeset
    24
	rm -f prosody.install
463
a2452d3bd828 Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    25
	$(MAKE) clean -C util-src
464
f1827353fd58 More Makefile improvements
Matthew Wild <mwild1@gmail.com>
parents: 463
diff changeset
    26
f1827353fd58 More Makefile improvements
Matthew Wild <mwild1@gmail.com>
parents: 463
diff changeset
    27
util/encodings.so:
f1827353fd58 More Makefile improvements
Matthew Wild <mwild1@gmail.com>
parents: 463
diff changeset
    28
	$(MAKE) install -C util-src
f1827353fd58 More Makefile improvements
Matthew Wild <mwild1@gmail.com>
parents: 463
diff changeset
    29
f1827353fd58 More Makefile improvements
Matthew Wild <mwild1@gmail.com>
parents: 463
diff changeset
    30
util/hashes.so:
f1827353fd58 More Makefile improvements
Matthew Wild <mwild1@gmail.com>
parents: 463
diff changeset
    31
	$(MAKE) install -C util-src
467
66f145f5c932 Update Makefile to now pass config paths to prosody. Update prosody, modulemanager and connectionlisteners to obey these paths.
Matthew Wild <mwild1@gmail.com>
parents: 465
diff changeset
    32
66f145f5c932 Update Makefile to now pass config paths to prosody. Update prosody, modulemanager and connectionlisteners to obey these paths.
Matthew Wild <mwild1@gmail.com>
parents: 465
diff changeset
    33
prosody.install: prosody
66f145f5c932 Update Makefile to now pass config paths to prosody. Update prosody, modulemanager and connectionlisteners to obey these paths.
Matthew Wild <mwild1@gmail.com>
parents: 465
diff changeset
    34
	sed "s|^CFG_SOURCEDIR=.*;$$|CFG_SOURCEDIR='$(SOURCE)';|;s|^CFG_CONFIGDIR=.*;$$|CFG_CONFIGDIR='$(CONFIG)';|;s|^CFG_PLUGINDIR=.*;$$|CFG_PLUGINDIR='$(MODULES)/';|;" prosody > prosody.install
66f145f5c932 Update Makefile to now pass config paths to prosody. Update prosody, modulemanager and connectionlisteners to obey these paths.
Matthew Wild <mwild1@gmail.com>
parents: 465
diff changeset
    35