1 martin 1.3 #//%LICENSE////////////////////////////////////////////////////////////////
|
2 martin 1.4 #//
|
3 martin 1.3 #// Licensed to The Open Group (TOG) under one or more contributor license
4 #// agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
5 #// this work for additional information regarding copyright ownership.
6 #// Each contributor licenses this file to you under the OpenPegasus Open
7 #// Source License; you may not use this file except in compliance with the
8 #// License.
|
9 martin 1.4 #//
|
10 martin 1.3 #// Permission is hereby granted, free of charge, to any person obtaining a
11 #// copy of this software and associated documentation files (the "Software"),
12 #// to deal in the Software without restriction, including without limitation
13 #// the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 #// and/or sell copies of the Software, and to permit persons to whom the
15 #// Software is furnished to do so, subject to the following conditions:
|
16 martin 1.4 #//
|
17 martin 1.3 #// The above copyright notice and this permission notice shall be included
18 #// in all copies or substantial portions of the Software.
|
19 martin 1.4 #//
|
20 martin 1.3 #// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
21 martin 1.4 #// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22 martin 1.3 #// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 #// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 #// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 #// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 #// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
27 martin 1.4 #//
|
28 martin 1.3 #//////////////////////////////////////////////////////////////////////////
|
29 karl 1.1
30 # Make functions to manage the copywrite license on Pegasus files. This is normally
31 # used to perform the regular file license text changes that are required by Pegasus.
|
32 kumpf 1.5 #
|
33 karl 1.1 # Includes targets to replace license text each year.
34 #
35 # The functions in this make file MAY NOT be portable to other Operating systems
36 # than Linux since its usage is limited and based on the bash shell syntax.
37 # Usage. See each target.
38 # Note that right now this make file can be used in conjuction with the script
39 # licensechange to change the majority of licenes in a single operation.
40
41 MAKEFILELIST="*Makefile Makefile.* *.mak BuildMakefile Makefile* Makefile*.*
42
43 licenseupdate:
44 @ - bash $(ROOT)/mak/licensechange
45
46 # create the license for make files corresponding to the license for .cpp.
47 # Prepends # to each line of the license.
48 create-make-license:
49 sed 's_//_#//_' $(PEGASUS_ROOT)/doc/license.txt >$(PEGASUS_ROOT)/doc/license.mak.txt
50
51 # create the license for lexfiles files corresponding to the license for .cpp.
52 # Surrounds the existing license with /& */ comments because Lex cannot handle the
53 # // comments at the beginning of the .l file
54 karl 1.1 # This script prepends the first line with /* and postpends the last line with */
55 create-lex-license:
56 cp $(PEGASUS_ROOT)/doc/license.txt $(PEGASUS_ROOT)/doc/tmp1 | sed -e '1 s_//_/*//_' -e '$$ s_/*$$_&*/_' >$(PEGASUS_ROOT)/doc/license.lex.txt
57
58 # Strip the license text from each file in the current directory
59 # removes the license text (all lines starting with the line containing
60 # //% and ending with the line with "//="
61 strip-license:
62 mu strip //% //= *.h *.cpp
63 mu strip \#//% \#//= $(MAKEFILELIST)
64
65 # Prepend the license file to each file in the current directory
66 # used on any file with comments that begin with //
67 prepend-license:
68 mu prepend $(ROOT)/doc/license.txt *.h *.cpp
69 mu prepend $(ROOT)/doc/license.mak.txt $(MAKEFILELIST)
70
71 # Update the license for a single file. Can be used on any file
72 # that requires comments beginning with //. This will either replace
73 # existing license or install new license text
74 fix-code-license:
75 karl 1.1 mu strip //% //= $(FILENAME)
76 mu prepend $(PEGASUS_ROOT)/doc/license.txt $(FILENAME)
77
78 # Update the license text for a single file using the makefile license
79 # Can be used on any file that requires comments beginning with #.
80 # Will either replace or install new license text.
81 fix-make-license:
82 mu strip \#//% \#//= $(FILENAME)
83 mu prepend $(PEGASUS_ROOT)/doc/license.mak.txt $(FILENAME)
84
85 # Update the license text for a single file using the makefile license
86 # Can be used on any file that requires comments beginning with #.
87 # Will either replace or install new license text.
88 fix-lex-license:
89 mu strip \#//% \#//= $(FILENAME)
90 mu prepend $(PEGASUS_ROOT)/doc/license.lex.txt $(FILENAME)
91
92 # Show files with old license
93 # Update with year of previous license (i.e. 2005)
94 show-old-licenses:
95 grep -r \/%2005\/
96 karl 1.1
97 # Show Files with NO license
98 nolicense:
|
99 karl 1.2 grep -r -L %2006 .| grep -v CVS |grep -v ".log" | grep -v ".master" | grep -v ".cert" | grep -v ".xml" | grep -v ".key" | grep -v Unsupported | grep -v InterfaceArchive | grep -v Schema
|