[Codemill-spec] Code Mill Spec - headers
Status: Planning
Brought to you by:
richard_kolb
From: Richard K. <rk...@sw...> - 2000-12-11 14:15:42
|
Hi All, My major argument on this topic, is that I've had experience with a project called auto project. This basically generated code and did autoconf and automake stuff. Anyway is did some not nice things like adding the GPL license without asking, and starts putting comments in my code, etc. Just say , I deleted it very quickly and I'm sure many people did the same. ( I personally hate programs that try to hold my hand) I think the best way of doing this is to have a document header file where people can put in what they please. therefore someone could have a header_file.text document in there directory containing -// Copy Right 2001 Mr Me this is a cool program // Disclaimer : Please don't sue me ! and a license (this one is custom) beer.text -// The Beer license , I love Beer :-) Then someone could type codemill -c NewClass -b BaseClass -L beer.text -H header_file.text Where L is the license, and H is the header of the file defined by Mr Me. By default no license or header should be added Although I understand where you are comeing with this, ( I hate typing things twise or copy pasting every where) I think this is overcomplicating things a bit. Thanks, Richard. Richard Kolb wrote: > ------------------------------------------------------------------------ > > Subject: Re: [Codemill-spec] Re: Code Mill Spec > Date: Mon, 11 Dec 2000 07:14:39 -0600 > From: David Snopek <xe...@ex...> > Organization: KewL STuFf Inc. > To: Richard Kolb <rk...@sw...> > References: <3A2...@sw...> <3A3...@ex...> <3A3...@sw...> <3A3...@ex...> <3A3...@sw...> > > Richard Kolb wrote: > > > I don't think we should add things like copy right etc. to the top of source > > files, > > This would start complicating things , > > and convert a swiss army knife into a pile of spaghetti, so to speak, > > Well, you can't really have a license without a copyright, since the license is the > terms by which the source can be copied. But adding a copyright is just a matter of > simple replacing words, we could even use the name the user has registered with > there login as the author name. Generally source headers go like this: > > // Project Name - Our happy little project > // Copyright <year created> <Origanal authors name> > // > // <License> > // > // <Disclaimer: ... NOT EVEN THE IMPLIED WARRENTY OF USABILITY ...> > // > > If doing this worries you so much, we could just add support for an initial file > that has a few variables that are expanded. I could then put all my header stuff in > a file (or two files really because I do *.h's different than *.cpp's). For > example, mine would look something like this: > > //--------------------------------------------------------------------------- > // libksd -- KewL STuFf DirectMedium > // Copyright @YEAR@ David Snopek > // > // This library is free software; you can redistribute it and/or > // modify it under the terms of the GNU Library General Public > // License as published by the Free Software Foundation; either > // version 2 of the License, or (at your option) any later version. > // > // This library is distributed in the hope that it will be useful, > // but WITHOUT ANY WARRANTY; without even the implied warranty of > // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > // Library General Public License for more details. > // > // You should have received a copy of the GNU Library General Public > // License along with this library; if not, write to the > // Free Software Foundation, Inc., 59 Temple Place - Suite 330, > // Boston, MA 02111-1307, SA. > // > //--------------------------------------------------------------------------- > // File: $RCSfile: Surface.h,v $ > // > // Author: David Snopek > // Revised by: > // Version: $Revision: 1.9 $ > // > // Objects: @CLASSES@ > // > // Purpose: @DESCRIPTION@ > // > // Checked-in by: $Author: xevol $ > // $Date: 2000/11/18 05:24:36 $ > //--------------------------------------------------------------------------- > #ifndef _KSD_@FILE_BASE@H_ > #define _KSD_@FILE_BASE@H_ > //--------------------------------------------------------------------------- > @INCLUDES@ > //--------------------------------------------------------------------------- > #ifdef __GNUG__ > #pragma interface > #endif > //--------------------------------------------------------------------------- > namespace ksd { > //--------------------------------------------------------------------------- > @START@ > //--------------------------------------------------------------------------- > }; // namespace ksd > //--------------------------------------------------------------------------- > #endif > > The two variables that affect code mill the most are the @INCLUDES@ and @START@. > > This example would only be for one of my projects. For different projects or ones > where I am only contributing I could have different initial files with different > licenses and ways of setting up a file. > > I don;t know about syntax for this. There just needs to be a way to specify both > the header and source template at the same time. Maybe they could be named like: > "temp_libksd.h" and "temp_libksd.cpp" and we could just specify "-S libksd". (the > 'S' is arbitrary) > > -- David Snopek |