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

Fix installation of the manual on Windows #928

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions configure.ac
Expand Up @@ -120,6 +120,10 @@ GEANY_CHECK_THE_FORCE dnl hehe
# i18n
GEANY_I18N

AM_COND_IF([MINGW],
[docdir='${prefix}/doc'],
[docdir='${docdir}'])
Copy link
Member

Choose a reason for hiding this comment

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

As the Travis failure shows, this is a recursive variable from Make's POV, not a good thing :)
Could probably drop the else part and leave it as default, couldn't it?

This said, I think it'd probably be better to alter paths like this in the Makefile.am instead.

Copy link
Member

Choose a reason for hiding this comment

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

This said, I think it'd probably be better to alter paths like this in the Makefile.am instead.

Oh, I see, it's used in src/Makefile.am too. Well, err hum… so well yeah either not special-case Windows, or indeed to it at configure.

Copy link
Member Author

Choose a reason for hiding this comment

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

+AM_COND_IF([MINGW],

  • [docdir='${prefix}/doc'],
  • [docdir='${docdir}'])

As the Travis failure shows, this is a recursive variable from Make's POV, not a good thing :)

Oops.
I really know too less about Autotools and how it works. Sorry.

AC_SUBST([docdir])
# double eval since datarootdir is usually defined as ${prefix}/share
AM_COND_IF([MINGW],
[pkgdatadir='${prefix}/data'],
Expand Down
17 changes: 13 additions & 4 deletions doc/Makefile.am
@@ -1,7 +1,16 @@
if MINGW
html_dir =
html_filename = Manual.html
else
html_dir = html/
html_filename = index.html
endif


man_MANS=geany.1

if INSTALL_HTML_DOCS
htmldocimagesdir = $(docdir)/html/images
htmldocimagesdir = $(docdir)/$(html_dir)images
dist_htmldocimages_DATA = \
images/build_menu_commands_dialog.png \
images/find_dialog.png \
Expand Down Expand Up @@ -148,18 +157,18 @@ clean-local: $(CLEAN_LOCAL_TARGETS)
endif

uninstall-local:
rm -f $(DOCDIR)/html/index.html
rm -f $(DOCDIR)/$(html_dir)$(html_filename)
rm -f $(DOCDIR)/manual.txt
rm -f $(DOCDIR)/ScintillaLicense.txt

# manually install some files under another name
install-data-local:
if INSTALL_HTML_DOCS
$(mkinstalldirs) $(DOCDIR)/html
$(mkinstalldirs) $(DOCDIR)/$(html_dir)
# as we don't install with the automated mechanism so we can rename the file,
# we need to find the source file in the right location (either builddir or srcdir)
dir=$(builddir); test -f "$$dir/geany.html" || dir=$(srcdir); \
$(INSTALL_DATA) "$$dir/geany.html" $(DOCDIR)/html/index.html
$(INSTALL_DATA) "$$dir/geany.html" $(DOCDIR)/$(html_dir)$(html_filename)
endif
$(mkinstalldirs) $(DOCDIR)
$(INSTALL_DATA) $(srcdir)/geany.txt $(DOCDIR)/manual.txt
Expand Down