From: Patrik Gornicz Date: Sun, 16 Nov 2008 02:11:12 +0000 (-0500) Subject: copying of config files X-Git-Tag: v0.07~2 X-Git-Url: http://gitweb.pgornicz.com/gitweb.cgi?p=physics.git;a=commitdiff_plain;h=37a74d97c92a1f2b934c5076911ff592c4e1092e copying of config files --- diff --git a/src/Makefile b/src/Makefile index bcdb416..3253d18 100644 --- a/src/Makefile +++ b/src/Makefile @@ -39,9 +39,17 @@ TARGETNAME := run_physics TARGETTMP := ${OBJSDIR}${TARGETNAME} TARGET := ${WORKINGDIR}${TARGETNAME} +CONFIGDIRNAME := configs/ +CONFIGDIR := ../${CONFIGDIRNAME} +CONFIGDEST := ${WORKINGDIR}${CONFIGDIRNAME} + +CONFIGS := # := start +CONFIGS += keys.cfg +CONFIGS := $(addprefix ${CONFIGDEST},${CONFIGS}) + DEPSBLDDIRS := $(addprefix ${DEPSDIR},${DIRS}) OBJSBLDDIRS := $(addprefix ${OBJSDIR},${DIRS}) -BLDDIRS := ${OBJSBLDDIRS} ${DEPSBLDDIRS} ${WORKINGDIR} +BLDDIRS := ${OBJSBLDDIRS} ${DEPSBLDDIRS} ${WORKINGDIR} ${CONFIGDEST} VERBOSE := 0 @@ -59,12 +67,17 @@ else endif .PHONY: all -all: ${TARGET} +all: ${TARGET} ${CONFIGS} + +# rule to copy the config files into the working directory +${CONFIGDEST}%.cfg: ${CONFIGDIR}%.cfg | ${CONFIGDIR} ${WORKINGDIR} + ${Q1}echo "cp: $@" + ${Q2}cp -r $< $@ # rule to copy tmp target to working directory ${TARGET}: ${TARGETTMP} | ${WORKINGDIR} ${Q1}echo "cp: $@" - ${Q2}cp $^ $@ + ${Q2}cp $< $@ # how to link the main target ${TARGETTMP}: ${OBJS}