Shlomi Fish <[EMAIL PROTECTED]> writes:

> I just don't want $(OSVN_BACKUP_DIR) to be built times and again.

Don't use directories and targets or prerequisites. Stick to .PHONY
targets and, if needed, timestamp files, as suggested by Shachar.

Does this work for you (UNTESTED)?

STAMP = $(shell date "+%Y-%m-%d")
YS = $(shell date +%Y)/$(STAMP)

BACKUP_DIR = $(HOME)/Backup/Backup/$(YS)/disk-fs
EXTRA_DATA_DIR = $(HOME)/Backup/extra-data/$(YS)/disk-fs
OSVN_ORIG_DIR = $(HOME)/Backup/svn-dumps/opensvn/svnsync-repos/
OSVN_BACKUP_DIR = $(BACKUP_DIR)/opensvn-dump

MKDIR := /bin/mkdir -p

make_backup_dir:
        $(MKDIR) $(BACKUP_DIR)

osvn: make_backup_dir
        # (cd $(OSVN_ORIG_DIR) ; bash sync-all.bash ; bash dump-all.bash)
        $(MKDIR) $(OSVN_BACKUP_DIR)
        # cp $(OSVN_ORIG_DIR)/DUMPS/*.gz $@/

PHONY: make_backup_dir osvn

-- 
Oleg Goldshmidt | [EMAIL PROTECTED]

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to