mbedtls icon indicating copy to clipboard operation
mbedtls copied to clipboard

Remove 'no_test' as dependency of the 'install' make target.

Open mansourmoufid opened this issue 2 years ago • 3 comments

I do:

make lib
make install

and it builds and installs the libraries and programs because no_test depends on programs.

However, I am building for Android, and only want the libraries. (There is a problem building the programs for Android, I'll open an issue about that later.)

The Makefile already contains this logic for handling both cases when the programs are built or not:

    mkdir -p $(DESTDIR)/bin
    for p in programs/*/* ; do              \
        if [ -x $$p ] && [ ! -d $$p ] ;     \
        then                                \
            f=$(PREFIX)`basename $$p` ;     \
            cp $$p $(DESTDIR)/bin/$$f ;     \
        fi                                  \
    done

Signed-off-by: Mansour Moufid

mansourmoufid avatar Jun 29 '22 21:06 mansourmoufid

Thank you for your contribution.

Please use git commit -s when committing changes to sign off your commits.

gabor-mezei-arm avatar Jun 30 '22 08:06 gabor-mezei-arm

Changing make install to no longer install sample programs is a behavior change. I'm not sure it's warranted.

The sample programs are a mixture of useful programs (in particular you can use x509/* for a simple CA), sample code and tests. Ideally, make install would install only the useful programs. But we don't have a clear distinction.

I would prefer to keep install the way it is and add an install-so (is this the right name? or should it be install-lib?) target to install only the dynamic libraries (I can't think of a reason to install the static libraries without the header files and the programs useful for developers such as strerror and psa_constant_names).

gilles-peskine-arm avatar Aug 01 '22 15:08 gilles-peskine-arm

Changing make install to no longer install sample programs is a behavior change. I'm not sure it's warranted.

The sample programs are a mixture of useful programs (in particular you can use x509/* for a simple CA), sample code and tests. Ideally, make install would install only the useful programs. But we don't have a clear distinction.

I would prefer to keep install the way it is and add an install-so (is this the right name? or should it be install-lib?) target to install only the dynamic libraries (I can't think of a reason to install the static libraries without the header files and the programs useful for developers such as strerror and psa_constant_names).

Agreed, I think this would be a better approach (mild preference for install-lib).

daverodgman avatar Aug 09 '22 10:08 daverodgman

This PR will now be closed as the implementation is not something we want in the project. Thanks to the author for their efforts in any case.

tom-daubney-arm avatar May 19 '23 13:05 tom-daubney-arm