# # @file Makefile # Makefile for creating documentation and hardlinks for better development # @author Roland Hieber (roland.hieber@wilhelm-gym.net) # @date 06.10.2007 # @package iserv_errorreporter # # Copyright © 2007 Roland Hieber # # Permission is hereby granted, free of charge, to any person obtaining # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. # PACKAGENAME=iserv-mod-error-reporter VERSION:=$(shell grep "^$(PACKAGENAME)" debian/changelog | head -1 | sed -e "s/$(PACKAGENAME) (\([0-9.]\+\).*).*/\1/ ") SHELL=/bin/bash INSTALLDIR=/opt/iserv LN=ln -f RM=rm -rf CHOWN=chown -f MKDIR=mkdir -p # hardlink the files to their destinations links: sourcedoc # documentation $(MKDIR) $(DESTDIR)/usr/share/doc/iserv-mod-error-reporter/source/ $(MKDIR) $(DESTDIR)/usr/share/doc/iserv/mod/error-reporter/ $(LN) doc/TODO $(DESTDIR)/usr/share/doc/iserv-mod-error-reporter/ $(LN) doc/changelog.old.html $(DESTDIR)/usr/share/doc/iserv-mod-error-reporter/ $(LN) doc/source/* $(DESTDIR)/usr/share/doc/iserv-mod-error-reporter/source/ $(LN) -s ../../iserv-mod-error-reporter $(DESTDIR)/usr/share/doc/iserv/mod/error-reporter/ # images $(MKDIR) $(DESTDIR)/usr/share/iserv/www/img/default/16/ $(MKDIR) $(DESTDIR)/usr/share/iserv/www/img/default/32/ $(LN) img/16/*.png $(DESTDIR)/usr/share/iserv/www/img/default/16/ $(LN) img/32/*.png $(DESTDIR)/usr/share/iserv/www/img/default/32/ # localization $(MKDIR) $(DESTDIR)/usr/share/iserv/locale/de/ $(LN) lang/mod_error-reporter.po $(DESTDIR)/usr/share/iserv/locale/de/ # SQL data $(MKDIR) $(DESTDIR)/usr/share/iserv/db/log_module/ $(LN) sql/mod_error-reporter.sql $(DESTDIR)/usr/share/iserv/db/ $(LN) sql/log_module/mod_error-reporter $(DESTDIR)/usr/share/iserv/db/log_module/ # privileges $(MKDIR) $(DESTDIR)/usr/share/iserv/priv/ $(LN) priv/mod_error-reporter $(DESTDIR)/usr/share/iserv/priv/ # includes $(MKDIR) $(DESTDIR)/usr/share/iserv/www/inc/mod_error-reporter/ $(LN) inc/{class*,init,functions}.inc $(DESTDIR)/usr/share/iserv/www/inc/mod_error-reporter/ # navigation $(MKDIR) $(DESTDIR)/usr/share/iserv/www/nav/ $(LN) nav/*.mod $(DESTDIR)/usr/share/iserv/www/nav/ # web pages $(MKDIR) $(DESTDIR)/usr/share/iserv/www/mod_error-reporter/ $(LN) src/{detail,index}.php $(DESTDIR)/usr/share/iserv/www/mod_error-reporter/ # config $(MKDIR) $(DESTDIR)/usr/share/iserv/iconf/etc/iserv/config.template/ $(LN) config/82error-reporter $(DESTDIR)/usr/share/iserv/iconf/etc/iserv/config.template/ # iservchk $(MKDIR) $(DESTDIR)/usr/share/iserv/iconf/etc/iserv/chk.d/99errorreporter/ $(LN) iservchk/* $(DESTDIR)/usr/share/iserv/iconf/etc/iserv/chk.d/99errorreporter/ # maintenance files $(MKDIR) $(DESTDIR)/usr/share/iserv/modules/error-reporter/ $(LN) maint/* $(DESTDIR)/usr/share/iserv/modules/error-reporter # build doxygen documentation from source sourcedoc: cat Doxyfile.in | sed -e "s/{{{VERSION}}}/$(VERSION)/" \ -e "s/{{{PACKAGENAME}}}/$(PACKAGENAME)/" > Doxyfile doxygen mv doc/source/html/* doc/source/ && rm -rf doc/source/html install: sourcedoc links # clean up clean: if [ -e Doxyfile ]; then rm Doxyfile; fi; $(RM) doc/source .PHONY: clean install