summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2013-04-06 13:14:46 +0200
committerPaul Buetow <paul@buetow.org>2013-04-06 13:14:46 +0200
commiteab0b1c2d649fa16707b24cd2a91f195078167b0 (patch)
treee960f351655305e3911089ff75677caef364a280 /Makefile
parent07706f56cd421bf8b101a5c0fe44674d36e161a0 (diff)
tagging ychat-0.7.2ychat-0.7.2
Diffstat (limited to 'Makefile')
-rwxr-xr-xMakefile77
1 files changed, 42 insertions, 35 deletions
diff --git a/Makefile b/Makefile
index cf91b55..716f83a 100755
--- a/Makefile
+++ b/Makefile
@@ -1,46 +1,48 @@
MAKE=`tail -1 make.version`
PREFIX=`grep "define PREFIX" src/glob.h | cut -d'"' -f2`
all: base modules version
- @echo "Now edit the yhttpd.conf and run yhttpd!"
+ @echo "Now edit the ychat.conf and run ychat!"
@echo "The config file is searched in the following order:"
- @echo " ./yhttpd.conf "
- @echo " ~/.yhttpd/yhttpd.conf "
- @echo " ./etc/yhttpd.conf "
- @echo " /etc/yhttpd.conf "
- @echo " $(PREFIX)/etc/yhttpd.conf "
+ @echo " ./ychat.conf "
+ @echo " ~/.ychat/ychat.conf "
+ @echo " ./etc/ychat.conf "
+ @echo " /etc/ychat.conf "
+ @echo " $(PREFIX)/etc/ychat.conf "
install: deinstall
- @echo "Instaling yhttpd to $(PREFIX)"
- @cp bin/yhttpd $(PREFIX)/bin
- @if ! test -d $(PREFIX)/lib/yhttpd; then mkdir -p $(PREFIX)/lib/yhttpd; fi
- @if ! test -d $(PREFIX)/share/yhttpd/log/rooms; then mkdir -p $(PREFIX)/share/yhttpd/log/rooms; fi
+ @echo "Instaling ychat to $(PREFIX)"
+ @cp bin/ychat $(PREFIX)/bin
+ @if ! test -d $(PREFIX)/lib/ychat; then mkdir -p $(PREFIX)/lib/ychat; fi
+ @if ! test -d $(PREFIX)/share/ychat/log/rooms; then mkdir -p $(PREFIX)/share/ychat/log/rooms; fi
@if ! test -d $(PREFIX)/etc; then mkdir $(PREFIX)/etc; fi
- @if test -d mods; then cp -Rp mods $(PREFIX)/lib/yhttpd/mods; fi
- @cp -Rp lang $(PREFIX)/share/yhttpd/lang
- @if test -f $(PREFIX)/etc/yhttpd.conf; then mv $(PREFIX)/etc/yhttpd.conf $(PREFIX)/etc/yhttpd.conf.bak; fi
- @cp etc/yhttpd.conf etc/yhttpd.conf.tmp
- @sed "s#mods/#$(PREFIX)/lib/yhttpd/mods/#" etc/yhttpd.conf.tmp > etc/yhttpd.conf.tmp.2 && mv etc/yhttpd.conf.tmp.2 etc/yhttpd.conf.tmp
- @sed "s#\"log/#\"$(PREFIX)/share/yhttpd/log/#" etc/yhttpd.conf.tmp > etc/yhttpd.conf.tmp.2 && mv etc/yhttpd.conf.tmp.2 etc/yhttpd.conf.tmp
- @sed "s#LANGUAGE_DIR=\"lang/#LANGUAGE_DIR=\"$(PREFIX)/share/yhttpd/lang/#" etc/yhttpd.conf.tmp > etc/yhttpd.conf.tmp.2 && mv etc/yhttpd.conf.tmp.2 etc/yhttpd.conf.tmp
- @mv etc/yhttpd.conf.tmp $(PREFIX)/etc/yhttpd.conf
- @echo "yhttpd configuration file can be found under"
- @echo " $(PREFIX)/etc/yhttpd.conf"
- @echo "Copy it to ~/.yhttpd/yhttpd.conf to use local settings :-)"
- @echo "Be sure that $(PREFIX)/share/yhttpd/logs is writable by your user or modify "
- @echo "logging dirs in the yhttpd.conf to a local directory."
- @echo "The most secure would be an additional user 'yhttpd'!"
+ @if test -d mods; then cp -Rp mods $(PREFIX)/lib/ychat/mods; fi
+ @cp -Rp html $(PREFIX)/share/ychat/html
+ @cp -Rp lang $(PREFIX)/share/ychat/lang
+ @if test -f $(PREFIX)/etc/ychat.conf; then mv $(PREFIX)/etc/ychat.conf $(PREFIX)/etc/ychat.conf.bak; fi
+ @cp etc/ychat.conf etc/ychat.conf.tmp
+ @sed "s#mods/#$(PREFIX)/lib/ychat/mods/#" etc/ychat.conf.tmp > etc/ychat.conf.tmp.2 && mv etc/ychat.conf.tmp.2 etc/ychat.conf.tmp
+ @sed "s#\"log/#\"$(PREFIX)/share/ychat/log/#" etc/ychat.conf.tmp > etc/ychat.conf.tmp.2 && mv etc/ychat.conf.tmp.2 etc/ychat.conf.tmp
+ @sed "s#LANGUAGE_DIR=\"lang/#LANGUAGE_DIR=\"$(PREFIX)/share/ychat/lang/#" etc/ychat.conf.tmp > etc/ychat.conf.tmp.2 && mv etc/ychat.conf.tmp.2 etc/ychat.conf.tmp
+ @sed "s#HTML_TEMPLATE_DIR=\"html/#HTML_TEMPLATE_DIR=\"$(PREFIX)/share/ychat/html/#" etc/ychat.conf.tmp > etc/ychat.conf.tmp.2 && mv etc/ychat.conf.tmp.2 etc/ychat.conf.tmp
+ @mv etc/ychat.conf.tmp $(PREFIX)/etc/ychat.conf
+ @echo "yChat configuration file can be found under"
+ @echo " $(PREFIX)/etc/ychat.conf"
+ @echo "Copy it to ~/.ychat/ychat.conf to use local settings :-)"
+ @echo "Be sure that $(PREFIX)/share/ychat/logs is writable by your user or modify "
+ @echo "logging dirs in the ychat.conf to a local directory."
+ @echo "The most secure would be an additional user 'ychat'!"
uninstall: deinstall
deinstall:
- @echo "Deinstalling yhttpd from $(PREFIX)"
- @if test -f $(PREFIX)/bin/yhttpd; then rm -f $(PREFIX)/bin/yhttpd; fi
- @if test -d $(PREFIX)/lib/yhttpd; then rm -Rf $(PREFIX)/lib/yhttpd; fi
- @if test -d $(PREFIX)/share/yhttpd; then rm -Rf $(PREFIX)/share/yhttpd; fi
- @echo "Done. Please remove manually $(PREFIX)/etc/yhttpd.conf to complete"
+ @echo "Deinstalling ychat from $(PREFIX)"
+ @if test -f $(PREFIX)/bin/ychat; then rm -f $(PREFIX)/bin/ychat; fi
+ @if test -d $(PREFIX)/lib/ychat; then rm -Rf $(PREFIX)/lib/ychat; fi
+ @if test -d $(PREFIX)/share/ychat; then rm -Rf $(PREFIX)/share/ychat; fi
+ @echo "Done. Please remove manually $(PREFIX)/etc/ychat.conf to complete"
modules:
@if test -d ./src/mods; then ${MAKE} -C ./src/mods; fi
clean_modules:
@if test -d ./src/mods; then ${MAKE} -C ./src/mods clean; fi
base:
- @if test -f bin/yhttpd; then echo "Backing up old binary";if test -f bin/yhttpd.old; then rm -f bin/yhttpd.old; fi; mv bin/yhttpd bin/yhttpd.old; fi
+ @if test -f bin/ychat; then echo "Backing up old binary";if test -f bin/ychat.old; then rm -f bin/ychat.old; fi; mv bin/ychat bin/ychat.old; fi
@perl ./scripts/buildnr.pl
@perl ./scripts/setglobvals.pl
@${MAKE} -C ./src
@@ -49,18 +51,23 @@ clean_base:
stats:
@perl scripts/stats.pl
run:
- ./bin/yhttpd
+ ./bin/ychat
base_start: base
- ./bin/yhttpd
+ ./bin/ychat
start: base modules
- ./bin/yhttpd
+ ./bin/ychat
gpl:
@more COPYING
+#//<<*
+yhttpdbase:
+ @perl scripts/makeyhttpd.pl || echo "You need to have perl to do this!"
+ @echo yhttpd code base has been generated in ../yhttpd
+#//*>>
clean: clean_base clean_modules
help:
@echo "You may run ${MAKE} with the following parameters:"
@grep "^ ${MAKE} " README
- @echo "For more questions read the README file or contact mail@yhttpd.org!"
+ @echo "For more questions read the README file or contact mail@ychat.org!"
setup:
@./configure
@${MAKE}
@@ -80,4 +87,4 @@ mrproper: clean
version:
@echo "`grep VERSION src/msgs.h | cut -d'"' -f2`-`grep BRANCH src/msgs.h| cut -d'"' -f2` Build `grep BUILD src/msgs.h| cut -d' ' -f3`"
debug:
- @gdb bin/yhttpd yhttpd.core
+ @gdb bin/ychat ychat.core