aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorStephen Hassard <steve@hassard.net>2022-07-02 08:35:29 -0700
committerStephen Hassard <steve@hassard.net>2022-07-02 08:52:17 -0700
commite422abc269e2ef377153066d44e198897b2550a7 (patch)
tree052fd14fa6ec7e6277e3f5c01ab48bc4762dac86 /Makefile
parentMerge pull request #993 from pepe/test-tabseq (diff)
Use relative path for include/janet.h symlink
When using make to build an rpm, the current symlink is created with an absolute path to the buildroot as causes the make install target to fail with: error: Symlink points to BuildRoot: /usr/include/janet.h -> /home/stephen/rpmbuild/BUILDROOT/janet-1.23.0-3.x86_64/usr/include/janet/janet.h We can create the link relatively which makes this more portable, where: ln -sf -t '/home/stephen/rpmbuild/BUILDROOT/janet-1.23.0-3.x86_64/usr/include' janet.h janet/janet.h Resulting in the following symlink: ls -la BUILDROOT/usr/include/janet.h lrwxrwxrwx. 1 stephen stephen 13 Jul 2 08:17 BUILDROOT/usr/include/janet.h -> janet/janet.h This symlink can then be properly packaged without path issues. Signed-off-by: Stephen Hassard <steve@hassard.net>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 0fdcb64d..e49349ee 100644
--- a/Makefile
+++ b/Makefile
@@ -283,7 +283,7 @@ install: $(JANET_TARGET) $(JANET_LIBRARY) $(JANET_STATIC_LIBRARY) build/janet.pc
cp $(JANET_TARGET) '$(DESTDIR)$(BINDIR)/janet'
mkdir -p '$(DESTDIR)$(INCLUDEDIR)/janet'
cp -r build/janet.h '$(DESTDIR)$(INCLUDEDIR)/janet'
- ln -sf '$(DESTDIR)$(INCLUDEDIR)/janet/janet.h' '$(DESTDIR)$(INCLUDEDIR)/janet.h'
+ ln -sf -t '$(DESTDIR)$(INCLUDEDIR)' janet.h janet/janet.h
mkdir -p '$(DESTDIR)$(JANET_PATH)'
mkdir -p '$(DESTDIR)$(LIBDIR)'
if test $(UNAME) = Darwin ; then \