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

Add Texinfo support #1408

Merged
merged 3 commits into from
Aug 21, 2015
Merged

Add Texinfo support #1408

merged 3 commits into from
Aug 21, 2015

Conversation

lucaswerkmeister
Copy link
Member

I wrote some XSLT stylesheets that transform the spec’s Docbook into Texinfo.

To test it, run:

ant -Dlang=en lang.docinfo.install

and then you can view the specification with

info ceylon-spec

or

emacs # open emacs
C-h i # open info directory
mCeylon # menu item Ceylon

We could also add Texinfo→HTML and Texinfo→PDF transformation, but that’s kinda pointless, since we already have those two formats, and the Texinfo version looks worse.

Note: this pull request also contains the commit from #1407 (closes #1407), since it’s required for this to work (all nodes need to have IDs).

support/docbook-xsl/texinfo/docbook.xsl can be used to transform a
limited subset of Docbook into Texinfo.
By default, we now build the specification in texinfo format in addition
to PDF, HTML, and single HTML. In addition to that, the
lang.docinfo.install target can be used to install the specification
into the system's info directory.
quintesse added a commit that referenced this pull request Aug 21, 2015
@quintesse quintesse merged commit e349c39 into ceylon:master Aug 21, 2015
@lucaswerkmeister lucaswerkmeister deleted the texinfo branch August 21, 2015 12:35
@quintesse
Copy link
Member

NB: for this to work you need to have makeinfo installed

@lucaswerkmeister
Copy link
Member Author

Is that not installed by default on most Linuxes?

@quintesse
Copy link
Member

It wasn't on mine (Fedora 21)

@quintesse
Copy link
Member

btw to test I had to type info build/en/ceylon-spec

@lucaswerkmeister
Copy link
Member Author

so you didn’t install it?

@lucaswerkmeister
Copy link
Member Author

It wasn't on mine (Fedora 21)

seems to be part of the texinfo package on Debian and Arch, and in both distros that package seems to be part of the base distribution

@quintesse
Copy link
Member

so you didn’t install it?

I ran the "ant" command just as you describe above

@lucaswerkmeister
Copy link
Member Author

ant -Dlang=en lang.docinfo.install

This one should install it in your global info directory. Needs sudo, install, install-info though.

@quintesse
Copy link
Member

I don't think the "sudo" command got executed at all

@quintesse
Copy link
Member

Does it ask you for credentials when you run that task?

@lucaswerkmeister
Copy link
Member Author

yes

@quintesse
Copy link
Member

Wtf? IT's because you put -Dlang.en in the command instead of -Dlang=en!

But then why does it even get to the doc generation?

@lucaswerkmeister
Copy link
Member Author

…oops :D

sorry, but does it work with -Dlang=en?

@quintesse
Copy link
Member

yup

@lucaswerkmeister
Copy link
Member Author

ok good

I should probably do something in ceylon-dist too so that our published packages install the file as well.

@quintesse
Copy link
Member

Although I'm thinking of just doing an <echo> of that install line, running sudo from a script without seeing what it is going to do is not something I normally like to do

depends="lang.docinfo"
if="hasInfo">

<exec executable="sudo" dir="${build.dir}/${lang}/info/">
Copy link
Member

Choose a reason for hiding this comment

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

You guys are not seriously considering running sudo in a build file, are you? That's a big veto from me.

Copy link
Member Author

Choose a reason for hiding this comment

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

You need root permissions to install the info file. Same as the ancient

./configure
make
sudo make install

Copy link
Member

Choose a reason for hiding this comment

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

Is there a MANPATH analog, like INFOPATH, that can be used instead? Seems like this should go in the dist folder, along side bin.

Copy link
Member

Choose a reason for hiding this comment

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

Well, do you notice how it should be the user who explicitly runs sudo and not make?

Not only that, but I'd want to install to my user info path, not the system, like we do for the rest of the publish commands.

Copy link
Member Author

Choose a reason for hiding this comment

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

@jvasileff yes, it’s actually called INFOPATH :) however, if it’s unset, info falls back to a compile-time default (usually /usr/share/info), which I don’t think we can determine.

@FroMage Is there a user info path? I can’t find it. Of course, you can make it yourself with INFOPATH, but it doesn’t seem to be intended in info’s design.

Copy link
Member

Choose a reason for hiding this comment

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

Indeed. For now I removed the use of sudo and added a check for root rights to the install task

Copy link
Member

Choose a reason for hiding this comment

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

@lucaswerkmeister best open an issue in ceylon-dist so we don't forget to add this to the debian/redhat packages

Copy link
Member Author

Choose a reason for hiding this comment

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

Alright, thanks.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

In the end I decided to remove the install task entirely, it just has no business being there ^^

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.

4 participants