[cmake] No "make install" target

Bug #423556 reported by Bob Tanner
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Netrek Server
Fix Committed
Critical
Bob Tanner
Nominated for Upstream by r12056

Bug Description

Taken from James email to netrek-devel.

a. there is no "make install" target, so one can't complete the task of getting a server built and operational, ... this is critical,

Tags: cmake
Bob Tanner (tanner)
Changed in netrek-server:
status: New → Confirmed
assignee: nobody → Bob Tanner (tanner)
Bob Tanner (tanner)
Changed in netrek-server:
milestone: none → 2.16.1
Revision history for this message
Bob Tanner (tanner) wrote :
Download full text (13.0 KiB)

Just adding this for my own reference.

http://www.cmake.org/cmake/help/cmake2.6docs.html

install: Specify rules to run at install time.

This command generates installation rules for a project. Rules specified by calls to this command within a source directory are executed in order during installation. The order across directories is not defined.

There are multiple signatures for this command. Some of them define installation properties for files and targets. Properties common to multiple signatures are covered here but they are valid only for signatures that specify them.

DESTINATION arguments specify the directory on disk to which a file will be installed. If a full path (with a leading slash or drive letter) is given it is used directly. If a relative path is given it is interpreted relative to the value of CMAKE_INSTALL_PREFIX.

PERMISSIONS arguments specify permissions for installed files. Valid permissions are OWNER_READ, OWNER_WRITE, OWNER_EXECUTE, GROUP_READ, GROUP_WRITE, GROUP_EXECUTE, WORLD_READ, WORLD_WRITE, WORLD_EXECUTE, SETUID, and SETGID. Permissions that do not make sense on certain platforms are ignored on those platforms.

The CONFIGURATIONS argument specifies a list of build configurations for which the install rule applies (Debug, Release, etc.).

The COMPONENT argument specifies an installation component name with which the install rule is associated, such as "runtime" or "development". During component-specific installation only install rules associated with the given component name will be executed. During a full installation all components are installed.

The RENAME argument specifies a name for an installed file that may be different from the original file. Renaming is allowed only when a single file is installed by the command.

The OPTIONAL argument specifies that it is not an error if the file to be installed does not exist.

The TARGETS signature:

  install(TARGETS targets... [EXPORT <export-name>]
          [[ARCHIVE|LIBRARY|RUNTIME|FRAMEWORK|BUNDLE|
            PRIVATE_HEADER|PUBLIC_HEADER|RESOURCE]
           [DESTINATION <dir>]
           [PERMISSIONS permissions...]
           [CONFIGURATIONS [Debug|Release|...]]
           [COMPONENT <component>]
           [OPTIONAL] [NAMELINK_ONLY|NAMELINK_SKIP]
          ] [...])

The TARGETS form specifies rules for installing targets from a project. There are five kinds of target files that may be installed: ARCHIVE, LIBRARY, RUNTIME, FRAMEWORK, and BUNDLE. Executables are treated as RUNTIME targets, except that those marked with the MACOSX_BUNDLE property are treated as BUNDLE targets on OS X. Static libraries are always treated as ARCHIVE targets. Module libraries are always treated as LIBRARY targets. For non-DLL platforms shared libraries are treated as LIBRARY targets, except that those marked with the FRAMEWORK property are treated as FRAMEWORK targets on OS X. For DLL platforms the DLL part of a shared library is treated as a RUNTIME target and the corresponding import library is treated as an ARCHIVE target. All Windows-based systems including Cygwin are DLL platforms. The ARCHIVE, LIBRARY, RUNTIME, and FRAMEWORK arguments change the type of target to which...

Revision history for this message
Bob Tanner (tanner) wrote :

INSTALL()

    Any target included within an INSTALL command will be executed when the user executes make install. So in short, it is an install hook for any target that the user wishes to install. Originally, CMake had several different INSTALL_<target_type>() commands. As of CMake Version 2.6, they have consolidated all of these forms into one command giving this function a considerable amount of complexity:

    INSTALL( TARGETS target [ target1 target2 ...]
                  [ RUNTIME DESTINATION path |
                    LIBRARY DESTINATION lib_path |
                    ARCHIVE DESTINATION arch_path ] )

    NOTE: Any path is automatically prefixed by CMAKE_INSTALL_PREFIX.

    TARGETS, RUNTIME, LIBRARY, ARCHIVE, and DESTINATION are all directives/labels that CMAKE uses internally. When a target is created it is given a property label automatically by CMake if it is created using one of the standard ADD_<type>() commands.

        * ADD_EXECUTABLE( target ...): The target is labeled as RUNTIME.
        * ADD_LIBRARY( target ...): The target is labeled as a LIBRARY.

summary: - [cmake] No "make install" targe
+ [cmake] No "make install" target
Revision history for this message
Bob Tanner (tanner) wrote :
Changed in netrek-server:
status: Confirmed → Fix Committed
Revision history for this message
James Cameron (quozl) wrote :

Merged with http://james.tooraweenah.com/darcs/netrek-server/ please pull.

I've removed the touch of planets, as it is not necessary so long as the directory is writable. daemon copes fine with planets file (N_PLFILE, PlFile) not existing at startup. Also reviewed that part of the daemon and fixed a file descriptor leak which will happen if resetgalaxy is true.

I've removed the duplicate sample_sysdef file from the repository ... we'll have to find a way to avoid duplicating the sample_sysdef.in file, e.g. by copying it to sample_sysdef at build or install time.

Otherwise looks good.

Revision history for this message
Bob Tanner (tanner) wrote :

Straight out copy and rename will not work. Inside the sample_sysdef.in file are 2 autotool place holders:

INL=@INL@
INL_RECORD=@INL@

I setup cmake to replace the place holders, by default, with 0 (Off) and copy to ${PREFIX}/etc/sysdef

Turning on INL build exposed a build build, see Bug #429587

Patch pushed, same location as noted above.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.