Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile instead of build scripts #5

Merged
merged 1 commit into from
Aug 24, 2015
Merged

Conversation

ws233
Copy link
Contributor

@ws233 ws233 commented Aug 24, 2015

  1. Makefile instead of build scripts. That allows to rebuild only changed parts of the libs. In contrast build scripts always remove the previous results and rebuild from scratch.

  2. You may as before build all libraries at once with 'make' command or any specific library specifying corresponding target: make libpng or make libjpeg.

  3. You may also use other standard make utility targets like clean or mostlyclean: make mostlyclean.

  4. No need to store libs binaries in the repo anymore. Instead they are automatically downloaded if do not exist.

  5. It much easier to update to a new versions of library: just change a corresponding version numbers in the beginning of the make file:

    PNG_NAME        = libpng-1.6.18
    JPEG_SRC_NAME   = jpegsrc.v9a# filename at the server
    JPEG_DIR_NAME   = jpeg-9a# folder name after the JPEG_SRC_NAME archive has been unpacked
    TIFF_NAME       = tiff-4.0.4
    

and script will automatically download new sources and rebuild the lib.
6. So all the files from the following folders are in .gitignore from now: jpeg-*, libpng-* and tiff-*.
7. As the result all the lib sources can be purged from the repository to decrease it's size. Only the makefile is necessary from now to get the libraries fat binaries.

…nged parts of the libs. In contrast build scripts always remove the previous results and rebuild from scratch.

2. You may as before build all libraries at once with 'make' command or any specific library specifying corresponding target: `make libpng` or `make libjpeg`.
3. You may also use other standard make utility targets like clean or mostlyclean: `make mostlyclean`.
4. No need to store libs binaries in the repo anymore. Instead they are automatically downloaded if do not exist.
5. It much easier to update to a new versions of library: just change a corresponding version numbers in the beginning of the make file:
PNG_NAME        = libpng-1.6.18
JPEG_SRC_NAME   = jpegsrc.v9a# filename at the server
JPEG_DIR_NAME   = jpeg-9a# folder name after the JPEG_SRC_NAME archive has been unpacked
TIFF_NAME       = tiff-4.0.4
and script will automatically download new sources and rebuild the lib.
6. So all the files from the following folders are in `.gitignore` from now: `jpeg-*`, `libpng-*` and `tiff-*`.
7. As the result all the lib sources can be purged from the repository to decrease it's size. Only the makefile is necessary from now to get the libraries fat binaries.
@ws233
Copy link
Contributor Author

ws233 commented Aug 24, 2015

Hi @ashtons!
Pls, take a look at this improvement.
It removes the dependent library sources from the repo and provides a Makefile, which can automatically upload them from the Internet.

I've tried this technique in the Tesseract-OCR-iOS. And it works perfect there. So I've decided to share this improvement with you.

ashtons added a commit that referenced this pull request Aug 24, 2015
Makefile instead of build scripts
@ashtons ashtons merged commit c51ee78 into ashtons:master Aug 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants