From 334821af92553bc588ece1559fdb498e790de6bc Mon Sep 17 00:00:00 2001 From: Marius Tolzmann Date: Tue, 11 Aug 2015 11:31:37 +0200 Subject: [PATCH] web/Makefile: Generate cgi script replacing make variables --- .gitignore | 2 ++ Makefile | 2 ++ web/pages/mxq/{mxq => mxq.in} | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) rename web/pages/mxq/{mxq => mxq.in} (98%) diff --git a/.gitignore b/.gitignore index ae66896..91daded 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,8 @@ test_mx_util test_mx_log test_mx_mysql +/web/pages/mxq/mxq + *~ gmon.out diff --git a/Makefile b/Makefile index 26e8d64..22fbb5c 100644 --- a/Makefile +++ b/Makefile @@ -443,6 +443,8 @@ clean: CLEAN += mxqsub.1 build: web/pages/mxq/mxq +clean: CLEAN += web/pages/mxq/mxq + install:: web/pages/mxq/mxq $(call quiet-install,0755,$^,${DESTDIR}${CGIDIR}/mxq) diff --git a/web/pages/mxq/mxq b/web/pages/mxq/mxq.in similarity index 98% rename from web/pages/mxq/mxq rename to web/pages/mxq/mxq.in index c153492..fa4dad8 100755 --- a/web/pages/mxq/mxq +++ b/web/pages/mxq/mxq.in @@ -76,7 +76,7 @@ EOF sub db_init { - $dbh= DBI->connect('DBI:mysql:mysql_read_default_file=/etc/mxq/mysql.cnf',undef,undef, { RaiseError => 1, AutoCommit => 1 }); + $dbh= DBI->connect('DBI:mysql:mysql_read_default_file=@MXQ_MYSQL_DEFAULT_FILE@',undef,undef, { RaiseError => 1, AutoCommit => 1 }); # mxq_group.h register_group_status( OK => 0,