1 # gnu make (also with cygwin) version
2 # TODO: get db params from config/config.ini
9 DB_SQLITE_DBFILE = /tmp/phpwiki-sqlite.db
10 # ****************************************************************************
11 PHP_SRC := $(wildcard *.php ./lib/*.php ./lib/WikiDB/*.php ./lib/plugin/*.php)
17 if [ -f TAGS ]; then /usr/bin/mv -f TAGS TAGS~; fi
18 /usr/bin/find . . \( -type d -regex '\(^\./lib/pear\)\|\(^\./lib/WikiDB/adodb\)\|\(^\./lib/nusoap\)\|\(^\./locale/.*/LC_MESSAGES\)' \) -prune -o -name \*.php -exec etags -a '{}' \;
24 DB_OPTS=-u$(DB_ADMINUSER) -p$(DB_ADMINPASS)
27 mysqladmin $(DB_OPTS) create $(DB_DB)
28 mysql $(DB_OPTS) -e "GRANT select,insert,update,delete,lock tables ON $(DB_DB).* \
29 TO $(DB_USER)@localhost IDENTIFIED BY '$(DB_PASS)';"
30 mysql $(DB_OPTS) $(DB_DB) < schemas/mysql.sql
36 createuser -D -A -P $(DB_USER)
38 createuser -D -A $(DB_USER)
40 psql $(DB_DB) -f schemas/psql.sql
44 sqlite $(DB_SQLITE_DBFILE) < schemas/sqlite.sql