From 652b0153c5489c6054058fc0db86e0176fee131b Mon Sep 17 00:00:00 2001 From: ShaRose Date: Sun, 15 Oct 2017 19:41:19 -0230 Subject: [PATCH] makefile: fix dangling symlink in uninstall Fix symbolic links so they are now relative, and also removes a dangling symlink that was left there with make uninstall (libhttp_parser.so was left pointing to a non-existant file previously). Don't hard-code the library name, match the file names of `make install`. PR-URL: https://github.com/nodejs/http-parser/pull/391 Reviewed-By: James M Snell Reviewed-By: Fedor Indutny --- Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index c332167..8b7b9bb 100644 --- a/Makefile +++ b/Makefile @@ -133,19 +133,20 @@ tags: http_parser.c http_parser.h test.c install: library $(INSTALL) -D http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h $(INSTALL) -D $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME) - ln -s $(LIBDIR)/$(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME) - ln -s $(LIBDIR)/$(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SOLIBNAME).$(SOEXT) + ln -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME) + ln -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SOLIBNAME).$(SOEXT) install-strip: library $(INSTALL) -D http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h $(INSTALL) -D -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME) - ln -s $(LIBDIR)/$(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME) - ln -s $(LIBDIR)/$(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SOLIBNAME).$(SOEXT) + ln -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME) + ln -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SOLIBNAME).$(SOEXT) uninstall: rm $(DESTDIR)$(INCLUDEDIR)/http_parser.h + rm $(DESTDIR)$(LIBDIR)/$(SOLIBNAME).$(SOEXT) rm $(DESTDIR)$(LIBDIR)/$(SONAME) - rm $(LIBDIR)/libhttp_parser.so + rm $(DESTDIR)$(LIBDIR)/$(LIBNAME) clean: rm -f *.o *.a tags test test_fast test_g \