bzip2-exp.xml 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. <sect2>
  2. <title>Command explanations</title>
  3. <para>
  4. <userinput>sed: </userinput> The sed command here searches for the
  5. string "$(CC) $(CFLAGS) -o" and replaces it by "$(CC) $(CFLAGS)
  6. $(LDFLAGS) -o" in the Makefile file. We make that modification so it
  7. will be easier to link bzip2 statically.
  8. </para>
  9. <para>
  10. <userinput>...Makefile | make -f -:</userinput> Makefile
  11. is the last parameter of the sed command which indicates the file to
  12. search and replace in. Sed normally sends the modified file to stdout
  13. (standard output), which will be the console. With the construction we
  14. use, sed's output will be piped to the make program. Normally, when make
  15. is started, it tries to find a number of files like Makefile. But we have
  16. modified the Makefile file so we don't want make to use it. The "-f -"
  17. parameter tells make to read it's input from another file, or from stdin
  18. (standard input) which the dash (-) implies. This is one way to do it.
  19. Another way would be to have sed write the output to a different file
  20. and tell make with the -f parameter to read that alternate file.
  21. </para>
  22. <para>
  23. <userinput>LDFLAGS=-static:</userinput> This is the second way we use to
  24. link a package statically. This is also the most common way.
  25. The -all-static value is only used with the binutils and the gettext
  26. packages and won't be used throughout the rest of this book.
  27. </para>
  28. </sect2>