(file) Return to license.mak CVS log (file) (dir) Up to [Pegasus] / pegasus / mak

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2