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

Control output binary name with PROG variable in the Makefile #36

Merged
merged 1 commit into from
Feb 18, 2017
Merged

Control output binary name with PROG variable in the Makefile #36

merged 1 commit into from
Feb 18, 2017

Conversation

nmilosev
Copy link
Contributor

As discussed in issue #35

Makefile Outdated
@@ -14,15 +16,15 @@ CPPFLAGS+= -DVERSION=\"${VERSION}\" -DYANKCMD=\"${YANKCMD}\"
all: yank
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be all: ${PROG}

Makefile Outdated
@@ -14,15 +16,15 @@ CPPFLAGS+= -DVERSION=\"${VERSION}\" -DYANKCMD=\"${YANKCMD}\"
all: yank

yank: yank.c
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be ${PROG}: yank.c

Makefile Outdated

clean:
rm yank
rm ${PROG}

install: yank
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be install: ${PROG}

@mptre
Copy link
Owner

mptre commented Feb 17, 2017

Looks good! I've added some inline comments needed in order to not
confuse make(1).

Makefile Outdated
@@ -5,6 +5,8 @@ YANKCMD= xsel
PREFIX= /usr/local
MANPREFIX= ${PREFIX}/share/man

PROG= yank
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indent with a single tab, not spaces.

Makefile Outdated
@@ -14,15 +16,15 @@ CPPFLAGS+= -DVERSION=\"${VERSION}\" -DYANKCMD=\"${YANKCMD}\"
all: yank

yank: yank.c
${CC} ${CFLAGS} -o $@ $< ${LDFLAGS} ${CPPFLAGS}
${CC} ${CFLAGS} -o ${PROG} $< ${LDFLAGS} ${CPPFLAGS}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cange $< to yank.c. I'm running into to the following error when applying my
suggested changes:

Using $< in a non-suffix rule context is a GNUmake idiom (Makefile:19)

@nmilosev
Copy link
Contributor Author

On it! Thanks for the comments.

@nmilosev
Copy link
Contributor Author

nmilosev commented Feb 17, 2017

Done! Sorry, didn't know how "deep" I should go. Build works fine on Fedora 25 x86_64.

Cheers!
Nemanja

PS. Squashed again into one commit
PPS. Does this count as a new release? 0.8.1? Please let me know.

@mptre mptre merged commit 1c43c46 into mptre:master Feb 18, 2017
@mptre
Copy link
Owner

mptre commented Feb 18, 2017

Thanks! Just released v0.8.1 including your changes.

@nmilosev
Copy link
Contributor Author

Thank you! :)

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

Successfully merging this pull request may close these issues.

2 participants