Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/distrib/utils/embedded



On Sep 15,  5:59pm, ast%NetBSD.org@localhost (Adrian Steinmann) wrote:
-- Subject: Re: CVS commit: src/distrib/utils/embedded

| On Sun, Sep 15, 2013 at 01:26:51PM +0000, Christos Zoulas wrote:
| > In article <20130914125127.7648E46%cvs.netbsd.org@localhost>,
| > Adrian Steinmann <source-changes-d%NetBSD.org@localhost> wrote:
| > 
| > 1. This is useless in the .conf files since mkimage sets it alreay.
| > >+GZIP_CMD=${TOOL_GZIP:-gzip} # ${GZIP} is special to gzip(1)
| Well yes, but it is not said that this config file might eventually
| be pulled in by something else not defining TOOL_GZIP. I could have
| indeed left the naked "gzip" in there, but I would think that when
| TOOL_GZIP is defined, it is what should be used.  In other words,
| I thought about it a bit and found this to be the best choice.

Yes, so go ahead and define all the other variables those scripts
assume that are set, like "release" "srcs" etc. Preferably with a
different definition than the one we have in mkimage to make
debugging more interesting. There is a reason those are called .conf;
they are not and they were not meant to be standalone -- by design.
Duplicating definitions should be always the solution of last resort.

| > 2. You might as well rename the rest of the variables _CMD for conistency.
| I used distrib/sets/sets.subr as an example, which does this:
| 
| : ${AWK:=awk}
| : ${CKSUM:=cksum}
| : ${COMM:=comm}
| : ${DATE:=date}
| : ${DB:=db}
| : ${EGREP:=egrep}
| : ${ENV_CMD:=env}       # ${ENV} is special to sh(1), ksh(1), etc.
| : ${FGREP:=fgrep}
| : ${FIND:=find}
| : ${GREP:=grep}
| : ${GZIP_CMD:=gzip}     # ${GZIP} is special to gzip(1)
| : ${HOSTNAME_CMD:=hostname}     # ${HOSTNAME} is special to bash(1)
| : ${HOST_SH:=sh}
| : ${IDENT:=ident}
| : ${JOIN:=join}
| : ${LS:=ls}
| : ${MAKE:=make}
| : ${MKTEMP:=mktemp}
| : ${MTREE:=mtree}
| : ${PASTE:=paste}
| : ${PAX:=pax}
| : ${PRINTF:=printf}
| : ${SED:=sed}
| : ${SORT:=sort}
| : ${STAT:=stat}
| : ${TSORT:=tsort}
| : ${UNAME:=uname}
| : ${WC:=wc}

That's ok then, as long as there is some prior art...

christos


Home | Main Index | Thread Index | Old Index