Changeset 652 for CMT/HEAD/source/cmt_generators.cxx
- Timestamp:
- Nov 5, 2013, 3:40:52 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CMT/HEAD/source/cmt_generators.cxx
r628 r652 2841 2841 m_PACKAGEFULLNAME.set ("PACKAGEFULLNAME"); 2842 2842 m_ISLOCAL.set ("ISLOCAL"); 2843 m_ISINCLUDED.set ("ISINCLUDED"); 2843 2844 2844 2845 packages_header_fragment.set ("packages_header"); … … 2854 2855 m_PACKAGEFULLNAME = ""; 2855 2856 m_ISLOCAL = ""; 2857 m_ISINCLUDED = ""; 2856 2858 2857 2859 packages_header_fragment.reset (); … … 2899 2901 if (!packages_header_fragment.copy (m_output_file, 1, &m_PACKAGE)) return; 2900 2902 2901 Project* cur = Project::get_current ();2903 const Project* p_cur (Project::get_current ()); 2902 2904 Use::UsePtrVector uses (Use::get_ordered_uses ()); 2903 2905 uses.push_back (&Use::current ()); 2906 2907 Project::ConstProjectPtrVector path_exclusions; 2908 Project::fill_exclusion (path_exclusions); 2909 2904 2910 cmt_string temp; 2905 2911 for (int i = uses.size () - 1; i >= 0; i--) 2906 2912 { 2907 2913 Use* use = uses[i]; 2914 2908 2915 if (use->discarded) continue; 2909 2916 if (use->m_hidden) continue; … … 2911 2918 if (use->get_package ()->is_cmt ()) continue; 2912 2919 2913 if (use->get_project () == cur) 2914 m_ISLOCAL = "is_local"; 2915 else 2916 m_ISLOCAL = "is_not_local"; 2920 const Project* up = use->get_project (); 2921 2922 m_ISLOCAL = "is_not_local"; 2923 if (p_cur) 2924 { 2925 if (up) 2926 { 2927 if (up == p_cur) 2928 { 2929 m_ISLOCAL = "is_local"; 2930 } 2931 } 2932 else 2933 { 2934 if (use->get_realpath ().find (p_cur->get_cmtpath_real ()) == 0) 2935 { 2936 m_ISLOCAL = "is_local"; 2937 } 2938 } 2939 } 2940 else if (use == &Use::current ()) 2941 { 2942 m_ISLOCAL = "is_local"; 2943 } 2944 2945 m_ISINCLUDED = "is_included"; 2946 for (int j = 0; j < path_exclusions.size (); j++) 2947 { 2948 const Project* sp = path_exclusions[j]; 2949 if (up) 2950 { 2951 if (up == sp) 2952 { 2953 m_ISINCLUDED = "is_not_included"; 2954 } 2955 } 2956 else 2957 { 2958 if (use->get_realpath ().find (sp->get_cmtpath_real ()) == 0) 2959 { 2960 m_ISINCLUDED = "is_not_included"; 2961 } 2962 } 2963 } 2917 2964 2918 2965 temp = use->get_full_path (); … … 2927 2974 temp += "mgr"; 2928 2975 break; 2976 default: 2977 break; 2929 2978 } 2930 2979 #ifdef WIN32 … … 2932 2981 #endif 2933 2982 m_PACKAGEMGRPATH = temp; 2934 // fprintf (m_output_file, "%s\n", temp.c_str());2935 2983 2936 2984 temp = ""; … … 2956 3004 #endif 2957 3005 m_PACKAGEFULLNAME = temp; 2958 // fprintf (m_output_file, "%s\n", temp.c_str());2959 3006 2960 3007 m_PACKAGE = use->get_package_name (); … … 2991 3038 } 2992 3039 2993 if (!package_fragment.copy (m_output_file, 6,3040 if (!package_fragment.copy (m_output_file, 7, 2994 3041 &m_PACKAGE, &m_PACKAGEPREFIX, 2995 3042 &m_DEPENDENCIES, 2996 3043 &m_PACKAGEMGRPATH, &m_PACKAGEFULLNAME, 2997 &m_ISLOCAL )) return;3044 &m_ISLOCAL, &m_ISINCLUDED)) return; 2998 3045 } 2999 3046 … … 3016 3063 3017 3064 CmtSystem::close_ostream (m_output_file, new_file_name); 3018 // fclose (m_output_file);3019 3065 3020 3066 commit (new_file_name);
Note: See TracChangeset
for help on using the changeset viewer.