[systemd-devel] [PATCH] build: don't install busname units and target if kdbus support is disabled
Zbigniew Jędrzejewski-Szmek
zbyszek at in.waw.pl
Thu Sep 4 05:31:38 PDT 2014
On Thu, Sep 04, 2014 at 02:14:23PM +0200, Michael Biebl wrote:
> 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.
What about folding the first case into the grep pattern then?
> >> +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?
Yes, please.
Zbyszek
More information about the systemd-devel
mailing list