X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Makefile;h=e4239cb388558f6ddb6700f1f112747e18a11581;hb=refs%2Fheads%2F27;hp=c71305a54a2c9e46cdeb76c4dd9c7d878c3ca4e4;hpb=46f9157a34e535c8415bf9e03b03a5599ed106b4;p=linux-2.6.git diff --git a/Makefile b/Makefile index c71305a54..e4239cb38 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,10 @@ AWK = awk MD5SUM = md5sum SED = sed -SPECFILE = kernel-2.6-planetlab.spec +SPECFILE = kernel-2.6.spec + +# Thierry - when called from within the build, PWD is /build +PWD=$(shell pwd) # get nevr from specfile. ifndef NAME @@ -35,7 +38,7 @@ SOURCEFILES := $(shell cat sources 2>/dev/null | awk '{ print gensub("^.*/", "", sources: $(SOURCEFILES) $(TARGETS) $(SOURCEFILES): #FORCE - @if [ ! -e "$@" ] ; then $(CLIENT) $(get_sources_url) ; fi + @if [ ! -e "$@" ] ; then echo "$(CLIENT) $(get_sources_url)" ; $(CLIENT) $(get_sources_url) ; fi @if [ ! -e "$@" ] ; then echo "Could not download source file: $@ does not exist" ; exit 1 ; fi @if test "$$(md5sum $@ | awk '{print $$1}')" != "$(get_sources_md5)" ; then \ echo "md5sum of the downloaded $@ does not match the one from 'sources' file" ; \ @@ -75,3 +78,6 @@ srpm: sources TARGET ?= $(shell uname -m) rpm: sources rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps --target $(TARGET) -bb $(SPECFILE) + +clean: + rm -f *.rpm