On 5/1/06, Eddy Petrişor <[EMAIL PROTECTED]> wrote:
I have been working on this, but it seems that my Makefile knowledge is not enough for me to do it properly. I have this (see below) section in the rules file but the variable VERSION is not expanded in the sed command. Help would be appreciated.
Index: Makefile =================================================================== --- Makefile (revision 41) +++ Makefile (working copy) @@ -15,9 +15,15 @@ MANPAGE= apt-zip.8 MANLINKS= ${SCRIPTS:=.8} ${SSCRIPTS:=.8} -all: ${MANPAGE} +all: ${MANPAGE} build -install: +build: + VERSION=$(shell dpkg-parsechangelog | grep 'Version: ' | cut -f2 -d' ') +# @echo $(value VERSION) + sed "s/^[[:space:]]*\(APTZIPVERSION=\).*$$/\1$(VERSION)/" <common.sh.in >common.sh + sed s/APTZIPVERSION=.*$$/$(value VERSION)/ <common.sh.in common.sh
^^^^^^^^^^^^^^^^^^^^ Please ignore this line, it was added for testing purposes. Only the one above is meaningful. The problem is that the issued commands by make are in fact: VERSION=0.14 sed "s/^[[:space:]]*\(APTZIPVERSION=\).*$/\1/" <common.sh.in >common.sh instead of (at least what I expected): VERSION=0.14 sed "s/^[[:space:]]*\(APTZIPVERSION=\).*$/\10.14/" <common.sh.in >common.sh
+ +install: build install -d ${BINDIR} ${SBINDIR} ${CONFDIR} ${SHAREDIR} ${METHDIR} ${MAN8DIR} install -m755 ${SCRIPTS} ${BINDIR} @@ -32,6 +38,9 @@ clean: rm -f manpage.* ${MANPAGE} + rm -f common.sh apt-zip.8: apt-zip.sgml docbook2man apt-zip.sgml + +.PHONY: clean, build, install -- Regards, EddyP ============================================= "Imagination is more important than knowledge" A.Einstein
-- Regards, EddyP ============================================= "Imagination is more important than knowledge" A.Einstein