Skip to content

Commit

Permalink
Merge pull request icecc#27 from llunak/master
Browse files Browse the repository at this point in the history
do not provide clang symlinks unless clang is installed
  • Loading branch information
coolo committed Jan 8, 2013
2 parents 168d4e9 + ea9e650 commit 33d42d2
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ install-exec-local:
$(LN_S) $(bindir)/icecc $(DESTDIR)$(bindir)/icerun

$(mkinstalldirs) $(DESTDIR)$(pkglibexecdir)/bin
for link in g++ gcc c++ cc clang++ clang; do \
for link in g++ gcc c++ cc $(CLANG_SYMLINK_WRAPPERS); do \
rm -f $(DESTDIR)$(pkglibexecdir)/bin/$$link ;\
$(LN_S) $(bindir)/icecc $(DESTDIR)$(pkglibexecdir)/bin/$$link ;\
done

uninstall-local:
rm $(DESTDIR)$(bindir)/icerun

for link in g++ gcc c++ cc clang++ clang; do \
for link in g++ gcc c++ cc $(CLANG_SYMLINK_WRAPPERS); do \
rm $(DESTDIR)$(pkglibexecdir)/bin/$$link ;\
done
17 changes: 17 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,23 @@ else
fi
fi

AC_ARG_ENABLE(clang-wrappers,
AS_HELP_STRING([--enable-clang-wrappers],
[Use symlink wrappers for clang/clang++.]))

CLANG_SYMLINK_WRAPPERS=
if test "$enable_clang_wrappers" = "yes"; then
CLANG_SYMLINK_WRAPPERS='clang clang++'
elif test "$enable_clang_wrappers" = "no"; then
true # do not enable
else
AC_CHECK_PROG(CLANG,clang,clang)
if test -n "$CLANG"; then
CLANG_SYMLINK_WRAPPERS='clang clang++'
fi
fi
AC_SUBST(CLANG_SYMLINK_WRAPPERS)

AC_CONFIG_FILES([ Makefile ])
AC_CONFIG_FILES([ client/Makefile ])
AC_CONFIG_FILES([ daemon/Makefile ])
Expand Down
24 changes: 24 additions & 0 deletions suse/icecream.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ Requires: libstdc++-devel
%description -n libicecream-devel
icecream is the next generation distcc.

%package -n icecream-clang-wrappers
Summary: Distributed Compile Wrappers for Clang
Group: Development/Tools/Building
Requires: clang
Requires: icecream
Supplements: packageand(icecream:clang)

%description -n icecream-clang-wrappers
Wrapper symlinks for clang/clang++ for icecream distributed building.

%prep
%setup -q -n icecc-%{version}
# DO NOT ADD PATCHES without github reference
Expand All @@ -61,6 +71,7 @@ export CXXFLAGS="$RPM_OPT_FLAGS"
%configure \
%if 0%{?suse_version} >= 1230
--enable-clang-rewrite-includes \
--enable-clang-wrappers \
%endif
--libexecdir %_libexecdir
make %{?jobs:-j %jobs}
Expand Down Expand Up @@ -105,11 +116,15 @@ rm -rf -- %_localstatedir/cache/icecream/*
%_sbindir/rcicecream
%_mandir/man*/*
%_libexecdir/icecc
%exclude %_libexecdir/icecc/bin/clang
%exclude %_libexecdir/icecc/bin/clang++
%if 0%{?suse_version}
%_sysconfdir/sysconfig/SuSEfirewall2.d/services/*
%_localstatedir/adm/fillup-templates/sysconfig.icecream
%if 0%{?suse_version} <= 1220
/opt/icecream
%exclude /opt/icecream/bin/clang
%exclude /opt/icecream/bin/clang++
%endif
%endif
%attr(-,icecream,icecream) %_localstatedir/cache/icecream
Expand All @@ -121,4 +136,13 @@ rm -rf -- %_localstatedir/cache/icecream/*
%_libdir/libicecc.*
%_libdir/pkgconfig/icecc.pc

%files -n icecream-clang-wrappers
%defattr(-,root,root)
%_libexecdir/icecc/bin/clang
%_libexecdir/icecc/bin/clang++
%if 0%{?suse_version} <= 1220
/opt/icecream/bin/clang
/opt/icecream/bin/clang++
%endif

%changelog

0 comments on commit 33d42d2

Please sign in to comment.