fixed error messages concerning rooms_archive on update to iserv2 (see http://wiki...
[iserv-mod-room-reservation.git] / Makefile
index 2a58b8b..b847b0d 100644 (file)
--- a/Makefile
+++ b/Makefile
 #\r
 \r
 DESTDIR?=\r
-SOURCEFILES=src/*.php includes/*.inc\r
-MODULE_DOC_FILES=doc/source/html/* doc/source/latex/*\r
 LN=ln -f\r
 RM=rm -rf\r
 MKDIR=mkdir -p\r
 \r
 # hardlink the files to their destinations\r
-# TODO move documentation where Jörg wants it ;)\r
-links:\r
+links: sourcedoc\r
        # documentation\r
-       $(MKDIR) $(DESTDIR)/usr/share/doc/iserv/mod/room-reservation/source/\r
-       $(LN) doc/{TODO,changelog.html} $(DESTDIR)/usr/share/doc/iserv/mod/room-reservation/\r
-       $(LN) doc/source/html/* $(DESTDIR)/usr/share/doc/iserv/mod/room-reservation/source/\r
+       $(MKDIR) $(DESTDIR)/usr/share/doc/iserv-mod-room-reservation/source/\r
+       if [ ! -d $(DESTDIR)/usr/share/doc/iserv/mod/ ]; then $(MKDIR) $(DESTDIR)/usr/share/doc/iserv/mod/; fi\r
+       $(LN) doc/{TODO,changelog.old.html} $(DESTDIR)/usr/share/doc/iserv-mod-room-reservation/\r
+       $(LN) doc/source/* $(DESTDIR)/usr/share/doc/iserv-mod-room-reservation/source/\r
+       $(RM) $(DESTDIR)/usr/share/doc/iserv/mod/room-reservation\r
+       $(LN) -s ../../iserv-mod-room-reservation $(DESTDIR)/usr/share/doc/iserv/mod/room-reservation\r
        \r
        # images\r
        if [ ! -d $(DESTDIR)/usr/share/iserv/www/img/default/16/ ]; then $(MKDIR) $(DESTDIR)/usr/share/iserv/www/img/default/16/; fi\r
@@ -49,8 +49,12 @@ links:
        \r
        # includes\r
        $(MKDIR) $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation\r
-       $(LN) includes/*.inc $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/\r
-       touch $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc\r
+       $(LN) inc/*.inc $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/\r
+       if [ ! -e $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc ] ; then touch $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc; fi\r
+ifeq ($(USER),root)\r
+       chmod u+rw $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc\r
+       chown www-data $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc\r
+endif\r
        \r
        # i18n\r
        if [ ! -d $(DESTDIR)/usr/share/iserv/locale/de/ ]; then $(MKDIR) $(DESTDIR)/usr/share/iserv/locale/de/; fi\r
@@ -71,25 +75,22 @@ links:
        $(LN) sql/log_module/* $(DESTDIR)/usr/share/iserv/db/log_module\r
        \r
        # web pages\r
-       $(MKDIR) $(DESTDIR)/usr/share/iserv/www/mod_room-reservation/admin\r
-       $(LN) src/index.php $(DESTDIR)/usr/share/iserv/www/mod_room-reservation/\r
-       $(LN) src/admin/config.php $(DESTDIR)/usr/share/iserv/www/mod_room-reservation/admin/\r
+       $(MKDIR) $(DESTDIR)/usr/share/iserv/www/mod_room-reservation\r
+       $(LN) src/{config,index}.php $(DESTDIR)/usr/share/iserv/www/mod_room-reservation/\r
        \r
        # additional files\r
        $(MKDIR) $(DESTDIR)/usr/share/iserv/modules/room-reservation\r
-       $(LN) update-iserv1-iserv2.pl $(DESTDIR)/usr/share/iserv/modules/room-reservation\r
+       $(LN) maint/update-iserv1-iserv2.pl $(DESTDIR)/usr/share/iserv/modules/room-reservation\r
        chmod +x $(DESTDIR)/usr/share/iserv/modules/room-reservation/update-iserv1-iserv2.pl\r
 \r
 # build doxygen documentation from source\r
 sourcedoc:\r
        doxygen\r
+       mv doc/source/html/* doc/source/ && rm -rf doc/source/html\r
 \r
 # install everything\r
-install: sourcedoc links\r
-ifndef $(DESTDIR)\r
-# only useful if sql data is in the right place\r
-       chmod g+w $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc\r
-       chgrp www-data $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc\r
+install: links\r
+ifeq ($(USER),root)\r
        chkdb -r\r
        chkpriv\r
        chklocale\r
@@ -97,7 +98,8 @@ endif
 \r
 # uninstalling\r
 uninstall:\r
-       $(RM) $(DESTDIR)/usr/share/doc/iserv/mod/mod_room-reservation\r
+       $(RM) $(DESTDIR)/usr/share/doc/iserv/mod/room-reservation\r
+       $(RM) $(DESTDIR)/usr/share/doc/iserv-mod-room-reservation\r
        $(RM) $(DESTDIR)/usr/share/iserv/locale/de/mod_room-reservation.po\r
        $(RM) $(DESTDIR)/usr/share/iserv/db/mod_room-reservation.sql\r
        $(RM) $(DESTDIR)/usr/share/iserv/db/log_module/mod_room-reservation\r
@@ -124,4 +126,4 @@ clean: distclean
 distclean:\r
        $(RM) doc/source\r
 \r
-.PHONY: clean\r
+.PHONY: clean distclean install\r
This page took 0.021913 seconds and 4 git commands to generate.