Make: Added (Un) Install target#1
Closed
DanielTimLee wants to merge 1 commit intonamhyung:masterfrom
DanielTimLee:make/(un)install
Closed
Make: Added (Un) Install target#1DanielTimLee wants to merge 1 commit intonamhyung:masterfrom DanielTimLee:make/(un)install
DanielTimLee wants to merge 1 commit intonamhyung:masterfrom
DanielTimLee:make/(un)install
Conversation
namhyung
reviewed
Jan 20, 2019
Owner
namhyung
left a comment
There was a problem hiding this comment.
Sorry for being late! I generaly think it's not yet ready for normal users but we can improve.. :)
| prefix ?= /usr/local | ||
| bindir = $(prefix)/bin | ||
| _datadir = $(prefix)/share/$(TARGET) | ||
| datadir = $(_datadir)/$(DATA) |
Owner
There was a problem hiding this comment.
It's not a directory so name "datadir" is not correctly.
| gcc -o $@ $(CFLAGS) $^ $(LDFLAGS) | ||
|
|
||
| install: all | ||
| $(INSTALL) -m 755 $(TARGET) $(bindir) |
Owner
There was a problem hiding this comment.
I think -m 755 part has no meaning since it's the default. Also I'm not sure it works when "bindir" does not exist already.
Author
There was a problem hiding this comment.
Opt out -m 755, and added $(INSTALL) -d $(bindir)
This commit includes install, uninstall target. By (un)install target, dwarview binary will be (un)installed -> /usr/local/bin dwarview.glade will be (un)installed -> /usr/local/share/dwarview Signed-off-by: Daniel T. Lee <danieltimlee@gmail.com>
Author
|
Updated!
2019년 1월 20일 (일) 21:28, Namhyung Kim <notifications@github.com>님이 작성:
***@***.**** commented on this pull request.
Sorry for being late! I generaly think it's not yet ready for normal users
but we can improve.. :)
------------------------------
In Makefile
<#1 (comment)>:
> @@ -4,10 +4,28 @@ LDFLAGS := $(shell pkg-config --libs libdw gtk+-3.0)
# The -Wno-deprecated-declarations is needed due to dwarf_formref()
CFLAGS += -g -Wno-deprecated-declarations
-all: dwarview
+RM = rm -f
+INSTALL = install
+TARGET = dwarview
+DATA = $(TARGET).glade
+
+prefix ?= /usr/local
+bindir = $(prefix)/bin
+_datadir = $(prefix)/share/$(TARGET)
+datadir = $(_datadir)/$(DATA)
It's not a directory so name "datadir" is not correctly.
------------------------------
In Makefile
<#1 (comment)>:
>
dwarview: main.c dwarview.c demangle.c
gcc -o $@ $(CFLAGS) $^ $(LDFLAGS)
+install: all
+ $(INSTALL) -m 755 $(TARGET) $(bindir)
I think -m 755 part has no meaning since it's the default. Also I'm not
sure it works when "bindir" does not exist already.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/APqSaFN4qbKuMpflTvliShsAp1jhWIlKks5vFGDogaJpZM4ZJyjT>
.
--
Daniel T. Lee
danieltimlee@gmail.com
|
Owner
|
Sorry for the long delay. Unfortunately I did it slightly different way while I'm working on flatpak packaging. Thanks a lot for you interest and contribution. I'm closing this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit includes install, uninstall target.
By (un)install target,
dwarview binary will be (un)installed -> /usr/local/bin
dwarview.glade will be (un)installed -> /usr/local/share/dwarview
Signed-off-by: Daniel T. Lee danieltimlee@gmail.com