Skip to content

Commit

Permalink
Fix installation of SDCC files for deb/ubuntu
Browse files Browse the repository at this point in the history
deb packages are built with a special libexecdir value, which makes
SDCC install some files in /usr/lib instead of /usr/z80-neogeo-ihx/lib
Since SDCC4.4 we no longer build support library or C library for the
z80, and on ubuntu this breaks later cleanup steps in install targets.
Update the install targets to fix installation on all supported
nightly packages (deb, rpm, brew, msys2).
  • Loading branch information
dciabrin committed Mar 19, 2024
1 parent c603ed5 commit a32ff22
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -369,16 +369,18 @@ install-ngsdcc: $(BUILD)/ngsdcc
rm -rf "$(DESTDIR)$(prefix)/z80-neogeo-ihx/include/asm/$$d"; \
rm -rf "$(DESTDIR)$(prefix)/z80-neogeo-ihx/include/$$d"; \
done && \
find $(DESTDIR)$(prefix)/z80-neogeo-ihx/lib/ -mindepth 1 -type d -empty -delete && \
mkdir -p $(DESTDIR)$(prefix)/z80-neogeo-ihx/bin && \
(cd $(DESTDIR)$(prefix)/bin; \
if [ -d "$(DESTDIR)$(prefix)/z80-neogeo-ihx/lib" ]; then \
find "$(DESTDIR)$(prefix)/z80-neogeo-ihx/lib" -mindepth 1 -type d -empty -delete; \
fi && \
mkdir -p "$(DESTDIR)$(prefix)/z80-neogeo-ihx/bin" && \
(cd "$(DESTDIR)$(prefix)/bin"; \
for f in `find . -name 'z80-neogeo-ihx-*'`; do \
fbase=`echo $$f | cut -d- -f4`; \
mv $$f $(DESTDIR)$(prefix)/z80-neogeo-ihx/bin/$$fbase; \
echo "#!/bin/sh" > $(DESTDIR)$(prefix)/bin/$$f; \
echo "PATH=$(prefix)/z80-neogeo-ihx/bin:\$$PATH" >> $(DESTDIR)$(prefix)/bin/$$f; \
echo "$(prefix)/z80-neogeo-ihx/bin/$$fbase \$$@" >> $(DESTDIR)$(prefix)/bin/$$f; \
chmod 755 $(DESTDIR)$(prefix)/bin/$$f; \
mv $$f "$(DESTDIR)$(prefix)/z80-neogeo-ihx/bin/$$fbase"; \
echo "#!/bin/sh" > "$(DESTDIR)$(prefix)/bin/$$f"; \
echo "PATH=$(prefix)/z80-neogeo-ihx/bin:\$$PATH" >> "$(DESTDIR)$(prefix)/bin/$$f"; \
echo "$(prefix)/z80-neogeo-ihx/bin/$$fbase \$$@" >> "$(DESTDIR)$(prefix)/bin/$$f"; \
chmod 755 "$(DESTDIR)$(prefix)/bin/$$f"; \
done)


Expand Down

0 comments on commit a32ff22

Please sign in to comment.