#!/usr/bin/amake #echo #echo Alexis Backup #echo #echo This makefile will copy all sorts of files which Alexis #echo wants to backup once in a while #echo .SILENT: SRC=/home/alexis DST=/home/backup/users/alexis ## print a message at the start .FIRST: @echo @echo "Starting copy..." @echo ## print a message once we're all done .LAST: @echo @echo "Done!" @echo ## ## M2OSW development packages ## NOTE: it is necessary to do a make tar in the webdev ## directory first ## M2OSWDEV_SRC:=$(SRC)/webdev M2OSWDEV_PACKAGES:=$(wildcard $(M2OSWDEV_SRC)/packages/*.gz) \ $(M2OSWDEV_SRC)/packages/install-packages $(M2OSWDEV_PACKAGES:$(M2OSWDEV_SRC)/*=$(DST)/*): $(.TARGET:$(DST)/*=$(M2OSWDEV_SRC)/*) .MAIN @echo "Copying: $(.FIRSTSRC)" cp -f $(.FIRSTSRC) $(.TARGET) ## ## The mod_stats module and scripts/graphics ## MODSTATS_SRC:=$(SRC)/tools/apache/counters/stats MODSTATS_PACKAGES:=$(wildcard $(MODSTATS_SRC)/packages/*.gz) $(MODSTATS_PACKAGES:$(MODSTATS_SRC)/*=$(DST)/*): $(.TARGET:$(DST)/*=$(MODSTATS_SRC)/*) .MAIN @echo "Copying: $(.FIRSTSRC)" cp -f $(.FIRSTSRC) $(.TARGET) ## ## M2OSW accounting (we need a solution with spaces...) ## ACCOUNTING_SRC:="$(SRC)/m2osw/accounting" accounting: .MAIN .PHONY @echo "Copying: accounting" cp -vau $(ACCOUNTING_SRC) $(DST) ## ## FHF page ## FHF_SRC:=$(SRC)/fhf FHF_PACKAGE:=$(FHF_SRC)/package.tar.gz FHF_FILES:=$(shell find $(FHF_SRC) -name '*\,v') $(FHF_PACKAGE): $(FHF_FILES) tar cvzf $(.TARGET) $(FHF_FILES) $(FHF_PACKAGE:$(FHF_SRC)/*=$(DST)/*): $(.TARGET:$(DST)/*=$(FHF_SRC)/*) .MAIN @echo "Copying: $(.FIRSTSRC)" cp -f $(.FIRSTSRC) $(.TARGET) ## ## Personal home page ## HOMEPAGE_SRC:=www HOMEPAGE_FILES:=$(wildcard $(HOMEPAGE_SRC)/home-page/* \ $(HOMEPAGE_SRC)/home-page/*/* \ $(HOMEPAGE_SRC)/home-page/gifs/*/*) $(HOMEPAGE_SRC)/home-page: .IGNORE @true $(HOMEPAGE_FILES:$(HOMEPAGE_SRC)/*=$(DST)/*): \ $(.TARGET:$(DST)/*=$(SRC)/$(HOMEPAGE_SRC)/*) .MAIN # Changed on Jun 18, 2004 -- seems that is what generates a complete copy # of sub-directories... instead of single files within these directories # $(.TARGET::$(DST)/home-page/*/*=$(SRC)/$(HOMEPAGE_SRC)/home-page/*) .MAIN if test -d $(.FIRSTSRC) then if ! test -d $(.TARGET) then @echo "Creating directory: $(.TARGET)" mkdir -p $(.TARGET) fi else @echo "Copying: $(.FIRSTSRC)" cp -f $(.FIRSTSRC) $(.TARGET) fi