CVS commit: othersrc/external/bsd/gensetlist
Module Name:othersrc Committed By: agc Date: Wed Jun 1 15:02:12 UTC 2011 Modified Files: othersrc/external/bsd/gensetlist: bsd.setlist.mk gensetlist.c Log Message: Recognise LINKS definitions in Makefiles, and generate the appropriate set list entries, so that "make setlist" in src/usr.bin/cksum, for example, DTRT: % pwd /usr/src/usr.bin/cksum % make setlist [src/distrib/sets/lists/base/mi] ./usr/bin/cksum base-cksum-bin ./usr/bin/sum base-cksum-bin ./usr/bin/md2 base-cksum-bin ./usr/bin/md4 base-cksum-bin ./usr/bin/md5 base-cksum-bin ./usr/bin/sha1 base-cksum-bin ./usr/bin/rmd160base-cksum-bin ... To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 othersrc/external/bsd/gensetlist/bsd.setlist.mk cvs rdiff -u -r1.7 -r1.8 othersrc/external/bsd/gensetlist/gensetlist.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/gensetlist/bsd.setlist.mk diff -u othersrc/external/bsd/gensetlist/bsd.setlist.mk:1.6 othersrc/external/bsd/gensetlist/bsd.setlist.mk:1.7 --- othersrc/external/bsd/gensetlist/bsd.setlist.mk:1.6 Mon May 30 03:49:56 2011 +++ othersrc/external/bsd/gensetlist/bsd.setlist.mk Wed Jun 1 15:02:11 2011 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.setlist.mk,v 1.6 2011/05/30 03:49:56 agc Exp $ +# $NetBSD: bsd.setlist.mk,v 1.7 2011/06/01 15:02:11 agc Exp $ # Copyright (c) 2010,2011 Alistair Crooks # All rights reserved. @@ -54,6 +54,10 @@ GENSETLIST_ARGS+=-v SCRIPTSDIR=${SCRIPTSDIR:Q} .endif +.if defined(LINKS) +GENSETLIST_ARGS+=-v LINKS=${LINKS:Q} +.endif + .if defined(MLINKS) GENSETLIST_ARGS+=-v MLINKS=${MLINKS:Q} .endif Index: othersrc/external/bsd/gensetlist/gensetlist.c diff -u othersrc/external/bsd/gensetlist/gensetlist.c:1.7 othersrc/external/bsd/gensetlist/gensetlist.c:1.8 --- othersrc/external/bsd/gensetlist/gensetlist.c:1.7 Mon May 30 03:48:36 2011 +++ othersrc/external/bsd/gensetlist/gensetlist.c Wed Jun 1 15:02:11 2011 @@ -50,6 +50,8 @@ int incc; /* # of headers */ char *defs[MAX_DEFS]; /* definitions */ int defc; /* # of definitions */ + char *mlinks[MAX_LINKS]; /* man page hard links */ + int mlinkc; /* # of links */ char *links[MAX_LINKS]; /* hard links */ int linkc; /* # of links */ char *symlinks[MAX_LINKS]; /* symbolic links */ @@ -120,6 +122,7 @@ static regex_t mandir; static regex_t sub; static regex_t mlinks; + static regex_t links; static regex_t shlib; static regex_t incs; static regex_t prog; @@ -145,6 +148,8 @@ (void) regcomp(&sub, "^[ \t]*([^ \t]+)", REG_EXTENDED); (void) regcomp(&prog, "^[ \t]*PROG[ \t]*=[ \t]*([^ \t]+)", REG_EXTENDED); + (void) regcomp(&links, "^[ \t]*LINKS[ \t]*=", +REG_EXTENDED); (void) regcomp(&bindir, "^[ \t]*BINDIR[ \t]*=[ \t]*([^ \t]+)", REG_EXTENDED); (void) regcomp(&mandir, "^[ \t]*MANDIR[ \t]*=[ \t]*([^ \t]+)", @@ -248,6 +253,17 @@ for (cp = &in[(int)matches[0].rm_eo] ; regexec(&sublinks, cp, 10, matches, 0) == 0 ; cp += matches[0].rm_eo) { + (void) asprintf(&vars->mlinks[vars->mlinkc++], +"%.*s", +(int)(matches[2].rm_eo - matches[2].rm_so), +&cp[(int)matches[2].rm_so]); + } + return 1; + } + if (regexec(&links, in, 10, matches, 0) == 0) { + for (cp = &in[(int)matches[0].rm_eo] ; + regexec(&sublinks, cp, 10, matches, 0) == 0 ; + cp += matches[0].rm_eo) { (void) asprintf(&vars->links[vars->linkc++], "%.*s", (int)(matches[2].rm_eo - matches[2].rm_so), @@ -406,6 +422,12 @@ vars.bindir, vars.progname, vars.category, pdefs(&vars, buf, sizeof(buf), NULL)); } + /* binary links */ + for (i = 0 ; i < vars.linkc ; i++) { + printf(".%s\t\tbase-%s-bin\t%s\n", + vars.links[i], vars.category, + pdefs(&vars, buf, sizeof(buf), NULL)); + } /* scripts */ for (i = 0 ; i < vars.scriptc ; i++) { printf(".%s/%s\t\tbase-%s-bin\t%s\n", @@ -460,23 +482,23 @@ pdefs(&vars, buf, sizeof(buf), ".man")); } /* man page links */ - for (i = 0 ; i < vars.linkc ; i++) { + for (i = 0 ; i < vars.mlinkc ; i++) { printf(".%s/cat%c/%.*s.0\t\tcomp-%s-catman\t\t%s\n", vars.mandir, - vars.links[i][strlen(vars.links[i]) - 1], - (int)strlen(vars.links[i]) - 2, - vars.links[i], vars.category, + vars.mlinks[i][strlen(vars.mlinks[i]) - 1], + (int)strlen(vars.mlinks[i]) - 2, + vars.mlinks[i], vars.category, pdefs(&vars, buf, sizeof(buf), ".cat")); printf(".%s/html%c/%.*s.html\t\tcomp-%s-htmlman\t\t%s\n", vars.mandir, - vars.links[i][strlen(vars.links[i]) - 1], - (int)strlen(vars.links[i]) - 2, - vars.links[i], vars.category, + vars.mlinks[i][strlen(vars.mlinks[i]) - 1], + (int)strlen(vars.mlinks[i]) - 2, + vars.mlinks[i], vars.category, pdefs(&vars, buf, sizeof(buf), ".html")); printf(".%s/man%c/%s\t\tcomp-%s-man\t\t%s\n", vars.mandir, - vars.links[i][strlen(
CVS commit: othersrc/external/bsd/gensetlist
Module Name:othersrc Committed By: agc Date: Mon May 30 03:49:56 UTC 2011 Modified Files: othersrc/external/bsd/gensetlist: bsd.setlist.mk Log Message: add a guard to the passing of the MAN definition, since MKMAN will supercede any MAN definitions. only allow man pages to be listed in the set lists when MKMAN != "no". To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 othersrc/external/bsd/gensetlist/bsd.setlist.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/gensetlist/bsd.setlist.mk diff -u othersrc/external/bsd/gensetlist/bsd.setlist.mk:1.5 othersrc/external/bsd/gensetlist/bsd.setlist.mk:1.6 --- othersrc/external/bsd/gensetlist/bsd.setlist.mk:1.5 Mon May 23 06:31:24 2011 +++ othersrc/external/bsd/gensetlist/bsd.setlist.mk Mon May 30 03:49:56 2011 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.setlist.mk,v 1.5 2011/05/23 06:31:24 agc Exp $ +# $NetBSD: bsd.setlist.mk,v 1.6 2011/05/30 03:49:56 agc Exp $ # Copyright (c) 2010,2011 Alistair Crooks # All rights reserved. @@ -33,8 +33,10 @@ .endif .if defined(MAN) +. if defined(MKMAN) && ${MKMAN} != "no" GENSETLIST_ARGS+=-v MAN=${MAN:Q} GENSETLIST_ARGS+=-v MANDIR=${MANDIR:Q} +. endif .endif .if defined(INCS)
CVS commit: othersrc/external/bsd/gensetlist
Module Name:othersrc Committed By: agc Date: Mon May 30 03:48:36 UTC 2011 Modified Files: othersrc/external/bsd/gensetlist: gensetlist.c Log Message: rename the "subman" regexp to "sub" as it's used in other multiword defs, not just those for MAN= To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 othersrc/external/bsd/gensetlist/gensetlist.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/gensetlist/gensetlist.c diff -u othersrc/external/bsd/gensetlist/gensetlist.c:1.6 othersrc/external/bsd/gensetlist/gensetlist.c:1.7 --- othersrc/external/bsd/gensetlist/gensetlist.c:1.6 Thu May 19 16:48:16 2011 +++ othersrc/external/bsd/gensetlist/gensetlist.c Mon May 30 03:48:36 2011 @@ -33,7 +33,7 @@ #include #include -#define SETLIST_VERSION "20110513" +#define SETLIST_VERSION "20110522" enum { MAX_DEFS = 64, @@ -118,7 +118,7 @@ static regex_t bindir; static regex_t libdir; static regex_t mandir; - static regex_t subman; + static regex_t sub; static regex_t mlinks; static regex_t shlib; static regex_t incs; @@ -141,10 +141,8 @@ REG_EXTENDED); (void) regcomp(&scripts, "^[ \t]*SCRIPTS[ \t]*=", REG_EXTENDED); - (void) regcomp(&man, "^[ \t]*MAN[ \t]*=", -REG_EXTENDED); - (void) regcomp(&subman, "^[ \t]*([^ \t]+)", -REG_EXTENDED); + (void) regcomp(&man, "^[ \t]*MAN[ \t]*=", REG_EXTENDED); + (void) regcomp(&sub, "^[ \t]*([^ \t]+)", REG_EXTENDED); (void) regcomp(&prog, "^[ \t]*PROG[ \t]*=[ \t]*([^ \t]+)", REG_EXTENDED); (void) regcomp(&bindir, "^[ \t]*BINDIR[ \t]*=[ \t]*([^ \t]+)", @@ -180,7 +178,7 @@ } if (regexec(&man, in, 10, matches, 0) == 0) { for (cp = &in[(int)matches[0].rm_eo] ; - regexec(&subman, cp, 10, matches, 0) == 0 ; + regexec(&sub, cp, 10, matches, 0) == 0 ; cp += matches[0].rm_eo) { (void) asprintf(&vars->mans[vars->manc++], "%.*s", @@ -230,7 +228,7 @@ } if (regexec(&incs, in, 10, matches, 0) == 0) { for (cp = &in[(int)matches[0].rm_eo] ; - regexec(&subman, cp, 10, matches, 0) == 0 ; + regexec(&sub, cp, 10, matches, 0) == 0 ; cp += matches[0].rm_eo) { (void) asprintf(&vars->incs[vars->incc++], "%.*s",
CVS commit: othersrc/external/bsd/gensetlist
Module Name:othersrc Committed By: agc Date: Mon May 23 06:31:25 UTC 2011 Modified Files: othersrc/external/bsd/gensetlist: bsd.setlist.mk Log Message: where there are multiple scripts and no syspkg category, take the first script name as being the category. also remove unwanted characters from the syspkg category names (not just for scripts but for any category) To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 othersrc/external/bsd/gensetlist/bsd.setlist.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/gensetlist/bsd.setlist.mk diff -u othersrc/external/bsd/gensetlist/bsd.setlist.mk:1.4 othersrc/external/bsd/gensetlist/bsd.setlist.mk:1.5 --- othersrc/external/bsd/gensetlist/bsd.setlist.mk:1.4 Sat May 14 00:08:45 2011 +++ othersrc/external/bsd/gensetlist/bsd.setlist.mk Mon May 23 06:31:24 2011 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.setlist.mk,v 1.4 2011/05/14 00:08:45 agc Exp $ +# $NetBSD: bsd.setlist.mk,v 1.5 2011/05/23 06:31:24 agc Exp $ # Copyright (c) 2010,2011 Alistair Crooks # All rights reserved. @@ -72,11 +72,11 @@ . elif defined(LIB) CATEGORY=${LIB} . elif defined(SCRIPTS) -CATEGORY=${SCRIPTS:C|\.sh||} +CATEGORY=${SCRIPTS:Q:C|[. ]+.*||} . endif .endif .if defined(CATEGORY) -GENSETLIST_ARGS+=-c ${CATEGORY:Q} +GENSETLIST_ARGS+=-c ${CATEGORY:Q:C|-||g} .endif setlist: .PHONY
CVS commit: othersrc/external/bsd/gensetlist
Module Name:othersrc Committed By: agc Date: Thu May 19 16:48:16 UTC 2011 Modified Files: othersrc/external/bsd/gensetlist: gensetlist.c Log Message: allow for multiple header files in an INCS makefile statement (as found in libbluetooth, for example). % pwd /usr/src/lib/libbluetooth % make setlist ... [src/distrib/sets/lists/comp/mi] ./usr/include/bluetooth.h comp-c-include ./usr/include/sdp.h comp-c-include ./usr/share/man/cat3/bluetooth.0comp-bluetooth-catman .cat ... To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 othersrc/external/bsd/gensetlist/gensetlist.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/gensetlist/gensetlist.c diff -u othersrc/external/bsd/gensetlist/gensetlist.c:1.5 othersrc/external/bsd/gensetlist/gensetlist.c:1.6 --- othersrc/external/bsd/gensetlist/gensetlist.c:1.5 Tue May 17 00:22:44 2011 +++ othersrc/external/bsd/gensetlist/gensetlist.c Thu May 19 16:48:16 2011 @@ -151,8 +151,7 @@ REG_EXTENDED); (void) regcomp(&mandir, "^[ \t]*MANDIR[ \t]*=[ \t]*([^ \t]+)", REG_EXTENDED); - (void) regcomp(&incs, "^[ \t]*INCS[ \t]*=[ \t]*([^ \t]+)", -REG_EXTENDED); + (void) regcomp(&incs, "^[ \t]*INCS[ \t]*=", REG_EXTENDED); (void) regcomp(&incsdir, "^[ \t]*INCSDIR[ \t]*=[ \t]*([^ \t]+)", REG_EXTENDED); (void) regcomp(&mlinks, "^[ \t]*MLINKS[ \t]*=", @@ -230,10 +229,14 @@ return 1; } if (regexec(&incs, in, 10, matches, 0) == 0) { - (void) asprintf(&vars->incs[vars->incc++], - "%.*s", - (int)(matches[1].rm_eo - matches[1].rm_so), - &in[(int)matches[1].rm_so]); + for (cp = &in[(int)matches[0].rm_eo] ; + regexec(&subman, cp, 10, matches, 0) == 0 ; + cp += matches[0].rm_eo) { + (void) asprintf(&vars->incs[vars->incc++], +"%.*s", +(int)(matches[1].rm_eo - matches[1].rm_so), +&cp[(int)matches[1].rm_so]); + } return 1; } if (regexec(&incsdir, in, 10, matches, 0) == 0) {
CVS commit: othersrc/external/bsd/gensetlist
Module Name:othersrc Committed By: agc Date: Tue May 17 00:22:44 UTC 2011 Modified Files: othersrc/external/bsd/gensetlist: gensetlist.c Log Message: print the set name for scripts as well as program definitions (or both) To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 othersrc/external/bsd/gensetlist/gensetlist.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/gensetlist/gensetlist.c diff -u othersrc/external/bsd/gensetlist/gensetlist.c:1.4 othersrc/external/bsd/gensetlist/gensetlist.c:1.5 --- othersrc/external/bsd/gensetlist/gensetlist.c:1.4 Sat May 14 00:08:45 2011 +++ othersrc/external/bsd/gensetlist/gensetlist.c Tue May 17 00:22:44 2011 @@ -394,10 +394,13 @@ pdefs(&vars, buf, sizeof(buf), NULL)); } } - /* programs */ - if (vars.progname[0]) { + /* if a program or a script, then print the set name */ + if (vars.progname[0] || vars.scriptc > 0) { psetname(setname, sizeof(setname), "\n[src/distrib/sets/lists/base/mi]\n"); + } + /* programs */ + if (vars.progname[0]) { printf(".%s/%s\t\tbase-%s-bin\t%s\n", vars.bindir, vars.progname, vars.category, pdefs(&vars, buf, sizeof(buf), NULL));
CVS commit: othersrc/external/bsd/gensetlist
Module Name:othersrc Committed By: agc Date: Sat May 14 00:08:45 UTC 2011 Modified Files: othersrc/external/bsd/gensetlist: bsd.setlist.mk gensetlist.c Log Message: add the ability to generate set list entries for SCRIPTS. clean up the sources so that the lines don't wrap (for the minimalists amongst us) past 80 columns To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/gensetlist/bsd.setlist.mk \ othersrc/external/bsd/gensetlist/gensetlist.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/gensetlist/bsd.setlist.mk diff -u othersrc/external/bsd/gensetlist/bsd.setlist.mk:1.3 othersrc/external/bsd/gensetlist/bsd.setlist.mk:1.4 --- othersrc/external/bsd/gensetlist/bsd.setlist.mk:1.3 Tue May 10 06:42:13 2011 +++ othersrc/external/bsd/gensetlist/bsd.setlist.mk Sat May 14 00:08:45 2011 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.setlist.mk,v 1.3 2011/05/10 06:42:13 agc Exp $ +# $NetBSD: bsd.setlist.mk,v 1.4 2011/05/14 00:08:45 agc Exp $ # Copyright (c) 2010,2011 Alistair Crooks # All rights reserved. @@ -47,6 +47,11 @@ GENSETLIST_ARGS+=-v BINDIR=${BINDIR:Q} .endif +.if defined(SCRIPTS) +GENSETLIST_ARGS+=-v SCRIPTS=${SCRIPTS:Q} +GENSETLIST_ARGS+=-v SCRIPTSDIR=${SCRIPTSDIR:Q} +.endif + .if defined(MLINKS) GENSETLIST_ARGS+=-v MLINKS=${MLINKS:Q} .endif @@ -66,6 +71,8 @@ CATEGORY=${PROG} . elif defined(LIB) CATEGORY=${LIB} +. elif defined(SCRIPTS) +CATEGORY=${SCRIPTS:C|\.sh||} . endif .endif .if defined(CATEGORY) Index: othersrc/external/bsd/gensetlist/gensetlist.c diff -u othersrc/external/bsd/gensetlist/gensetlist.c:1.3 othersrc/external/bsd/gensetlist/gensetlist.c:1.4 --- othersrc/external/bsd/gensetlist/gensetlist.c:1.3 Tue May 10 06:41:26 2011 +++ othersrc/external/bsd/gensetlist/gensetlist.c Sat May 14 00:08:45 2011 @@ -33,11 +33,12 @@ #include #include -#define DISTLIST_VERSION "20101028" +#define SETLIST_VERSION "20110513" enum { MAX_DEFS = 64, MAX_VERSION = 20, + MAX_SCRIPTS = 32, MAX_LINKS = 512 }; @@ -53,16 +54,19 @@ int linkc; /* # of links */ char *symlinks[MAX_LINKS]; /* symbolic links */ int symlinkc; /* # of symbolic links */ + char *scripts[MAX_SCRIPTS]; /* scripts */ + int scriptc; /* # of scripts */ char progname[BUFSIZ]; /* program name */ char libname[BUFSIZ]; /* library name */ char bindir[MAXPATHLEN]; /* program directory */ + char scriptsdir[MAXPATHLEN];/* scripts directory */ char libdir[MAXPATHLEN]; /* library directory */ char incsdir[MAXPATHLEN]; /* include directory */ char mandir[MAXPATHLEN]; /* manual page directory */ int shlib; /* non-zero if lib is shared */ char major[MAX_VERSION]; /* shlib major */ char minor[MAX_VERSION]; /* shlib minor */ - char teeny[MAX_VERSION]; /* possible shlib minimus version */ + char teeny[MAX_VERSION]; /* possible minimus version */ char *category; /* category for syspkgs */ } vars_t; @@ -105,9 +109,12 @@ static int parse(vars_t *vars, const char *in) { + static regex_t scriptsdir; + static regex_t subscripts; static regex_t sublinks; static regex_t symlinks; static regex_t incsdir; + static regex_t scripts; static regex_t bindir; static regex_t libdir; static regex_t mandir; @@ -123,19 +130,39 @@ const char *cp; if (!compiled) { - (void) regcomp(&lib, "^[ \t]*LIB[ \t]*=[ \t]*([^ \t]+)", REG_EXTENDED); - (void) regcomp(&libdir, "^[ \t]*LIBDIR[ \t]*=[ \t]*([^ \t]+)", REG_EXTENDED); - (void) regcomp(&man, "^[ \t]*MAN[ \t]*=", REG_EXTENDED); - (void) regcomp(&subman, "^[ \t]*([^ \t]+)", REG_EXTENDED); - (void) regcomp(&prog, "^[ \t]*PROG[ \t]*=[ \t]*([^ \t]+)", REG_EXTENDED); - (void) regcomp(&bindir, "^[ \t]*BINDIR[ \t]*=[ \t]*([^ \t]+)", REG_EXTENDED); - (void) regcomp(&mandir, "^[ \t]*MANDIR[ \t]*=[ \t]*([^ \t]+)", REG_EXTENDED); - (void) regcomp(&incs, "^[ \t]*INCS[ \t]*=[ \t]*([^ \t]+)", REG_EXTENDED); - (void) regcomp(&incsdir, "^[ \t]*INCSDIR[ \t]*=[ \t]*([^ \t]+)", REG_EXTENDED); - (void) regcomp(&mlinks, "^[ \t]*MLINKS[ \t]*=", REG_EXTENDED); - (void) regcomp(&symlinks, "^[ \t]*SYMLINKS[ \t]*=", REG_EXTENDED); - (void) regcomp(&sublinks, "^[ \t]*([^ \t]+)[ \t]+([^ \t]+)", REG_EXTENDED); - (void) regcomp(&shlib, "^[ \t]*SHLIB_VERSION[ \t]*=[ \t]*([0-9]*)[:.]([0-9]*)[:.]([0-9]*)", + (void) regcomp(&lib, "^[ \t]*LIB[ \t]*=[ \t]*([^ \t]+)", +REG_EXTENDED); + (void) regcomp(&libdir, "^[ \t]*LIBDIR[ \t]*=[ \t]*([^ \t]+)", +REG_EXTENDED); + (void) regcomp(&scriptsdir, +"^[ \t]*SCRIPTSDIR[ \t]*=[ \t]*([^ \t]+)", +REG_EXTENDED); + (void) regcomp(&subscripts, "^[ \t]*([^ \t.]+)(\\.sh)?", +REG_EXTENDED); + (void) regcomp(&scripts, "^[ \t]*SCRIPTS[ \t]*=", +REG_EXTENDED); + (void) regcomp(&man, "^[ \t]*MAN[ \t]*=", +REG_EXTENDED); + (void) regcomp(&subman, "^[ \t]*([^ \t]+)", +REG_EXTENDED); + (void) regcomp(&pro
CVS commit: othersrc/external/bsd/gensetlist
Module Name:othersrc Committed By: agc Date: Tue May 10 06:42:13 UTC 2011 Modified Files: othersrc/external/bsd/gensetlist: Makefile bsd.setlist.mk Log Message: add license set binary directory explicitly To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/gensetlist/Makefile cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/gensetlist/bsd.setlist.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/gensetlist/Makefile diff -u othersrc/external/bsd/gensetlist/Makefile:1.1.1.1 othersrc/external/bsd/gensetlist/Makefile:1.2 --- othersrc/external/bsd/gensetlist/Makefile:1.1.1.1 Sat Mar 12 08:20:42 2011 +++ othersrc/external/bsd/gensetlist/Makefile Tue May 10 06:42:13 2011 @@ -1,9 +1,10 @@ -# $NetBSD: Makefile,v 1.1.1.1 2011/03/12 08:20:42 agc Exp $ +# $NetBSD: Makefile,v 1.2 2011/05/10 06:42:13 agc Exp $ SRCS=gensetlist.c PROG=gensetlist WARNS=4 MAN=gensetlist.8 +BINDIR=/usr/bin .include Index: othersrc/external/bsd/gensetlist/bsd.setlist.mk diff -u othersrc/external/bsd/gensetlist/bsd.setlist.mk:1.2 othersrc/external/bsd/gensetlist/bsd.setlist.mk:1.3 --- othersrc/external/bsd/gensetlist/bsd.setlist.mk:1.2 Mon May 9 15:03:58 2011 +++ othersrc/external/bsd/gensetlist/bsd.setlist.mk Tue May 10 06:42:13 2011 @@ -1,6 +1,30 @@ -# $NetBSD: bsd.setlist.mk,v 1.2 2011/05/09 15:03:58 agc Exp $ +# $NetBSD: bsd.setlist.mk,v 1.3 2011/05/10 06:42:13 agc Exp $ -# Makefile fragment to hand the args to "setlist" from the Makefile +# Copyright (c) 2010,2011 Alistair Crooks +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +#notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +#notice, this list of conditions and the following disclaimer in the +#documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +# Makefile fragment to hand the args to "gensetlist" from the Makefile .if defined(LIB) GENSETLIST_ARGS+=-v LIB=${LIB:Q} @@ -48,5 +72,5 @@ GENSETLIST_ARGS+=-c ${CATEGORY:Q} .endif -setlist: +setlist: .PHONY gensetlist ${GENSETLIST_ARGS}
CVS commit: othersrc/external/bsd/gensetlist
Module Name:othersrc Committed By: agc Date: Tue May 10 06:41:26 UTC 2011 Modified Files: othersrc/external/bsd/gensetlist: gensetlist.c Log Message: Occasional MAN definitions can hold multiple pages (see src/bin/pax for one example). Change the parsing of the contents of MAN definitions so that both single and multiple definitions of man pages can be recognised. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/gensetlist/gensetlist.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/gensetlist/gensetlist.c diff -u othersrc/external/bsd/gensetlist/gensetlist.c:1.2 othersrc/external/bsd/gensetlist/gensetlist.c:1.3 --- othersrc/external/bsd/gensetlist/gensetlist.c:1.2 Mon May 9 14:47:15 2011 +++ othersrc/external/bsd/gensetlist/gensetlist.c Tue May 10 06:41:26 2011 @@ -111,6 +111,7 @@ static regex_t bindir; static regex_t libdir; static regex_t mandir; + static regex_t subman; static regex_t mlinks; static regex_t shlib; static regex_t incs; @@ -124,7 +125,8 @@ if (!compiled) { (void) regcomp(&lib, "^[ \t]*LIB[ \t]*=[ \t]*([^ \t]+)", REG_EXTENDED); (void) regcomp(&libdir, "^[ \t]*LIBDIR[ \t]*=[ \t]*([^ \t]+)", REG_EXTENDED); - (void) regcomp(&man, "^[ \t]*MAN[ \t]*([+]?=)[ \t]*([^ \t]+)", REG_EXTENDED); + (void) regcomp(&man, "^[ \t]*MAN[ \t]*=", REG_EXTENDED); + (void) regcomp(&subman, "^[ \t]*([^ \t]+)", REG_EXTENDED); (void) regcomp(&prog, "^[ \t]*PROG[ \t]*=[ \t]*([^ \t]+)", REG_EXTENDED); (void) regcomp(&bindir, "^[ \t]*BINDIR[ \t]*=[ \t]*([^ \t]+)", REG_EXTENDED); (void) regcomp(&mandir, "^[ \t]*MANDIR[ \t]*=[ \t]*([^ \t]+)", REG_EXTENDED); @@ -151,10 +153,14 @@ return 1; } if (regexec(&man, in, 10, matches, 0) == 0) { - (void) asprintf(&vars->mans[vars->manc++], - "%.*s", - (int)(matches[2].rm_eo - matches[2].rm_so), - &in[(int)matches[2].rm_so]); + for (cp = &in[(int)matches[0].rm_eo] ; + regexec(&subman, cp, 10, matches, 0) == 0 ; + cp += matches[0].rm_eo) { + (void) asprintf(&vars->mans[vars->manc++], +"%.*s", +(int)(matches[1].rm_eo - matches[1].rm_so), +&cp[(int)matches[1].rm_so]); + } return 1; } if (regexec(&prog, in, 10, matches, 0) == 0) {
CVS commit: othersrc/external/bsd/gensetlist
Module Name:othersrc Committed By: agc Date: Mon May 9 15:03:58 UTC 2011 Modified Files: othersrc/external/bsd/gensetlist: bsd.setlist.mk Log Message: derive syspkg category (CATEGORY) from LIB or PROG if one of them is defined don't try to be smart with the gensetlist invocation, just call it when needed. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/gensetlist/bsd.setlist.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/gensetlist/bsd.setlist.mk diff -u othersrc/external/bsd/gensetlist/bsd.setlist.mk:1.1.1.1 othersrc/external/bsd/gensetlist/bsd.setlist.mk:1.2 --- othersrc/external/bsd/gensetlist/bsd.setlist.mk:1.1.1.1 Sat Mar 12 08:20:42 2011 +++ othersrc/external/bsd/gensetlist/bsd.setlist.mk Mon May 9 15:03:58 2011 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.setlist.mk,v 1.1.1.1 2011/03/12 08:20:42 agc Exp $ +# $NetBSD: bsd.setlist.mk,v 1.2 2011/05/09 15:03:58 agc Exp $ # Makefile fragment to hand the args to "setlist" from the Makefile @@ -31,13 +31,22 @@ GENSETLIST_ARGS+=-v SYMLINKS=${SYMLINKS:Q} .endif +# guard keyword i.e. MKWIBBLE - just give the "wibble" part .if defined(GUARD) GENSETLIST_ARGS+=-D ${GUARD:Q} .endif +# syspkg category +.if !defined(CATEGORY) +. if defined(PROG) +CATEGORY=${PROG} +. elif defined(LIB) +CATEGORY=${LIB} +. endif +.endif .if defined(CATEGORY) GENSETLIST_ARGS+=-c ${CATEGORY:Q} .endif setlist: - ${.CURDIR}/../gensetlist ${GENSETLIST_ARGS} + gensetlist ${GENSETLIST_ARGS}
CVS commit: othersrc/external/bsd/gensetlist
Module Name:othersrc Committed By: agc Date: Mon May 9 14:47:15 UTC 2011 Modified Files: othersrc/external/bsd/gensetlist: gensetlist.c Log Message: Add a ".debug" extension to all compat debug libraries - as pointed out by Nicholas Joly on tech-userlevel. Many thanks! To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/gensetlist/gensetlist.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/gensetlist/gensetlist.c diff -u othersrc/external/bsd/gensetlist/gensetlist.c:1.1.1.1 othersrc/external/bsd/gensetlist/gensetlist.c:1.2 --- othersrc/external/bsd/gensetlist/gensetlist.c:1.1.1.1 Sat Mar 12 08:20:42 2011 +++ othersrc/external/bsd/gensetlist/gensetlist.c Mon May 9 14:47:15 2011 @@ -438,7 +438,7 @@ vars.libdir, compat->arch32, vars.libname, pdefs(&vars, buf, sizeof(buf), "compat,pic")); if (vars.shlib) { -printf("./usr/libdata/debug%s/%s/lib%s.so.%s.%s\t\tcomp-compat-shlib\t%s\n", +printf("./usr/libdata/debug%s/%s/lib%s.so.%s.%s.debug\t\tcomp-compat-shlib\t%s\n", vars.libdir, compat->arch32, vars.libname, vars.major, vars.minor, pdefs(&vars, buf, sizeof(buf), "compat,pic,debug")); }
CVS commit: othersrc/external/bsd/gensetlist
Module Name:othersrc Committed By: wiz Date: Sat Mar 12 13:23:17 UTC 2011 Modified Files: othersrc/external/bsd/gensetlist: gensetlist.8 Log Message: Sort options. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/gensetlist/gensetlist.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/gensetlist/gensetlist.8 diff -u othersrc/external/bsd/gensetlist/gensetlist.8:1.1.1.1 othersrc/external/bsd/gensetlist/gensetlist.8:1.2 --- othersrc/external/bsd/gensetlist/gensetlist.8:1.1.1.1 Sat Mar 12 08:20:42 2011 +++ othersrc/external/bsd/gensetlist/gensetlist.8 Sat Mar 12 13:23:17 2011 @@ -1,4 +1,4 @@ -.\" $NetBSD: gensetlist.8,v 1.1.1.1 2011/03/12 08:20:42 agc Exp $ +.\" $NetBSD: gensetlist.8,v 1.2 2011/03/12 13:23:17 wiz Exp $ .\" .\" Copyright (c) 2010 Alistair Crooks .\" All rights reserved. @@ -31,9 +31,9 @@ .Nd create set list entries during build process .Sh SYNOPSIS .Nm -.Fl D definition .Fl V .Fl c category +.Fl D definition .Fl v NAME=VALUE .Sh DESCRIPTION The @@ -51,6 +51,9 @@ The following options are used with .Nm .Bl -tag -width aardvark +.It Fl c +The category is used, as part of the process of adding the files +to the now almost defunct syspkgs set name. .It Fl D The definition is used as a guard, and added to the set files which, in turn, will add the file to the set list if the definition @@ -59,9 +62,6 @@ Prints the version information for .Nm to standard error. -.It Fl c -The category is used, as part of the process of adding the files -to the now almost defunct syspkgs set name. .It Fl v This option is used as part of a (key, value) pair to add the definitions from the build infrastructure.
CVS commit: othersrc/external/bsd/gensetlist
Module Name:othersrc Committed By: agc Date: Sat Mar 12 08:20:42 UTC 2011 Update of /cvsroot/othersrc/external/bsd/gensetlist In directory ivanova.netbsd.org:/tmp/cvs-serv25174 Log Message: Import into othersrc the setlist maintenance code, as explained in http://mail-index.netbsd.org/tech-userlevel/2010/10/31/msg004135.html The code generates setlist entries automatically from the definitions in BSD Makefiles. Status: Vendor Tag: CROOKS Release Tags: gensetlist-base N othersrc/external/bsd/gensetlist/gensetlist.c N othersrc/external/bsd/gensetlist/Makefile N othersrc/external/bsd/gensetlist/bsd.setlist.mk N othersrc/external/bsd/gensetlist/gensetlist.8 N othersrc/external/bsd/gensetlist/lib/shlib_version N othersrc/external/bsd/gensetlist/lib/Makefile N othersrc/external/bsd/gensetlist/netpgp/Makefile No conflicts created by this import