mirror of
https://github.com/janet-lang/janet
synced 2024-11-28 11:09:54 +00:00
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>
This commit is contained in:
parent
221d71d07b
commit
e422abc269
2
Makefile
2
Makefile
@ -283,7 +283,7 @@ install: $(JANET_TARGET) $(JANET_LIBRARY) $(JANET_STATIC_LIBRARY) build/janet.pc
|
|||||||
cp $(JANET_TARGET) '$(DESTDIR)$(BINDIR)/janet'
|
cp $(JANET_TARGET) '$(DESTDIR)$(BINDIR)/janet'
|
||||||
mkdir -p '$(DESTDIR)$(INCLUDEDIR)/janet'
|
mkdir -p '$(DESTDIR)$(INCLUDEDIR)/janet'
|
||||||
cp -r build/janet.h '$(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)$(JANET_PATH)'
|
||||||
mkdir -p '$(DESTDIR)$(LIBDIR)'
|
mkdir -p '$(DESTDIR)$(LIBDIR)'
|
||||||
if test $(UNAME) = Darwin ; then \
|
if test $(UNAME) = Darwin ; then \
|
||||||
|
Loading…
Reference in New Issue
Block a user