Mercurial > octave
changeset 21631:43d9eec519bd
build: generate HG-ID even if hg is not installed
* Makefile.am (HG-ID): Fill with "unknown" if .hg is present but the hg
command fails.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Tue, 19 Apr 2016 14:17:31 -0700 |
parents | b5d9b95d1e1a |
children | e3c44a120a8c |
files | Makefile.am |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile.am Tue Apr 19 15:27:19 2016 +0200 +++ b/Makefile.am Tue Apr 19 14:17:31 2016 -0700 @@ -289,11 +289,11 @@ HG-ID: $(AM_V_GEN)rm -f $@-t && \ if [ -d $(srcdir)/.hg ]; then \ - ( cd $(srcdir) && hg identify --id ) > $@-t && \ + ( cd $(srcdir) && hg identify --id || echo "unknown" ) > $@-t && \ $(simple_move_if_change_rule); \ elif [ ! -f $(srcdir)/HG-ID ]; then \ echo "$(srcdir)/HG-ID is missing!" 1>&2; \ - echo "unknown" >& $@-t && mv $@-t $@; \ + echo "unknown" > $@-t && mv $@-t $@; \ else \ echo "preserving existing HG-ID file" 1>&2; \ $(cp_update_rule); \