Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile doesn't compile #5

Open
hackerb9 opened this issue Oct 10, 2019 · 1 comment
Open

Makefile doesn't compile #5

hackerb9 opened this issue Oct 10, 2019 · 1 comment

Comments

@hackerb9
Copy link

Bug 1: It is usually expected that make (with no arguments) will recompile the binaries from the source code. However, instead the Makefile prints an error suggesting the user run make package, make install, or make clean.

Bug 2: make clean ought to delete the binaries so that they will be rebuilt from source.

Bug 3: make install should depend on the binaries so that they will be rebuilt from source if they are missing.

@hackerb9
Copy link
Author

hackerb9 commented Oct 10, 2019

Here's a minimal patch would maybe fix the problems. It's not ideal and I haven't been able to test it fully because compilation fails with gcc-8.3, but it's a start.

diff --git a/Makefile b/Makefile
index aa51c18..02e00b8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,19 @@
 VERSION=$(shell gawk '/^VERSION/ {print $1}' bin/mksdiso | cut -f2 -d\")
 BUILD_DIR=build/mksdiso-$(VERSION)-all
 
-default:
+default: build
+
+help:
 	@echo "Usage: make <package|install|clean>"
 	@echo "   package | Build debian Package"
 	@echo "   install | install to /usr/local/bin"
 	@echo "   clean   | cleanup package build directory"
 	exit 0
 
-package:
+build:
+	cd src; make
+
+package: build
 	mkdir -p $(BUILD_DIR)/usr/bin $(BUILD_DIR)/usr/share/mksdiso $(BUILD_DIR)/DEBIAN
 	cp debian/control $(BUILD_DIR)/DEBIAN/
 	cp bin/* $(BUILD_DIR)/usr/bin/
@@ -18,7 +23,7 @@ package:
 	dpkg-deb --build $(BUILD_DIR)
 
 # Local install, modifes mksdiso-data-path to /usr/local/share/mksdiso
-install:
+install: build
 	cp -r bin/* /usr/local/bin/
 	sed -i 's/^DATADIR=.*/DATADIR=\/usr\/local\/share\/mksdiso/' /usr/local/bin/mksdiso
 	mkdir -p /usr/local/share || true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant