# /** # * Copyright 2000, 2001, 2002 Philipp von Klitzing # * Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Wim van Ravesteijn # * # * This file is part of AEGEE-Europe Statutory Event Applications. # * # * AEGEE-Europe Statutory Event Applications is free software: you can # * redistribute it and/or modify it under the terms of the GNU General # * Public License as published by the Free Software Foundation, either # * version 3 of the License, or (at your option) any later version. # * # * AEGEE-Europe Statutory Event Applications is distributed in the hope # * that it will be useful, but WITHOUT ANY WARRANTY; without even the # * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # * PURPOSE. See the GNU General Public License for more details. # * # * You should have received a copy of the GNU General Public License # * along with AEGEE-Europe Statutory Event Applications. If not, see # * . # */ EVENTNAME = $(shell basename `pwd`) help: @echo "Usage: make [clean|mailer]" clean: rm mailer/*_include.php || true mailer: include/mysql.php include/db/IDB.php include/db/MySQL.php include/db/QueryBuilder.php include/setup.php include/globals.php include/functions.php include/Mail.php include/MailOut.php include/smtperrors.php include/mail_smtp.old.php clean ifneq "$(EVENTNAME)" "event" if [ -f mailer/event_error.php ]; then \ mv mailer/event_error.php mailer/$(EVENTNAME)_error.php; \ fi if [ -f mailer/event.php ]; then \ mv mailer/event.php mailer/$(EVENTNAME).php; \ fi endif cat config.php > mailer/$(EVENTNAME)_include.php cat include/mysql.php >> mailer/$(EVENTNAME)_include.php for FILE in $$(grep "require_once" include/dbconnection.php | grep -Po '".*"' | grep -Po '[^"]*') ; \ do \ cat include$$FILE >> mailer/$(EVENTNAME)_include.php ; \ done echo "> mailer/$(EVENTNAME)_include.php grep "\$GLOBALS\['DB'\]" include/dbconnection.php >> mailer/$(EVENTNAME)_include.php echo "?>" >> mailer/$(EVENTNAME)_include.php cat include/setup.php >> mailer/$(EVENTNAME)_include.php cat include/globals.php >> mailer/$(EVENTNAME)_include.php cat include/functions.php >> mailer/$(EVENTNAME)_include.php cat include/Mail.php >> mailer/$(EVENTNAME)_include.php cat include/MailOut.php >> mailer/$(EVENTNAME)_include.php cat include/smtperrors.php >> mailer/$(EVENTNAME)_include.php cat include/mail_smtp.old.php >> mailer/$(EVENTNAME)_include.php cat include/mail_fetch.php >> mailer/$(EVENTNAME)_include.php mv mailer/$(EVENTNAME)_include.php mailer/$(EVENTNAME)_include.php.tmp grep -v 'require_once' mailer/$(EVENTNAME)_include.php.tmp > mailer/$(EVENTNAME)_include.php rm mailer/$(EVENTNAME)_include.php.tmp