--- trunk/Makefile 2005/08/21 13:44:20 55 +++ trunk/Makefile 2005/08/21 13:52:47 56 @@ -1,7 +1,8 @@ tmp=/tmp/backuppc-svn/ target=/data/backuppc/ -profile_opt=-d +profile_opt= profile_file=profile +db=backuppc all: @echo "make install to install BackupPC using sudo" @@ -34,13 +35,15 @@ profile: test test -e tmon.out || touch tmon.out sudo chown backuppc tmon.out + dropdb $(db) || echo "skip drop db" + createdb $(db) date > $(profile_file) echo "## NORMAL RUN" >> $(profile_file) - sudo -u backuppc /data/backuppc/bin/BackupPC_updatedb $(profile_opt) | tee -a $(profile_file) + sudo -u backuppc /data/backuppc/bin/BackupPC_updatedb -c $(profile_opt) | tee -a $(profile_file) echo "## DProf RUN" >> $(profile_file) - sudo -u backuppc perl -d:DProf /data/backuppc/bin/BackupPC_updatedb $(profile_opt) + sudo -u backuppc perl -d:DProf /data/backuppc/bin/BackupPC_updatedb -d $(profile_opt) dprofpp 2>&1 | tee -a $(profile_file) echo "## DBI_PROFILE RUN" >> $(profile_file) - DBI_PROFILE=2 sudo -u backuppc /data/backuppc/bin/BackupPC_updatedb $(profile_opt) 2>&1 | tee -a $(profile_file) + DBI_PROFILE=2 sudo -u backuppc /data/backuppc/bin/BackupPC_updatedb -d $(profile_opt) 2>&1 | tee -a $(profile_file) mv $(profile_file) profile.`perl -e 'my @p = glob("profile.[0-9]*"); print scalar @p + 1'`