am: prefer a shorter idiom where possible
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 10 May 2013 08:57:38 +0000 (10:57 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 10 May 2013 08:57:38 +0000 (10:57 +0200)
That is, prefer:

    test -f FILE || do_action

over:

    if test ! -f FILE; then do_action; else :; fi

* lib/am/remake-hdr.am (%CONFIG_H%): Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
lib/am/remake-hdr.am

index 1703b01..979427d 100644 (file)
@@ -16,8 +16,8 @@
 
 %CONFIG_H%: %STAMP%
 ## Recover from removal of CONFIG_HEADER.
-       @if test ! -f $@; then rm -f %STAMP%; else :; fi
-       @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) %STAMP%; else :; fi
+       @test -f $@ || rm -f %STAMP%
+       @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) %STAMP%
 
 
 %STAMP%: %CONFIG_H_DEPS% $(top_builddir)/config.status