Alan Pevec
2008-Sep-17 13:29 UTC
[Ovirt-devel] [PATCH ovirt-node-image] do not use empty variables
to avoid error: Macro %fedora_url has empty body Signed-off-by: Alan Pevec <apevec at redhat.com> --- Makefile | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 60fa9b4..969fa04 100644 --- a/Makefile +++ b/Makefile @@ -4,10 +4,13 @@ all: rpms include release.mk # FEDORA_URL env var can be set to the root of a fedora mirror +ifneq ($(FEDORA_URL),) +RPM_FLAGS += --define "fedora_url $(FEDORA_URL)" +endif # OVIRT_URL env var can be set to the root of an ovirt.org mirror -RPM_FLAGS += \ - --define "fedora_url $(FEDORA_URL)" \ - --define "ovirt_url $(OVIRT_URL)" +ifneq ($(OVIRT_URL),) +RPM_FLAGS += --define "ovirt_url $(OVIRT_URL)" +endif clean: rm -rf $(pkg_name)-* -- 1.5.5.1
Perry N. Myers
2008-Sep-17 17:14 UTC
[Ovirt-devel] [PATCH ovirt-node-image] do not use empty variables
Alan Pevec wrote:> to avoid error: Macro %fedora_url has empty bodyI changed this from ifneq when I fixed the ovirt-appliance repo. As soon as we move node-image to automake we won't be able to use ifneq and then we'll be back to what is here now... Perry> Signed-off-by: Alan Pevec <apevec at redhat.com> > --- > Makefile | 9 ++++++--- > 1 files changed, 6 insertions(+), 3 deletions(-) > > diff --git a/Makefile b/Makefile > index 60fa9b4..969fa04 100644 > --- a/Makefile > +++ b/Makefile > @@ -4,10 +4,13 @@ all: rpms > include release.mk > > # FEDORA_URL env var can be set to the root of a fedora mirror > +ifneq ($(FEDORA_URL),) > +RPM_FLAGS += --define "fedora_url $(FEDORA_URL)" > +endif > # OVIRT_URL env var can be set to the root of an ovirt.org mirror > -RPM_FLAGS += \ > - --define "fedora_url $(FEDORA_URL)" \ > - --define "ovirt_url $(OVIRT_URL)" > +ifneq ($(OVIRT_URL),) > +RPM_FLAGS += --define "ovirt_url $(OVIRT_URL)" > +endif > > clean: > rm -rf $(pkg_name)-*-- |=- Red Hat, Engineering, Emerging Technologies, Boston -=| |=- Email: pmyers at redhat.com -=| |=- Office: +1 412 474 3552 Mobile: +1 703 362 9622 -=| |=- GnuPG: E65E4F3D 88F9 F1C9 C2F3 1303 01FE 817C C5D2 8B91 E65E 4F3D -=|