summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Kacur <jkacur@redhat.com>2012-03-23 02:07:16 +0100
committerJohn Kacur <jkacur@redhat.com>2012-03-23 02:15:31 +0100
commit3ff3300ba0dd4027ec64c0ef0c00585e681a55ea (patch)
treed8b31ff1fc5f1fec2ede6d48eb748a882ef989f7
parent6f2665250edf49194a4b383d0897050ee57c760d (diff)
downloadcyclictest-3ff3300ba0dd4027ec64c0ef0c00585e681a55ea.tar.gz
install: Fix failed to create symbolic link hwlatdetect file exists
The following build error can occur if you have done a previous make install if test -n "/usr/lib/python2.7/site-packages" ; then \ install -D -m 755 src/hwlatdetect/hwlatdetect.py /usr/lib/python2.7/site-packages/hwlatdetect.py ; \ ln -s /usr/lib/python2.7/site-packages/hwlatdetect.py "/usr/local/bin/hwlatdetect" ; \ fi ln: failed to create symbolic link `/usr/local/bin/hwlatdetect': File exists make: *** [install] Error 1 Fix the error by removing the symbolic link. Signed-off-by: John Kacur <jkacur@redhat.com>
-rw-r--r--Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index ff697ca..31e1792 100644
--- a/Makefile
+++ b/Makefile
@@ -125,6 +125,7 @@ install: all
cp $(TARGETS) "$(DESTDIR)$(bindir)"
if test -n "$(PYLIB)" ; then \
install -D -m 755 src/hwlatdetect/hwlatdetect.py $(DESTDIR)$(PYLIB)/hwlatdetect.py ; \
+ rm -f "$(DESTDIR)$(bindir)/hwlatdetect" ; \
ln -s $(PYLIB)/hwlatdetect.py "$(DESTDIR)$(bindir)/hwlatdetect" ; \
fi
install -D -m 644 src/backfire/backfire.c "$(DESTDIR)$(srcdir)/backfire/backfire.c"