Sign up ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

For example, I've GPL software. I'm the author of this GPL software. This GPL software has, between its code, Doxygen comments. These Doxygen comments are written to generate a CC-BY-SA html page, in order to upload this generated documentation in my project website under CC-BY-SA license.

But, is the Doxygen documentation output a "derivate work"? After all, this documentation is based on my GPL source code. In this case, the documentation must be GPL. But, I want the documentation is CC-BY-SA, because it is documentation. GFDL doesn't help. GPL code can't become GFDL (the opposite yes).

If this output is really a derivate work, I think, creates a strange situation, because, if I distribute my work, recipient users can't legally distribute the generated documentation: while with my work I can do I want, the users don't, thus, they have to distribute any derivated work with the same license I offer them.

What is the solution?

share|improve this question
Interesting question! – maple_shaft Nov 14 '12 at 12:24

4 Answers 4

up vote 12 down vote accepted

This is really a tricky question (of the ask-your-lawyer kind).

Since you are the author of the software, you can make your intentions clear and avoid any ambiguities by adding a "Doxygen-comments are CC-BY-SA" exception to your license, along the lines of:

Additional permission under GNU GPL version 3 section 7

In addition, as a special exception, the copyright holders of [name of your program]
give you permission to distribute the Doxygen comments in this source and any work
derived from those comments ("the documentation") under the CC-BY-SA license.

share|improve this answer
Thank you very much. But, related to this section 7, I don't understand exactly with types of additional permissions can be removed by recipients. – Peregring-lk Nov 14 '12 at 12:18
By the GPL text, recipients can remove any additional permissions (like the one above) from their copy, or from any part of it. But this is IMO probably not a big problem, since they cannot remove your right to give that permission to any third party, concerning your code. In fact, you don't need the exception to distribute the generated documentation - as the copyright owner, you can do what you want with your own work. The CC-BY-SA exception is only here to allow your recipients to generate and distribute the documentation from the source code. – user281377 Nov 14 '12 at 13:02
But, if a direct recipient remove this clause, and he distributes it other time, a "third-level" recipient have the same legal problem. – Peregring-lk Nov 14 '12 at 13:04
True, and there is hardly anything you can do about it. Placing further restrictions like "you may not remove the cc-by-sa-exception" is definitely a no-go with the GPL. Creating your own license most likely renders your work incompatible with the GPL, which drastically reduces its worth for others who might want to create a derived work containing parts of your work and parts of other GPL sources. – user281377 Nov 14 '12 at 13:17
The whole problem is there isn't a (libre) license applicable to works compose by elements with different nature. GPL seems to be designed for pure-code software, forgotting other not-source-code elements integrated in software. – Peregring-lk Nov 14 '12 at 13:27

To be a "derivative work", something must first be a work. Under United State law, only a creative process can create a work. An automated process cannot create a derivative work because it cannot create a work that didn't exist before. (Other than a few specific exceptions created by statute.)

If you think about it, it can't be a derivative work. Say you run program A on text B and produce work C. If this is a new derivative work, who holds copyright on it? No human being created it, and a program can't hold copyright.

Non-creative combinations can't create any new work, derivative or not. What mechanical processes can create is an aggregate work. It's legally the same as if I glued two DVDs together (or combined two files on the same storage medium). There's no derivative work, but the two DVDs stapled together are an aggregate of both works.

See 17 USC 103(b): "The copyright in a compilation or derivative work extends only to the material contributed by the author of such work, as distinguished from the preexisting material employed in the work, and does not imply any exclusive right in the preexisting material."

Also see circular 14.

Who would the author of the derivative work be?

share|improve this answer
Then, for which reason Flex/Bison copy in its automatic outputs (from files with grammar descriptions) an license statement? If these outputs aren't "works" (and thus, nor derivated works), it have no sense these legal clauses. The same can be said for .sty files automaticly generated from .dtx and .ins packages? – Peregring-lk Nov 14 '12 at 13:02
Because the outputs contain creative elements taken from Flex, Bison, and so on. If you rip a book in half, you haven't created a derivative work (you don't need permission from the copyright holder to rip a book in half, and you can't register a copyright in the book half yourself), but you can't make copies of those halves and give them to all your friends. Right? Legally, the book halves act pretty much like the original work. Same here -- any protected elements from the original work present in the combined output are still covered by copyright. It's just not a derivative work. – David Schwartz Nov 14 '12 at 13:03
I understand the first part (the input is a original creative element), but I don't see the relation between your divided book and the actual issue. – Peregring-lk Nov 14 '12 at 13:08
I'm not sure how I can explain it any more clearly than I already have. An automated process doesn't create a derivative work under US law (other than the few exceptions created by statute which don't apply here). The license provisions about derivative works don't apply to the output of an automated process. (To be precise, the outputs are works, they're just not new works, so they can't be new derivative works. A "derivative work" is a type of new work that contains a creative combination of elements of previous works.) – David Schwartz Nov 14 '12 at 13:18
@DavidSchwartz That means if you automatically generates an PDF ("the output") from my LaTeX source code ("the work"), this output is mine, and you have the same rights over this output I gave you when you receive my work. Right? Thus, if you want redistribute the output, you must redistribute it with the same conditions the work license say you. But the output have a CC-BY-SA license (because the work produces the output so). And this is a contradiction, or not? – Peregring-lk Nov 14 '12 at 14:10

There is nothing stopping you from applying different licenses to the same code. If I understand you correctly, you have code written and controlled by you that has comments you want to release under a CC license and code you want to release under GPL. So just do that. The comments will be released under the GPL and under the CC license, so if people use the comments according to the CC license, they're fine.

The GNU GPL FAQ talks about automatically generated code specifically, so it might answer your question if I misunderstood. (It also covers a lot of other corner cases.)

share|improve this answer
my reading of the FAQ you refer to, rather indicates that generated code is locked: "when a program translates its input into some other form, the copyright status of the output inherits that of the input it was generated from..." – gnat Nov 14 '12 at 16:05
@gnat: What do you mean 'locked'? How does the portion you quoted contradict what I said? – Michael Shaw Nov 14 '12 at 16:46
This is nearby the link you shared. Anyone using a GPL grammar file, be wary. It's content gets copied into the generated code, so the generated code is also GPL. – RubberDuck May 9 at 21:42

The question is moot.

If you are the author of the program, you have all the rights to distribute it under the terms you like. So if you generate the documentation under a different license, you will have it under a different license. Because you said so.

The program wasn't written by you? Then, the documentation you produce should be GPL, but that presents a different problem. The GPL doesn't talk about documentation. It talks about software.

So if you want to reprint commercially the output of a doxygen run of a GPL program you did not write, here's what you do: you write to the author and ask for explicit permission. Same thing if you want to distribute those docs under CC-BY-SA. You don't stick the label, you ask the author to stick it.

Law isn't a weird mind game. It's about people convincing juries or judges. Judges hate mind games and juries sometimes don't even get the law correctly. (§ Apple vs. Samsung)

So, worst case scenario.

The author is deceased, the heirs are stupid and they just like to sue people. You reprinted commercially the output of a doxygen run of a GPL program. My guess is (but IANAL) you still may win, but it might be harder than planned and you may face a judge very tedious on distinguishing software from written word meant for human consumption. I'd still bet on a 70% success rate.

Why did I say reprint commercially? Cause it's hard to sue people for damages if you can't tell the value of the "work of art" (the documentation) that's been illegally distributed. If the subject of the suit is unsellable or of unquantifiable value, you cannot claim enough damages to pay a lawyer.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.