Cannot install with makefile on Linux
xiota opened this issue · comments
Version
6d3b62c
Describe the bug
After successful make, attempting to install into an empty folder ($pkgdir
) with the following command fails:
make DESTDIR="$pkgdir" PREFIX="/usr" install
The problem is the install
command is missing the -D
argument to allow it to create new directories.
DiscImageCreator/DiscImageCreator/makefile
Lines 104 to 107 in 6d3b62c
May also be worth adding quotes around the path variables, in case they contain spaces.
install -Dm644 ../Release_ANSI/default.dat "$(DESTDIR)$(PREFIX)/share/$(TARGET)/default.dat"
install -Dm644 ../Release_ANSI/driveOffset.txt "$(DESTDIR)$(PREFIX)/share/$(TARGET)/driveOffset.txt"
install -Dm755 "$(TARGET)" "$(DESTDIR)$(PREFIX)/bin/$(TARGET)"
Could you test this makefile?
makefile.zip
Could you test this makefile? makefile.zip
Works.
I must have made some mistake when testing before. 1b5f152 is not working. From searching online, the tab character may be the cause. Replacing with spaces in that section allows it to work. But somehow, replacing all tabs in the file with spaces produces errors elsewhere)
ifeq (Linux,Linux)
/bin/sh: -c: line 1: syntax error near unexpected token `Linux,Linux'
/bin/sh: -c: line 1: `ifeq (Linux,Linux)'
make: *** [makefile:105: install] Error 2
fixed: removed the tab character
makefile.zip
The last makefile didn't work. I'm using a script that clones and builds the repo, and it's confusing to try to stop it midway to replace files. So I made the following fork/branch with a working (on Linux) make file:
It's merged. (#251)