On 2009-09-09 05:53:15 -0500, David Cole <[email protected]> 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 <[email protected]>                  | 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

Reply via email to