[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Ovirt-devel] [PATCH ovirt-node-image] do not use empty variables



"Perry N. Myers" <pmyers redhat com> wrote:
> Alan Pevec wrote:
>> to avoid error: Macro %fedora_url has empty body
>
> I 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...
...
>> +ifneq ($(FEDORA_URL),)
>> +RPM_FLAGS += --define "fedora_url $(FEDORA_URL)"
>> +endif
...

Here's a work-around that relies on GNU make's $(if construct,
and that will work even once we autoconfiscate.

I'll test it once my F9 system is back.

>From 645dbb00c1645e9fb658ef1b6e76ad7f3db984c0 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering redhat com>
Date: Thu, 18 Sep 2008 10:46:32 +0200
Subject: [PATCH node-image] do not use empty variables

to avoid this warning: Macro %fedora_url has empty body

Use GNU make's "$(if..." syntax rather than "ifneq ...",
so that it'll still work once we convert to automake.
---
 Makefile |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 60fa9b4..d8affac 100644
--- a/Makefile
+++ b/Makefile
@@ -3,11 +3,11 @@ pkg_name = ovirt-node-image
 all: rpms
 include release.mk

-# FEDORA_URL env var can be set to the root of a fedora mirror
 # 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)"
+RPM_FLAGS += $(if $(OVIRT_URL),--define "ovirt_url $(OVIRT_URL)",)
+
+# FEDORA_URL env var can be set to the root of a fedora mirror
+RPM_FLAGS += $(if $(FEDORA_URL),--define "fedora_url $(FEDORA_URL)",)

 clean:
 	rm -rf $(pkg_name)-*
--
1.6.0.2.229.g1293c


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]