[sr-dev] command name sercmd hardwired in Makefile

Andrei Pelinescu-Onciul andrei at iptel.org
Wed Jul 1 17:36:41 CEST 2009


On Jul 01, 2009 at 10:35, Juha Heinanen <jh at tutpro.com> wrote:
> i changed
> 
 [...]
> what is the proper fix?
> 
> my suggestion is to add to Makefile.defs a new variable SHORT_NAME,
> which could default to ser:
> 
> SHORT_NAME=ser
> 
> and then use that Makefile:
> 
> utils_bin_install=	utils/gen_ha1/gen_ha1 utils/sercmd/$(SHORTNAME)cmd

Changing the name of the binaries would be confusing. 
If you run make cfg SHORT_NAME=sip-router; make all and then
make cfg SHORT_NAME=ser; make proper  you will still remain with
uncleaned files.

How about only installing using a different name? Let it compile to
sercmd, but make install would install it under UT_NAME (one could
 do a sed -e 's/^ser/$(UT_NAME)'  in install-utils:).

> 
> and also in utils/sercmd/Makefile:
> 
> NAME=$(SHORT_NAME)cmd
> 
> and also in modules_s/ctl/ctl_defaults.h instead of ser:
> 
> #define DEFAULT_CTL_SOCKET  "unixs:/tmp/ser_ctl"

That would be even more tricky. You would have to fix possible mentions
in the docs and even then differently named sercmds will use different default
sockets => lost of "support" problems.

Andrei



More information about the sr-dev mailing list