# Makefile for installing scripts into $(DEST) METHOD=working DEST=/usr/local/bin SCRIPTS=mx transfer SCRIPT_MODE=555 .PHONY: install install_scripts install: $(DEST) install_scripts $(DEST)/README.txt $(DEST): install -d $@ install_scripts: install_scripts_$(METHOD) .PHONY: install_scripts_working install_scripts_svn install_scripts_working: $(SCRIPTS:%=$(DEST)/%) # could also use --owner=root and/or --group=staff (possibly depending upon whether $(DEST) has been overridden) # for Python, could use "sed '1s@^#! /usr/bin/python$@& -O@'" instead of install $(DEST)/%: %.py install --mode=$(SCRIPT_MODE) --preserve-timestamps $(INSTALL_OPTS) \ $< $@ $(DEST)/%: % install --mode=$(SCRIPT_MODE) --preserve-timestamps $(INSTALL_OPTS) \ $< $(DEST)/$(> $@ @echo "installed here from source control work directories. DO NOT EDIT THEM." >> $@ @echo README.txt installed .PHONY: subdirs $(SUBDIRS) subdirs: $(MAKE) -C $@ # place prerequistes determining any ordering for subdirs here