[OpenAFS-devel] pinstall versus install-sh

C. Alex. North-Keys erlkonig@isgenesis.com
Thu, 22 Dec 2005 12:52:04 -0600


Russ Allbery wrote:
>>One problem with install-sh is that it does not preserve mtime.  Doesn't
>>pinstall preserve mtime and avoid the copy if the file didn't change?
>>Without this feature you would rebuild the world much more often.

If it wasn't for the apparent lack of support for make's %-rules, I'd 
suggest even letting make do the determination of whether the call to 
whichever *install was needed.

$(DESTBIN)/% : %
	$(INSTALL_PROGRAM) $< $@

INSTALLS = $(DESTBIN)/foo       # ... $(DESTMAN1)/foo.man too
INSTALL_PROGRAM = $(INSTALL) -s # just an example

install : $(INSTALLS)
uninstall :
	$(RM) $(INSTALLS)

However, a number of version of make, especially older ones, only have 
the much more limited .x.y rules.

> make should do this, not your install program.

I feel like some of install's feature just work around weaknesses in 
ancient versions of make.

> That being said, if it's the path of least resistance, I can hack
> install-sh to support -p and make Autoconf require that the system install
> program support -p in order to use it.
> 
> But I'd rather get make to solve this problem.  It's better at it.
> 

-- 
C. Alex. North-Keys
Catalis, Inc.
erlkonig@TheCatalis.com
512.874.7666