[systemd-devel] [PATCH] build: don't install busname units and target if kdbus support is disabled

Michael Biebl mbiebl at gmail.com
Thu Sep 4 05:14:23 PDT 2014


Hi,

2014-09-04 6:16 GMT+02:00 Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>:
> On Wed, Sep 03, 2014 at 11:51:58PM +0200, Michael Biebl wrote:

>>  define add-wants
>> -     [ -z "$$what" ] || ( \
>> +     [ -z "$$what" ] || ! echo $$what | grep -q '[^[:space:]]' || ( \
> Maybe we could use something simpler like
>         [[ $what =~ ^[[:space:]]*$ ]] || ( \

I didn't want to use a bash specific feature here, since /bin/sh is
not guaranteed to point to bash.
So I guess using grep is the safer choice and I'd like to keep that as is.

>> +if ENABLE_KDBUS
>> +dist_systemunit_DATA += \
>> +     units/busnames.target
>> +endif
> This is quite intrusive. Maybe another layer of indirection would help:



>> +if ENABLE_KDBUS
>>  BUSNAMES_TARGET_WANTS += \
>>       org.freedesktop.hostname1.busname
>> +endif
> And similarly with this one: if the line in add-wants using
> $(BUSNAMES_TARGET_WANTS) could be made conditional, it would be
> the only place to modify.


I used that, since this was already used for
org.freedesktop.systemd1.busname, i.e.

if ENABLE_KDBUS
dist_systemunit_DATA += \
        units/org.freedesktop.systemd1.busname

BUSNAMES_TARGET_WANTS += \
        org.freedesktop.systemd1.busname
endif


Do you want me to rework everything, including
org.freedesktop.systemd1.busname, based on your suggestion?


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?


More information about the systemd-devel mailing list