From: Lennart Poettering Date: Mon, 3 Mar 2014 22:47:40 +0000 (+0100) Subject: build-sys: work around broken ln --relative -s -f X-Git-Tag: v211~137 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=5e11d962c02d583f38991adc4eec78872ccb23e4 build-sys: work around broken ln --relative -s -f As it appears "ln -s --relative" in conjunction with "-f" is broken, let's work around that by explicitly remove the destination of the symlink before we create it. https://bugzilla.redhat.com/show_bug.cgi?id=1072103 --- diff --git a/Makefile.am b/Makefile.am index d4060579d..251b5d074 100644 --- a/Makefile.am +++ b/Makefile.am @@ -208,6 +208,7 @@ define move-to-rootlibdir $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \ so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \ so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \ + rm -f $(DESTDIR)$(libdir)/$$libname && \ $(LN_S) --relative -f $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \ mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \ fi @@ -311,6 +312,10 @@ AM_V_LN = $(AM_V_LN_$(V)) AM_V_LN_ = $(AM_V_LN_$(AM_DEFAULT_VERBOSITY)) AM_V_LN_0 = @echo " LN " $@; +AM_V_RM = $(AM_V_RM_$(V)) +AM_V_RM_ = $(AM_V_RM_$(AM_DEFAULT_VERBOSITY)) +AM_V_RM_0 = @echo " RM " $@; + # ------------------------------------------------------------------------------ rootbin_PROGRAMS = \ systemctl \ @@ -1859,6 +1864,7 @@ systemd_dbus1_generator_LDADD = \ dbus1-generator-install-hook: $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(usergeneratordir) + $(AM_V_RM)rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator dbus1-generator-uninstall-hook: @@ -1989,6 +1995,7 @@ systemd_bus_proxyd_LDADD = \ bus-proxyd-install-hook: $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(bindir) + $(AM_V_RM)rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(rootlibexecdir)/systemd-bus-proxyd $(DESTDIR)$(bindir)/systemd-stdio-bridge bus-proxyd-uninstall-hook: