Linux.com

mantosh4u

mantosh4u

  • Linux.com Member
  • Posts: 4
  • Member Since: 30 Oct 10
  • Last Logged In: 07 Feb 11

Latest Posts

Posted by
Topic
Post Preview
Posted
  • mantosh4u
    RE: Linux Make tutorial
    Hi, http://www.gnu.org/manual/manual.html Above link contains the information about all GNU utility manuals. However if you want make utility manual , you can download from the link given below. http://www.gnu.org/software/make/manual/ Hope this info would be useful to you. Please let me know if you want some more information regarding this . Regrads, Mantosh Kumar
    Link to this post 25 Dec 10

    Hi,

    http://www.gnu.org/manual/manual.html

    Above link contains the information about all GNU utility manuals.


    However if you want make utility manual , you can download from the link given below.

    http://www.gnu.org/software/make/manual/

    Hope this info would be useful to you. Please let me know if you want some more information regarding this .

    Regrads,
    Mantosh Kumar

  • mantosh4u
    RE: Linux Make tutorial
    Hello@usman The Make utility is not for beginner's use. The best way to understand Make utility is to go through the official manual , which you can download from the GNU community website. Basically Make internally uses the last modified time stamp of file, for deciding whether to compile of not. I mean lets say you have one source file hello.c and you compiled this particular file using gcc you would got hello.o for first time. Now if you add/ remove some line in your source file hello.c and again used gcc for compilation make utility would generate a new hello.o file . But lets say if you have not changed anything in your original hello.c then make will not generate any new hello.o file. So in short " If make utility check that source file last modified time stamp is latest than the object file(.o) file that means source file has been changed since last compilation , in that case make would generate a new object file otherwise make would skip the recompilation for that particular source file." The above concept is very useful and important for larger projects. Because if you have changed in a particular source file than there is no need to recompile everything all over again. Only the dependent files should be recompiled ....This can be done by using make utility .... This reduces great amount of time while we are in development phase of any project. Because during that time we sometime change some line in a particular file in the entire project. Hope above explanation would be of some use to you.. For usage please go through the official manual from GNU . Regards, Mantosh Kumar
    Link to this post 24 Dec 10

    Hello@usman

    The Make utility is not for beginner's use. The best way to understand Make utility is to go through the official manual , which you can download from the GNU community website.


    Basically Make internally uses the last modified time stamp of file, for deciding whether to compile of not. I mean lets say you have one source file hello.c and you compiled this particular file using gcc you would got hello.o for first time. Now if you add/ remove some line in your source file hello.c and again used gcc for compilation make utility would generate a new hello.o file . But lets say if you have not changed anything in your original hello.c then make will not generate any new hello.o file.

    So in short " If make utility check that source file last modified time stamp is latest than the object file(.o) file that means source file has been changed since last compilation , in that case make would generate a new object file otherwise make would skip the recompilation for that particular source file."


    The above concept is very useful and important for larger projects. Because if you have changed in a particular source file than there is no need to recompile everything all over again. Only the dependent files should be recompiled ....This can be done by using make utility .... This reduces great amount of time while we are in development phase of any project. Because during that time we sometime change some line in a particular file in the entire project.


    Hope above explanation would be of some use to you.. For usage please go through the official manual from GNU .


    Regards,
    Mantosh Kumar

  • mantosh4u
    Cat Utility Implementation by myself
    Hello Folks, I have written the the program for replacement for original "cat utility". Just compile this program (ocat) and you can copy to this into [b] /bin[/b] directory. I have attached the source file [b](mycat.c)[/b] with this message. Please you guys can try this out and send me the feedback to improve this. Regards, Mantosh Kumar [file name=mycat.txt size=2352]http://www.linux.com/media/kunena/attachments/legacy/files/mycat.txt[/file]
    Link to this post 31 Oct 10

    Hello Folks,

    I have written the the program for replacement for original "cat utility". Just compile this program (ocat) and you can copy to this into /bin directory.

    I have attached the source file (mycat.c) with this message.

    Please you guys can try this out and send me the feedback to improve this.


    Regards,
    Mantosh Kumar [file name=mycat.txt size=2352]http://www.linux.com/media/kunena/attachments/legacy/files/mycat.txt[/file]

  • mantosh4u
    Regarding ltrace utility
    Hello folks, If we check the "man ltrace" it provide the following information. --------------------------------------------------------------------------------------------------------------------------------- OPTIONS -a, --align column Align return values in a specific column (default column is 5/8 of screen width). -A maxelts Maximum number of array elements to print before suppressing the rest with an ellipsis ("..." [b][/b]) -------------------------------------------------------------------------------------------------------------------------------- I am interested in the 2nd option (-A maxelts). My intention is to increase the maximum number of array elements to print, When i go with default ltrace setting i am getting output like this : mantosh@ubuntu:~/Desktop/practice$ [b]ltrace ./ofile[/b] __libc_start_main(0x8048514, 1, 0xbfb55324, 0x8048650, 0x8048640 fopen("/home/mantosh/Desktop/practice/i"..., "r" ) = 0x8f15008 fopen("/home/mantosh/Desktop/practice/o"..., "w" ) = 0x8f15170 malloc(51) = 0x08f152d8 malloc(51) = 0x08f15310 fgets("The UNIX operating system provid"..., 50, 0x8f1500 = 0x08f152d8 strcpy(0x08f15310, "The UNIX operating system provid"...) = 0x08f15310 fputs("The UNIX operating system provid"..., 0x8f15170) = 1 Now when i am tryting like this mantosh@ubuntu:~/Desktop/practice$[b] ltrace -a 90 -A 90 ./ofile[/b] __libc_start_main(0x8048514, 1, 0xbfd650e4, 0x8048650, 0x8048640 fopen("/home/mantosh/Desktop/practice/i"..., "r" ) = 0x9666008 fopen("/home/mantosh/Desktop/practice/o"..., "w" ) = 0x9666170 malloc(51) = 0x096662d8 malloc(51) = 0x09666310 fgets("The UNIX operating system provid"..., 50, 0x966600 = 0x096662d8 strcpy(0x09666310, "The UNIX operating system provid"...) = 0x09666310 fputs("The UNIX operating system provid"..., 0x9666170) = 1 Though i increased the value of A = 90 , still no change from default output. i mean i am still getting the same array length inside a ("---" ) on any line line. Any thought on this ? Regards, Mantosh Kumar
    Link to this post 31 Oct 10

    Hello folks,

    If we check the "man ltrace" it provide the following information.

    ---------------------------------------------------------------------------------------------------------------------------------
    OPTIONS
    -a, --align column
    Align return values in a specific column (default column is 5/8 of screen width).

    -A maxelts
    Maximum number of array elements to print before suppressing the rest with an ellipsis ("..." )

    --------------------------------------------------------------------------------------------------------------------------------

    I am interested in the 2nd option (-A maxelts). My intention is to increase the maximum number of array elements to print, When i go with default ltrace setting i am getting output like this :

    mantosh@ubuntu:~/Desktop/practice$ ltrace ./ofile
    __libc_start_main(0x8048514, 1, 0xbfb55324, 0x8048650, 0x8048640 <unfinished ...>
    fopen("/home/mantosh/Desktop/practice/i"..., "r" ) = 0x8f15008
    fopen("/home/mantosh/Desktop/practice/o"..., "w" ) = 0x8f15170
    malloc(51) = 0x08f152d8
    malloc(51) = 0x08f15310
    fgets("The UNIX operating system provid"..., 50, 0x8f1500 = 0x08f152d8
    strcpy(0x08f15310, "The UNIX operating system provid"...) = 0x08f15310
    fputs("The UNIX operating system provid"..., 0x8f15170) = 1


    Now when i am tryting like this

    mantosh@ubuntu:~/Desktop/practice$ ltrace -a 90 -A 90 ./ofile
    __libc_start_main(0x8048514, 1, 0xbfd650e4, 0x8048650, 0x8048640 <unfinished ...>
    fopen("/home/mantosh/Desktop/practice/i"..., "r" ) = 0x9666008
    fopen("/home/mantosh/Desktop/practice/o"..., "w" ) = 0x9666170
    malloc(51) = 0x096662d8
    malloc(51) = 0x09666310
    fgets("The UNIX operating system provid"..., 50, 0x966600 = 0x096662d8
    strcpy(0x09666310, "The UNIX operating system provid"...) = 0x09666310
    fputs("The UNIX operating system provid"..., 0x9666170) = 1

    Though i increased the value of A = 90 , still no change from default output. i mean i am still getting the same array length inside a ("---" ) on any line line.

    Any thought on this ?


    Regards,
    Mantosh Kumar

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board