diff --git a/dtool/Config.pp b/dtool/Config.pp index 7600864cf0..ffd37f9d21 100644 --- a/dtool/Config.pp +++ b/dtool/Config.pp @@ -510,6 +510,10 @@ #define USE_COMPILER GCC #endif +// Permission masks to install data and executable files, +// respectively. This is only meaningful for Unix systems. +#define INSTALL_UMASK_DATA 644 +#define INSTALL_UMASK_PROG 755 // How to invoke bison and flex. Panda takes advantage of some // bison/flex features, and therefore specifically requires bison and @@ -660,8 +664,8 @@ // a running program without crashing the running instance. However, // it doesn't understanding installing a program from a subdirectory, // so we have to cd into the source directory first. -#defer INSTALL $[if $[ne $[dir $[local]], ./],cd ./$[dir $[local]] &&] install -m 666 $[notdir $[local]] $[dest] -#defer INSTALL_PROG $[if $[ne $[dir $[local]], ./],cd ./$[dir $[local]] &&] install -m 777 $[notdir $[local]] $[dest] +#defer INSTALL $[if $[ne $[dir $[local]], ./],cd ./$[dir $[local]] &&] install -m $[INSTALL_UMASK_DATA] $[notdir $[local]] $[dest]/ +#defer INSTALL_PROG $[if $[ne $[dir $[local]], ./],cd ./$[dir $[local]] &&] install -m $[INSTALL_UMASK_PROG] $[notdir $[local]] $[dest]/ // Variable definitions for building with the Irix MIPSPro compiler. #if $[eq $[USE_COMPILER], MIPS] diff --git a/dtool/pptempl/Template.gmsvc.pp b/dtool/pptempl/Template.gmsvc.pp index 1eabdf3969..35c579c360 100644 --- a/dtool/pptempl/Template.gmsvc.pp +++ b/dtool/pptempl/Template.gmsvc.pp @@ -423,19 +423,19 @@ $[TAB] rm -f $[sort $[installed_files]] $[install_lib_dir]/$[get_dllname $[TARGET]].$[dlllib] : $[ODIR]/$[get_dllname $[TARGET]].$[dlllib] #define local $[get_dllname $[TARGET]].$[dlllib] #define dest $[install_lib_dir] -$[TAB] cp -f $[ODIR]/$[local] $[dest] +$[TAB] cp -f $[ODIR]/$[local] $[dest]/ #endif $[install_lib_dir]/$[get_dllname $[TARGET]].lib : $[ODIR]/$[get_dllname $[TARGET]].lib #define local $[get_dllname $[TARGET]].lib #define dest $[install_lib_dir] -$[TAB] cp -f $[ODIR]/$[local] $[dest] +$[TAB] cp -f $[ODIR]/$[local] $[dest]/ #if $[and $[build_dlls],$[build_pdbs]] $[install_lib_dir]/$[get_dllname $[TARGET]].pdb : $[ODIR]/$[get_dllname $[TARGET]].pdb #define local $[get_dllname $[TARGET]].pdb #define dest $[install_lib_dir] -$[TAB] cp -f $[ODIR]/$[local] $[dest] +$[TAB] cp -f $[ODIR]/$[local] $[dest]/ #endif #if $[igatescan] @@ -454,7 +454,7 @@ $[TAB] cp -f $[ODIR]/$[local] $[dest] $[igatedb:$[ODIR]/%=$[install_igatedb_dir]/%] : $[igatedb] #define local $[igatedb] #define dest $[install_igatedb_dir] -$[TAB] cp -f $[local] $[dest] +$[TAB] cp -f $[local] $[dest]/ // We have to split this out as a separate rule to properly support // parallel make. @@ -606,7 +606,7 @@ $[TAB] rm -f $[sort $[installed_files]] $[install_lib_dir]/$[get_dllname $[TARGET]].lib : $[ODIR]/$[get_dllname $[TARGET]].lib #define local $[get_dllname $[TARGET]].lib #define dest $[install_lib_dir] -$[TAB] cp -f $[ODIR]/$[local] $[dest] +$[TAB] cp -f $[ODIR]/$[local] $[dest]/ #end static_lib_target ss_lib_target @@ -641,7 +641,7 @@ $[TAB] rm -f $[sort $[installed_files]] #define local $[TARGET] #define dest $[install_bin_dir] $[install_bin_dir]/$[TARGET] : $[ODIR]/$[TARGET] -$[TAB] cp -f $[ODIR]/$[local] $[dest] +$[TAB] cp -f $[ODIR]/$[local] $[dest]/ #end sed_bin_target @@ -695,13 +695,13 @@ $[TAB] rm -f $[sort $[installed_files]] $[install_bin_dir]/$[TARGET].exe : $[ODIR]/$[TARGET].exe #define local $[TARGET].exe #define dest $[install_bin_dir] -$[TAB] cp -f $[ODIR]/$[local] $[dest] +$[TAB] cp -f $[ODIR]/$[local] $[dest]/ #if $[build_pdbs] $[install_bin_dir]/$[TARGET].pdb : $[ODIR]/$[TARGET].pdb #define local $[TARGET].pdb #define dest $[install_bin_dir] -$[TAB] cp -f $[ODIR]/$[local] $[dest] +$[TAB] cp -f $[ODIR]/$[local] $[dest]/ #endif #if $[bin_postprocess_target] @@ -713,7 +713,7 @@ $[TAB] rm -f $[output_exe] $[TAB] $[bin_postprocess_cmd] $[bin_postprocess_arg1] $[input_exe] $[bin_postprocess_arg2] $[output_exe] $[install_bin_dir]/$[bin_postprocess_target].exe : $[output_exe] -$[TAB] cp -f $[output_exe] $[install_bin_dir] +$[TAB] cp -f $[output_exe] $[install_bin_dir]/ #endif #end bin_target @@ -846,42 +846,42 @@ $[TAB] $[COMPILE_C++] $[install_bin_dir]/$[file] : $[file] #define local $[file] #define dest $[install_bin_dir] -$[TAB] cp -f $[local] $[dest] +$[TAB] cp -f $[local] $[dest]/ #end file #foreach file $[install_headers] $[install_headers_dir]/$[file] : $[file] #define local $[file] #define dest $[install_headers_dir] -$[TAB] cp -f $[local] $[dest] +$[TAB] cp -f $[local] $[dest]/ #end file #foreach file $[install_parser_inc] $[install_parser_inc_dir]/$[file] : $[file] #define local $[file] #define dest $[install_parser_inc_dir] -$[TAB] cp -f $[local] $[dest] +$[TAB] cp -f $[local] $[dest]/ #end file #foreach file $[install_data] $[install_data_dir]/$[file] : $[file] #define local $[file] #define dest $[install_data_dir] -$[TAB] cp -f $[local] $[dest] +$[TAB] cp -f $[local] $[dest]/ #end file #foreach file $[install_config] $[install_config_dir]/$[file] : $[file] #define local $[file] #define dest $[install_config_dir] -$[TAB] cp -f $[local] $[dest] +$[TAB] cp -f $[local] $[dest]/ #end file #foreach file $[install_py] $[install_py_dir]/$[file] : $[file] #define local $[file] #define dest $[install_py_dir] -$[TAB] $[INSTALL] +$[TAB] cp -f $[local] $[dest]/ #end file #if $[install_py] @@ -1037,7 +1037,7 @@ $[TAB] @test -d $[install_headers_dir] || mkdir -p $[install_headers_dir] $[install_headers_dir]/$[CONFIG_HEADER] : $[CONFIG_HEADER] #define local $[CONFIG_HEADER] #define dest $[install_headers_dir] -$[TAB] cp -f $[local] $[dest] +$[TAB] cp -f $[local] $[dest]/ #endif #end Makefile