Mercurial > illumos > illumos-gate
changeset 2026:8d6a21ec381e
6425511 metassist keywords check should not check SCCS files
6425491 mkhdr.sh generates SCCS keywords
6425482 .ed files try to match on inappropriate terms (SCCS keywords)
Contributed by Richard Lowe <richlowe@richlowe.net>
author | stevel |
---|---|
date | Fri, 19 May 2006 18:18:15 -0700 |
parents | bb7d75b30580 |
children | 7f714f201d97 |
files | usr/src/cmd/lvm/metassist/Makefile.targ usr/src/cmd/lvm/metassist/common/Makefile usr/src/cmd/lvm/metassist/controller/Makefile usr/src/cmd/lvm/metassist/layout/Makefile usr/src/cmd/lvm/metassist/xml/Makefile usr/src/lib/libbsm/mkhdr.sh usr/src/lib/libcurses/screen/curses.ed usr/src/lib/libcurses/screen/maketerm.ed usr/src/lib/libcurses/screen/tifget.ed usr/src/lib/libcurses/screen/tiget.ed |
diffstat | 10 files changed, 60 insertions(+), 69 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/cmd/lvm/metassist/Makefile.targ Fri May 19 16:55:25 2006 -0700 +++ b/usr/src/cmd/lvm/metassist/Makefile.targ Fri May 19 18:18:15 2006 -0700 @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,26 +19,14 @@ # CDDL HEADER END # # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" # -# Wrapper script that will fail if there is any output, for commands -# that don't exit with a non-zero exit code when they find errors -ERRIFOUTPUT_SCRIPT = $(METASSIST_TOPLEVEL)/scripts/errifoutput - # Suffixes for files that flag a particular check SUFFIX_LINT = .lint -SUFFIX_CSTYLE = .cstyle -SUFFIX_HDRCHK = .hdrchk -SUFFIX_KEYWORDS = .keywords - -# Get list of (non-deleted) SCCS files -tmp1 :sh= echo SCCS/s.* -tmp2 = ${tmp1:SCCS/s.%=%} -SCCSFILES = ${tmp2:.del-%=} all := TARGET = all install := TARGET = install @@ -49,7 +36,6 @@ check := TARGET = check cstyle := TARGET = cstyle hdrchk := TARGET = hdrchk -keywords := TARGET = keywords lint := TARGET = lint .KEEP_STATE: @@ -102,38 +88,20 @@ # Run lint on all source files lint: ${SUBDIRS} $(SRCS:%=%$(SUFFIX_LINT)) -# Pattern-matching rule for cstyle -# cstyle doesn't exit with a non-zero exit code when it finds errors, -# so run it through a wrapper script that fails if there is any output -%$(SUFFIX_CSTYLE): % - $(ERRIFOUTPUT_SCRIPT) ${CSTYLE} -p -P $< && touch $@ - -# Run cstyle on all source files and headers -cstyle: $(ERRIFOUTPUT_SCRIPT) ${SUBDIRS} $(SRCS:%=%.cstyle) $(HDRS:%=%$(SUFFIX_CSTYLE)) +CSTYLE_FLAGS= -Pp +HDRCHK_FLAGS= -a -# Pattern-matching rule for hdrchk -# hdrchk doesn't exit with a non-zero exit code when it finds errors, -# so run it through a wrapper script that fails if there is any output -%$(SUFFIX_HDRCHK): % - $(ERRIFOUTPUT_SCRIPT) ${HDRCHK} $< && touch $@ - -# Run hdrchk on all headers -hdrchk: $(ERRIFOUTPUT_SCRIPT) ${SUBDIRS} $(HDRS:%=%$(SUFFIX_HDRCHK)) +cstyle: ${SUBDIRS} -# Pattern-matching rule for keywords -%$(SUFFIX_KEYWORDS): % - keywords $< && touch $@ +hdrchk: ${SUBDIRS} -# Run keywords on all SCCS files -keywords: ${SUBDIRS} ${SCCSFILES:%=%$(SUFFIX_KEYWORDS)} - -check: cstyle lint hdrchk keywords +check: cstyle hdrchk clobber: ${SUBDIRS} clean: ${SUBDIRS} -${RM} *.o *.ln *.i *~ core a.out $(CLEANFILES) \ - *$(SUFFIX_LINT) *$(SUFFIX_CSTYLE) *$(SUFFIX_HDRCHK) *$(SUFFIX_KEYWORDS) + *$(SUFFIX_LINT) catalog: $(POFILE)
--- a/usr/src/cmd/lvm/metassist/common/Makefile Fri May 19 16:55:25 2006 -0700 +++ b/usr/src/cmd/lvm/metassist/common/Makefile Fri May 19 18:18:15 2006 -0700 @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2003 Sun Microsystems, Inc. All rights reserved. +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -55,3 +54,9 @@ # Build .po file from message files $(POFILE): $(MSGFILES) $(BUILDPO.msgfiles) + +cstyle: + $(CSTYLE) $(CSTYLE_FLAGS) $(SRCS) $(HDRS) + +hdrchk: + $(HDRCHK) $(HDRCHK_FLAGS) $(HDRS)
--- a/usr/src/cmd/lvm/metassist/controller/Makefile Fri May 19 16:55:25 2006 -0700 +++ b/usr/src/cmd/lvm/metassist/controller/Makefile Fri May 19 18:18:15 2006 -0700 @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2003 Sun Microsystems, Inc. All rights reserved. +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -47,3 +46,9 @@ # Build .po file from message files $(POFILE): $(MSGFILES) $(BUILDPO.msgfiles) + +cstyle: + $(CSTYLE) $(CSTYLE_FLAGS) $(SRCS) $(HDRS) + +hdrchk: + $(HDRCHK) $(HDRCHK_FLAGS) $(HDRS)
--- a/usr/src/cmd/lvm/metassist/layout/Makefile Fri May 19 16:55:25 2006 -0700 +++ b/usr/src/cmd/lvm/metassist/layout/Makefile Fri May 19 18:18:15 2006 -0700 @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2003 Sun Microsystems, Inc. All rights reserved. +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -62,3 +61,9 @@ # Build .po file from message files $(POFILE): $(MSGFILES) $(BUILDPO.msgfiles) + +cstyle: + $(CSTYLE) $(CSTYLE_FLAGS) $(SRCS) $(HDRS) + +hdrchk: + $(HDRCHK) $(HDRCHK_FLAGS) $(HDRS)
--- a/usr/src/cmd/lvm/metassist/xml/Makefile Fri May 19 16:55:25 2006 -0700 +++ b/usr/src/cmd/lvm/metassist/xml/Makefile Fri May 19 18:18:15 2006 -0700 @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2003 Sun Microsystems, Inc. All rights reserved. +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -46,3 +45,9 @@ # Build .po file from message files $(POFILE): $(MSGFILES) $(BUILDPO.msgfiles) + +cstyle: + $(CSTYLE) $(CSTYLE_FLAGS) $(SRCS) $(HDRS) + +hdrchk: + $(HDRCHK) $(HDRCHK_FLAGS) $(HDRS)
--- a/usr/src/lib/libbsm/mkhdr.sh Fri May 19 16:55:25 2006 -0700 +++ b/usr/src/lib/libbsm/mkhdr.sh Fri May 19 18:18:15 2006 -0700 @@ -40,7 +40,12 @@ #ifndef _BSM_AUDIT_UEVENTS_H #define _BSM_AUDIT_UEVENTS_H -#pragma ident "%Z%$HEADER_FILE %I% %E% SMI" +EOF + +grep '^# ident' $DATABASE | sed -e 's/^#/#pragma/' \ + -e "s/$DATABASE/$HEADER_FILE/" >> $HEADER_FILE + +cat <<EOF >> $HEADER_FILE /* * User level audit event numbers.
--- a/usr/src/lib/libcurses/screen/curses.ed Fri May 19 16:55:25 2006 -0700 +++ b/usr/src/lib/libcurses/screen/curses.ed Fri May 19 18:18:15 2006 -0700 @@ -1438,7 +1438,6 @@ #endif /* _CURSES_H */ . 0r copyright.h -/copyright\.h/d -. -1,$s/\@(\#)curses\.ed/\@(\#)curses\.h/ +1,.g/#pragma ident/d +g/\@(\#)curses\.ed/s//\@(\#)curses\.h/ w curses.h
--- a/usr/src/lib/libcurses/screen/maketerm.ed Fri May 19 16:55:25 2006 -0700 +++ b/usr/src/lib/libcurses/screen/maketerm.ed Fri May 19 18:18:15 2006 -0700 @@ -1,4 +1,3 @@ -!#ident "%Z%%M% %I% %E% SMI" H !rm -f bool num str boolnames numnames strnames boolvals numvals strvals tnames.c tinames.c tifnames.c term.h ./tmp/term.h.new ./tmp/tmp.awk ./tmp/term.h e caps @@ -183,7 +182,7 @@ . 1,$s/ $// 0r copyright.h -/copyright\.h/d +1,.g/#pragma ident/d w tnames.c 1,$d r tinames.c @@ -194,7 +193,7 @@ . 1,$s/ $// 0r copyright.h -/copyright\.h/d +1,.g/#pragma ident/d w tinames.c 1,$d r tifnames.c @@ -205,7 +204,7 @@ . 1,$s/ $// 0r copyright.h -/copyright\.h/d +1,.g/#pragma ident/d w tifnames.c e bool 1,$d @@ -604,8 +603,8 @@ #endif /* _TERM_H */ . 0r copyright.h -/copyright\.h/d -1,$s/\@(\#)maketerm.ed/\@(\#)term.h/ +1,.g/#pragma ident/d +g/\@(\#)maketerm.ed/s//\@(\#)term.h/ 1,$s/,\/\*/, \/\*/ w term.h !rm -f boolnames boolvals bool numnames numvals num strnames strvals str ./tmp/term.h.new ./tmp/tmp.awk ./tmp/tmp.term.h