saramibreak / DiscImageCreator

This is the disc (CD, GD, DVD, HD-DVD, BD, GC/Wii, XBOX, XBOX 360) and disk (Floppy, MO, USB etc) image creation tool

Home Page:http://forum.redump.org/topic/10483/discimagecreator/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot install with makefile on Linux

xiota opened this issue · comments

commented

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.

install:
install -m 0644 ../Release_ANSI/default.dat $(DESTDIR)$(PREFIX)/share/$(TARGET)/default.dat
install -m 0644 ../Release_ANSI/driveOffset.txt $(DESTDIR)$(PREFIX)/share/$(TARGET)/driveOffset.txt
install -m 0755 $(TARGET) $(DESTDIR)$(PREFIX)/bin/$(TARGET)

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

commented

Could you test this makefile? makefile.zip

Works.

commented

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

commented

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:

https://github.com/xiota/DiscImageCreator/tree/makefile

It's merged. (#251)