[prev in list] [next in list] [prev in thread] [next in thread]
List: cmake
Subject: Re: [CMake] Only install file if it does not exist?
From: Bob Tanner <tanner () real-time ! com>
Date: 2009-09-10 4:15:18
Message-ID: h89ugm$74e$1 () ger ! gmane ! org
[Download RAW message or body]
On 2009-09-09 05:53:15 -0500, David Cole
<david.cole@kitware.com> said:
> Or just use "install(FILES" -- it already does the "if not exists, if newer
> than" checks...
INSTALL (
FILES ${CMAKE_CURRENT_SOURCE_DIR}/sample_features
DESTINATION etc
RENAME features
)
Using that, if "etc/features" exists and I run "make install" features
gets overwritten every time.
$ file etc/features
etc/features: ASCII English text
$ echo "XXXXXXXXX" >> etc/features
$ grep "XXXXXXXXX" etc/features
XXXXXXXXX
$ cd path/in-source/build
$ make install
$ grep "XXXXXXXXX" etc/features
$ echo $?
1
Here is the Makefile login I'm attempting to mimic:
if [ ! -f $(DESTDIR)$(SYSCONFDIR)/features ]; then \
$(INSTALLDATA) ${srcdir}/sample_features $(DESTDIR)$(SYSCONFDIR)/features ; \
fi
--
Bob Tanner <tanner@real-time.com> | Phone : (952 943-8700
http://www.real-time.com, Linux, OSX, VMware | Fax : (952)943-8500
Key fingerprint = F785 DDFC CF94 7CE8 AA87 3A9D 3895 26F1 0DDB E378
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic