Skip to content

Commit

Permalink
Makefile: install manpage only if it exists.
Browse files Browse the repository at this point in the history
The manual page doesn't exist in a pristine git checkout,
but it does exist in a release tarball.
  • Loading branch information
jwilk committed Dec 18, 2016
1 parent e702ac6 commit fad88ee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@ install:
# library + data:
( find lib dict -type f ! -name '*.py[co]' ) \
| xargs -t -I {} $(INSTALL) -p -D -m644 {} $(DESTDIR)$(basedir)/{}
ifeq "$(wildcard .git doc/$(exe).1)" ".git"
# run "make -C doc" to build the manpage
else
# manual page:
$(INSTALL) -p -D -m644 doc/$(exe).1 $(DESTDIR)$(mandir)/man1/$(exe).1
endif

.PHONY: test
test:
Expand Down

3 comments on commit fad88ee

@polyzen
Copy link

@polyzen polyzen commented on fad88ee Feb 28, 2018

Choose a reason for hiding this comment

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

This does not seem to work as intended?

# manual page:
install -p -D -m644 doc/mwic.1 /home/user/pkg/build/mwic/pkg/mwic/usr/share/man/man1/mwic.1
install: cannot stat 'doc/mwic.1': No such file or directory

Edit: Please disregard, I'm building from the source code tarball.

@jwilk
Copy link
Owner Author

@jwilk jwilk commented on fad88ee Apr 7, 2018

Choose a reason for hiding this comment

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

I'm not entirely sure what happened, but this should be fixed in a75d5c2.

Thanks for the bug report.

@polyzen
Copy link

@polyzen polyzen commented on fad88ee Apr 7, 2018

Choose a reason for hiding this comment

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

I had run into this issue when using the source tarball autogenerated by GitHub, and not the one built by you.

Please sign in to comment.