Updated How MXE builds its package (markdown)

Timothy Gu 2014-02-20 16:30:06 -08:00
parent 3447cb876b
commit 1bce064eec
1 changed files with 9 additions and 6 deletions

@ -1,18 +1,21 @@
MXE is a set of Makefiles that is used to mimic a mini Linux distribution. MXE is a set of Makefiles that is used to mimic a mini Linux distribution.
## Building packages ## Building packages
When a person runs `make`, MXE does the following things: When a person runs `make` or `gmake`, MXE does the following things:
1. It checks whether the requirements are met. If successful, it `touch`es a 1. It checks whether the requirements are met. If successful, it `touch`es a
file in `usr/installed` to prevent MXE from chacking that every time you run file in `usr/installed` to prevent MXE from chacking that every time you run
`make`. `(g)make`.
2. It parses `index.html` to get a list of available packages. 2. It parses `index.html` to get a list of available packages.
3. It `include`s all the Makefiles in `src/`. 3. It `include`s all the Makefiles in `src/`.
4. It solves dependency of packages to find the deepest depended package. 4. It solves dependency of packages to find the deepest depended package.
5. It starts building the deepest dependended package. 5. It starts building the most deeply dependended package.
6. It downloads the `$($(PKG)_FILE)` and checks it against `$($(PKG)_CHECKSUM)`. 6. It downloads the `$($(PKG)_FILE)` and checks it against `$($(PKG)_CHECKSUM)`.
The activities are logged in `log/$(PKG)-download`. The activities are logged in `log/$(PKG)-download`. If `$($(PKG)_FILE)`
7. From this point on, all activities are logged in `log/$(PKG)`. already exists in `pkg/`, it will directly check the SHA-1, and, if they
don't match, delete the current copy and download it.
7. From this point on, all activities are logged in `log/$(PKG)`, or, if that
causes confusion, `log/$(PKG)-$(TARGET)`.
8. It extracts the tarball or zip file using the appropriate command. 8. It extracts the tarball or zip file using the appropriate command.
9. It applies any patch that matches `src/$(PKG)-*.patch`. 9. It applies any patch that matches `src/$(PKG)-*.patch`.
10. It calls macro specified in the package Makefile. 10. It calls macro specified in the package Makefile.
@ -22,4 +25,4 @@ When a person runs `make`, MXE does the following things:
works. works.
11. It `touch`es an empty file in `usr/$(TARGET)/installed/` with the name of 11. It `touch`es an empty file in `usr/$(TARGET)/installed/` with the name of
the package, signifying that the package is built successfully. the package, signifying that the package is built successfully.
12. It continues to build the next package. 12. It continues to build the next package (goto 6).