- Timestamp:
- Sep 22, 2008, 5:45:45 PM (16 years ago)
- Location:
- CMT/HEAD
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
CMT/HEAD/ChangeLog
r465 r466 1 2008-09-22 <rybkin@lal.in2p3.fr> 367 2 3 * source/cmt_generators.cxx: Implement the -no_static option for libraries 4 * source/cmt_generators.h: idem 5 * source/cmt_parser.cxx: idem 6 * source/cmt_commands.cxx: idem. Add the help text for the enhanced 7 cmt build windefs command which now accepts multiple object and/or library 8 files on the command line and/or via command file(s) and has an option 9 to specify the library name 10 * source/cmt_generator.h: In the build_windefs function, implement the 11 enhanced functionality of the cmt build windefs command 12 * source/cmt_generator.cxx: idem 13 * mgr/fragments/constituent_lock: Minor code cleanup 14 * mgr/requirements: Add the c option for the ar utility on Linux to avoid 15 the warning. Declare the library_no_static make fragment 16 * mgr/fragments/library_no_static: Introduce the make fragment to use with 17 the -no_static option 18 * mgr/fragments/nmake/library_no_static: idem for Windows 19 1 20 2008-07-30 <rybkin@lal.in2p3.fr> 366 2 21 -
CMT/HEAD/mgr/fragments/constituent_lock
r459 r466 58 58 ${CONSTITUENT} :: $(${CONSTITUENT}_dependencies) $(cmt_local_${CONSTITUENT}_makefile) 59 59 $(echo) "(constituents.make) Creating ${CONSTITUENT}${lock_suffix} and Starting ${CONSTITUENT}" 60 @ { ${lock_command} ${CONSTITUENT}${lock_suffix} || exit $$?; }; \60 @${lock_command} ${CONSTITUENT}${lock_suffix} || exit $$?; \ 61 61 retval=$$?; \ 62 62 trap '${unlock_command} ${CONSTITUENT}${lock_suffix}; exit $${retval}' 1 2 15; \ -
CMT/HEAD/mgr/requirements
r459 r466 350 350 LynxOS "ar clr" \ 351 351 RIO806X "ar clr" \ 352 Linux "ar r" \352 Linux "ar cr" \ 353 353 VisualC "lib.exe /nologo " 354 354 … … 493 493 make_fragment library 494 494 make_fragment library_no_share 495 make_fragment library_no_static 495 496 make_fragment application 496 497 make_fragment jar -
CMT/HEAD/source/cmt_commands.cxx
r459 r466 696 696 if (argc > 0) 697 697 { 698 fill_one_argument (); 698 // fill_one_argument (); 699 fill_arguments (); 699 700 cmt.m_action = action_build_windefs; 700 701 } … … 2184 2185 help_texts.add () = "build temporary_name : generate a name for a temprary file"; 2185 2186 help_texts.add () = "build triggers <constituent> : generate library trigger file"; 2186 help_texts.add () = "build windefs <library_name> : generate def file for Windows shared libraries";2187 help_texts.add () = "build windefs [-name=NAME] [@commandfile] (objectfile|library)... : generate def file for Windows shared library [NAME]"; 2187 2188 help_texts.add () = "check <option> : check actions. (Try cmt help check)"; 2188 2189 help_texts.add () = "check configuration : check configuration"; -
CMT/HEAD/source/cmt_generator.cxx
r459 r466 839 839 840 840 //-------------------------------------------------- 841 void Generator::build_windefs (const cmt_string& library_name)842 { 843 cmt_string bin; 841 //void Generator::build_windefs (const cmt_string& library_name) 842 void Generator::build_windefs (const CmtSystem::cmt_string_vector& arguments) 843 { 844 844 cmt_string name; 845 cmt_string suffix; 846 847 CmtSystem::dirname (library_name, bin); 848 CmtSystem::get_dot_suffix (library_name, suffix); 849 CmtSystem::basename (library_name, suffix, name); 845 CmtSystem::cmt_string_vector files; 846 847 for (int i = 0; i < arguments.size (); i++) 848 { 849 const cmt_string& w = arguments[i]; 850 if (w.substr (0, 6) == "-name=" || w.substr (0, 6) == "-name:" || 851 w.substr (0, 6) == "/name:" || w.substr (0, 6) == "/name=") 852 w.substr (6, name); 853 else if (w.substr (0, 1) == "@" && w.size () > 1) 854 { 855 cmt_string commandfile; 856 w.substr (1, commandfile); 857 if (!CmtSystem::test_file (commandfile)) 858 { 859 CmtMessage::warning ("No such file `" + commandfile + "'."); 860 continue; 861 } 862 cmt_string text; 863 if (!text.read (commandfile)) 864 { 865 CmtMessage::warning ("Could not read `" + commandfile + "'."); 866 continue; 867 } 868 text.replace_all ("\r", " "); 869 text.replace_all ("\n", " "); 870 CmtSystem::cmt_string_vector words; 871 CmtSystem::split (text, " \t", words); 872 for (int i = 0; i < words.size (); i++) 873 { 874 files.push_back (words[i]); 875 } 876 } 877 else 878 files.push_back (w); 879 } 880 881 if (files.size () == 0) 882 { 883 CmtMessage::error ("build_windefs: no files specified"); 884 return; 885 } 886 if (name == "") 887 { 888 cmt_string suffix; 889 CmtSystem::get_dot_suffix (files[0], suffix); 890 CmtSystem::basename (files[0], suffix, name); 891 } 892 if (name == "") 893 { 894 CmtMessage::error ("build_windefs: cannot determine library name"); 895 return; 896 } 897 898 // cmt_string bin; 899 900 // CmtSystem::dirname (library_name, bin); 901 // CmtSystem::get_dot_suffix (library_name, suffix); 902 // CmtSystem::basename (library_name, suffix, name); 850 903 851 if (!CmtSystem::cd (bin)) return;904 // if (!CmtSystem::cd (bin)) return; 852 905 853 cmt_string text; 854 cmt_string command; 906 // cmt_string command; 855 907 856 command = "dumpbin /symbols "; 857 command += library_name; 908 cmt_string command ("dumpbin /symbols"); 909 // command += library_name; 910 for (int i = 0; i < files.size (); i++) 911 { 912 command += " " + files[i]; 913 } 858 914 859 915 WinDefAwk filter (name); -
CMT/HEAD/source/cmt_generator.h
r428 r466 177 177 178 178 // Build def files for Windows shared libraries 179 static void build_windefs (const cmt_string& library_name); 179 // static void build_windefs (const cmt_string& library_name); 180 static void build_windefs (const CmtSystem::cmt_string_vector& arguments); 180 181 }; 181 182 -
CMT/HEAD/source/cmt_generators.cxx
r459 r466 47 47 library_fragment.set ("library"); 48 48 library_no_share_fragment.set ("library_no_share"); 49 library_no_static_fragment.set ("library_no_static"); 49 50 application_fragment.set ("application"); 50 51 jar_fragment.set ("jar"); … … 71 72 library_fragment.reset (); 72 73 library_no_share_fragment.reset (); 74 library_no_static_fragment.reset (); 73 75 jar_fragment.reset (); 74 76 application_fragment.reset (); … … 670 672 if (is_library) 671 673 { 672 if (constituent.no_share) 674 if (constituent.no_share && constituent.no_static) 675 { 676 CmtMessage::warning (constituent.name + ": No shared or static library"); 677 } 678 else if (constituent.no_share) 673 679 { 674 680 library_no_share_fragment.copy (m_output_file, constituent.variables, 3, 681 &m_CONSTITUENT, 682 &m_CONSTITUENTSUFFIX, 683 &m_OBJS); 684 } 685 else if (constituent.no_static) 686 { 687 library_no_static_fragment.copy (m_output_file, constituent.variables, 3, 675 688 &m_CONSTITUENT, 676 689 &m_CONSTITUENTSUFFIX, -
CMT/HEAD/source/cmt_generators.h
r429 r466 70 70 FragmentHandle library_fragment; 71 71 FragmentHandle library_no_share_fragment; 72 FragmentHandle library_no_static_fragment; 72 73 FragmentHandle application_fragment; 73 74 FragmentHandle jar_fragment; -
CMT/HEAD/source/cmt_parser.cxx
r463 r466 2253 2253 { 2254 2254 set_standard_macros (); 2255 Generator::build_windefs (ap.arguments[0]); 2255 // Generator::build_windefs (ap.arguments[0]); 2256 Generator::build_windefs (ap.arguments); 2256 2257 } 2257 2258 }
Note: See TracChangeset
for help on using the changeset viewer.