Re: cvs: pearweb /sql Makefile package_stats.res package_stats.sql

From: Date: Tue, 18 Jun 2002 13:33:03 +0000
Subject: Re: cvs: pearweb /sql Makefile package_stats.res package_stats.sql
References: 1  Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-4677@lists.php.net to get a copy of this message
Hi Richard, The package_stats.res file should not be in CVS, it's just a timestamp file used by make. - Stig On Tue, 2002-06-18 at 12:43, Richard Heyes wrote: > richard Tue Jun 18 06:43:45 2002 EDT > > Added files: > /pearweb/sql package_stats.res package_stats.sql > > Modified files: > /pearweb/sql Makefile > Log: > * Added package_stats table > > > ---- > > Index: pearweb/sql/Makefile > diff -u pearweb/sql/Makefile:1.18 pearweb/sql/Makefile:1.19 > --- pearweb/sql/Makefile:1.18 Mon May 27 21:50:49 2002 > +++ pearweb/sql/Makefile Tue Jun 18 06:43:44 2002 > @@ -1,119 +1,120 @@ > -# > -# +----------------------------------------------------------------------+ > -# | PHP version 4.0 | > -# +----------------------------------------------------------------------+ > -# | Copyright (c) 1999, 2000 The PHP Group | > -# +----------------------------------------------------------------------+ > -# | This source file is subject to version 2.02 of the PHP license, | > -# | that is bundled with this package in the file LICENSE, and is | > -# | available at through the world-wide-web at | > -# | http://www.php.net/license/2_02.txt. > | > -# | If you did not receive a copy of the PHP license and are unable to | > -# | obtain it through the world-wide-web, please send a note to | > -# | license@php.net so we can mail you a copy immediately. | > -# +----------------------------------------------------------------------+ > -# | Authors: Stig Bakken <ssb@fast.no> | > -# | | > -# +----------------------------------------------------------------------+ > -# > - > -TABLE_FILES=\ > - cvs_acl.sql \ > - cvs_groups.sql \ > - cvs_group_membership.sql \ > - downloads.sql \ > - files.sql \ > - package_acl.sql \ > - maintains.sql \ > - categories.sql \ > - packages.sql \ > - provides.sql \ > - releases.sql \ > - deps.sql \ > - notes.sql \ > - users.sql > -SQL_TYPE=mysql > -SQL_USER=pear > -SQL_PW=pear > -SQL_MYSQLPW=-p$(SQL_PW) > -SQL_DB=pear > -SQL_COMMAND=mysql -u '$(SQL_USER)' $(SQL_MYSQLPW) '$(SQL_DB)' < $< > > $@ 2>&1 > -SQL_PIPE_COMMAND=mysql -u '$(SQL_USER)' $(SQL_MYSQLPW) '$(SQL_DB)' > -SQL_ADMIN_COMMAND=mysql -u root mysql > -SQL_GRANT_FILE= > - > -ECHO = echo > -TOUCH = touch > - > -MISC_FILES=$(SQL_GRANT_FILE) > -SQL_FILES=$(TABLE_FILES) $(MISC_FILES) > - > -TABLE_TARGETS=$(TABLE_FILES:.sql=.res) > -MISC_TARGETS=$(MISC_FILES:.sql=.res) > -SQL_TARGETS=$(TABLE_TARGETS) $(MISC_TARGETS) > - > -CLEANFILES = *.res *.out *~ > - > -all: nothing > - > -nothing: > - @$(ECHO) > - @$(ECHO) " Make what?" > - @$(ECHO) > - @$(ECHO) " 'make create' to set up database from scratch" > - @$(ECHO) " 'make destroy' to destroy database" > - @$(ECHO) > - > -create: createdb $(SQL_TARGETS) prime > - @echo "Looking for errors..." > - @if grep -s Error *.res; then \ > - echo "Fix these errors, run 'make destroy' and try again." ; \ > - else \ > - echo "No errors found." ; \ > - fi > - > -prime: > - @php -q data.php $(SQL_TYPE) $(SQL_USER) $(SQL_PW) $(SQL_DB) > - > -createdb: > - @$(SQL_ADMIN_COMMAND) < createdb.sql > - > -dropdb: > - @$(SQL_ADMIN_COMMAND) < dropdb.sql > - > -destroy: dropdb clean > -# Do "make drop" enough times to "solve" those who won't go away > because > -# of foreign keys to other tables that still exist. > -# $(MAKE) -s drop > - > -drop: clean > - cat $(SQL_FILES) | ./create2drop -$(SQL_TYPE) | $(SQL_PIPE_COMMAND) > drop.out > - > -clean: > - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) > - > -test: > - @echo targets: $(SQL_TARGETS) > - > -%.res: %.sql > - @echo -n "processing $<..." > - @$(SQL_COMMAND) > - @echo > - > -# Specify dependencies between tables (by use of foreign keys) as > -# dependencies between their respective .res files here. For example, > -# if the table "foo" has foreign keys to the table "bar", add > -# "foo.res: bar.res". > - > -package_acl.res: packages.res users.res > -maintains.res: packages.res users.res > -packages.res: users.res categories.res > -releases.res: packages.res > -deps.res: packages.res > -users.res: > -notes.res: packages.res users.res > -categories.res: > -cvs_acl.res: users.res cvs_groups.res > -cvs_groups.res: > -cvs_group_membership.res: users.res cvs_groups.res > -provides.res: releases.res > +# > +# +----------------------------------------------------------------------+ > +# | PHP version 4.0 | > +# +----------------------------------------------------------------------+ > +# | Copyright (c) 1999, 2000 The PHP Group | > +# +----------------------------------------------------------------------+ > +# | This source file is subject to version 2.02 of the PHP license, | > +# | that is bundled with this package in the file LICENSE, and is | > +# | available at through the world-wide-web at | > +# | http://www.php.net/license/2_02.txt. > | > +# | If you did not receive a copy of the PHP license and are unable to | > +# | obtain it through the world-wide-web, please send a note to | > +# | license@php.net so we can mail you a copy immediately. | > +# +----------------------------------------------------------------------+ > +# | Authors: Stig Bakken <ssb@fast.no> | > +# | | > +# +----------------------------------------------------------------------+ > +# > + > +TABLE_FILES=\ > + cvs_acl.sql \ > + cvs_groups.sql \ > + cvs_group_membership.sql \ > + downloads.sql \ > + files.sql \ > + package_acl.sql \ > + maintains.sql \ > + categories.sql \ > + packages.sql \ > + package_stats.sql \ > + provides.sql \ > + releases.sql \ > + deps.sql \ > + notes.sql \ > + users.sql > +SQL_TYPE=mysql > +SQL_USER=pear > +SQL_PW=pear > +SQL_MYSQLPW=-p$(SQL_PW) > +SQL_DB=pear > +SQL_COMMAND=mysql -u '$(SQL_USER)' $(SQL_MYSQLPW) '$(SQL_DB)' < $< > > $@ 2>&1 > +SQL_PIPE_COMMAND=mysql -u '$(SQL_USER)' $(SQL_MYSQLPW) '$(SQL_DB)' > +SQL_ADMIN_COMMAND=mysql -u root mysql > +SQL_GRANT_FILE= > + > +ECHO = echo > +TOUCH = touch > + > +MISC_FILES=$(SQL_GRANT_FILE) > +SQL_FILES=$(TABLE_FILES) $(MISC_FILES) > + > +TABLE_TARGETS=$(TABLE_FILES:.sql=.res) > +MISC_TARGETS=$(MISC_FILES:.sql=.res) > +SQL_TARGETS=$(TABLE_TARGETS) $(MISC_TARGETS) > + > +CLEANFILES = *.res *.out *~ > + > +all: nothing > + > +nothing: > + @$(ECHO) > + @$(ECHO) " Make what?" > + @$(ECHO) > + @$(ECHO) " 'make create' to set up database from scratch" > + @$(ECHO) " 'make destroy' to destroy database" > + @$(ECHO) > + > +create: createdb $(SQL_TARGETS) prime > + @echo "Looking for errors..." > + @if grep -s Error *.res; then \ > + echo "Fix these errors, run 'make destroy' and try again." ; \ > + else \ > + echo "No errors found." ; \ > + fi > + > +prime: > + @php -q data.php $(SQL_TYPE) $(SQL_USER) $(SQL_PW) $(SQL_DB) > + > +createdb: > + @$(SQL_ADMIN_COMMAND) < createdb.sql > + > +dropdb: > + @$(SQL_ADMIN_COMMAND) < dropdb.sql > + > +destroy: dropdb clean > +# Do "make drop" enough times to "solve" those who won't go away > because > +# of foreign keys to other tables that still exist. > +# $(MAKE) -s drop > + > +drop: clean > + cat $(SQL_FILES) | ./create2drop -$(SQL_TYPE) | $(SQL_PIPE_COMMAND) > drop.out > + > +clean: > + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) > + > +test: > + @echo targets: $(SQL_TARGETS) > + > +%.res: %.sql > + @echo -n "processing $<..." > + @$(SQL_COMMAND) > + @echo > + > +# Specify dependencies between tables (by use of foreign keys) as > +# dependencies between their respective .res files here. For example, > +# if the table "foo" has foreign keys to the table "bar", add > +# "foo.res: bar.res". > + > +package_acl.res: packages.res users.res > +maintains.res: packages.res users.res > +packages.res: users.res categories.res > +releases.res: packages.res > +deps.res: packages.res > +users.res: > +notes.res: packages.res users.res > +categories.res: > +cvs_acl.res: users.res cvs_groups.res > +cvs_groups.res: > +cvs_group_membership.res: users.res cvs_groups.res > +provides.res: releases.res > > Index: pearweb/sql/package_stats.res > +++ pearweb/sql/package_stats.res > > Index: pearweb/sql/package_stats.sql > +++ pearweb/sql/package_stats.sql > CREATE TABLE package_stats ( > dl_number mediumint(8) unsigned NOT NULL default '0', > package varchar(80) NOT NULL default '', > release varchar(20) NOT NULL default '', > pid int(11) NOT NULL default '0', > rid int(11) NOT NULL default '0', > cid int(11) NOT NULL default '0' > ) TYPE=MyISAM; > > ---- > > -- > PEAR CVS Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- Stig Sæther Bakken, Fast Search & Transfer ASA, Trondheim, Norway http://pear.php.net/wishlist.php/ssb

« previous php.pear.cvs (#4677) next »