Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm creating a standard library for a programming language, and I'd like to license each and every single class or function in there under the MIT license, so they're completely FOSS.

All of the files reside in a single directory. Would it be enough to put a LICENSE.txt file in the same directory, containing the MIT license? Do I need to say that the following license applies to all features of the library, or is the library itself considered to be a program?

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

The general practice is to place the license text in a clearly identifiable location, like you suggest, and to include comments near the top of each source file that tell the reader to look there. And don't forget to make the license obvious to someone who doesn't download the source code, just a binary.

As to what comprises a "program", you get to ignore that. In a binary distribution, there's no question - you download one .dll/.so/whatever file and a license file. In a source distribution, the license or a reference to it is present in every file.

share|improve this answer
    
"...you get to ignore that." - you mean define that, right? –  jco Dec 21 '12 at 12:19
    
Nope, I meant "ignore". You've got two distribution possibilities: the library binary or its source. As I said, either way they get the license file, and in source form they get told to look at it. So who cares what a "program" is then? –  Ross Patterson Dec 21 '12 at 16:44
add comment

Well, at one level the answer depends on the law of the legal jurisdiction you release your software in. So you might want to check that.

But more generally, adding a full copy of the text of the licence in the root directory of your distribution and then placing a one line comment in each source file is likely to convey your intentions very clearly.

share|improve this answer
add comment

Your Answer

 
discard

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.