[Top][All Lists]

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

Re: Using @bindir@ etc. in C headers

From: Peter Johansson
Subject: Re: Using @bindir@ etc. in C headers
Date: Mon, 8 Jun 2020 10:56:38 +1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

On 8/6/20 10:14 am, Hans Ulrich Niedermann wrote:
        echo '/* Autogenerated file. Do not modify. */' > install-paths.h.tmp
        echo '#define BINDIR "$(bindir)"' >> install-paths.h.tmp
        @if test -f install-paths.h \
            && $(CMP) install-paths.h.tmp install-paths.h; then \
          echo "Not updating install-paths.h: it is up to date"; \
          rm -f install-paths.h.tmp; \
        else \
          echo "Updating install-paths.h"; \
          mv -f install-paths.h.tmp install-paths.h; \

Yes, that has its obvious advantages compared with my simple rule For people having many such rules, gnulib provides a shell script, move-if-change, with that if-else logic;a=blob;f=build-aux/move-if-change;h=653dc9815999073ceec2caba1b78ec8942e7973c;hb=HEAD


reply via email to

[Prev in Thread] Current Thread [Next in Thread]