From 09eb14c01e378208db15f9c39588cc9c5dbfd946 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 16 Feb 2015 15:25:31 +0000 Subject: [PATCH] Revert "Require unix-utils in path for windows make" This reverts commit 5d46cca09a380410965cc65568a5fafbc2658e2e. In preparation of merging an external contribution that superseedes this Conflicts: ChangeLog --- ChangeLog | 3 --- README.rst | 6 ------ library/Makefile | 13 +++++++++++++ programs/Makefile | 5 +++++ tests/Makefile | 7 +++++++ 5 files changed, 25 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 43b861246..82f2310c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24,9 +24,6 @@ Changes "minimize" others (eg use stddef.h if only size_t is needed). * Change #include lines in test files to use double quotes instead of angle brackets for uniformity with the rest of the code. - * Building with 'make' on windows now requires Unix utilities in the PATH - as well as a Unix shell. This enables more features such as the 'check' - target. * Remove dependency on sscanf() in X.509 parsing modules. = mbed TLS 1.3.10 released 2015-02-09 diff --git a/README.rst b/README.rst index 5275e1b76..004f09441 100644 --- a/README.rst +++ b/README.rst @@ -35,12 +35,6 @@ In order to run the tests, enter:: make check -If you're building on windows using mingw, msys, or some similar environment, you should define the WINDOWS variable (and possibly the CC variable too), eg:: - - make CC=gcc WINDOWS=1 - -You need to make sure the usual Unix utilities such as `ln` and `rm` are in your PATH and that make has access to a Unix shell. - Depending on your platform, you might run into some issues. Please check the Makefiles in *library/*, *programs/* and *tests/* for options to manually add or remove for specific platforms. You can also check `the mbed TLS Knowledge Base `_ for articles on your platform or issue. In case you find that you need to do something else as well, please let us know what, so we can add it to the KB. diff --git a/library/Makefile b/library/Makefile index 9a4c3fd7f..d92d8039f 100644 --- a/library/Makefile +++ b/library/Makefile @@ -80,7 +80,11 @@ shared: libpolarssl.so libpolarssl.a: libmbedtls.a echo " LN $@ -> $?" +ifndef WINDOWS ln -sf $? $@ +else + copy /y /b $? $@ +endif libmbedtls.a: $(OBJS) echo " AR $@" @@ -90,7 +94,11 @@ libmbedtls.a: $(OBJS) libpolarssl.so: libmbedtls.so echo " LN $@ -> $?" +ifndef WINDOWS ln -sf $? $@ +else + copy /y /b $? $@ +endif libmbedtls.${DLEXT}: $(OBJS) echo " LD $@" @@ -113,4 +121,9 @@ libmbedtls.dll: $(OBJS) $(CC) $(CFLAGS) $(OFLAGS) -c $< clean: +ifndef WINDOWS rm -f *.o libpolarssl.* libmbedtls.* +endif +ifdef WINDOWS + del /Q /F *.o libpolarssl.* libmbedtls.* +endif diff --git a/programs/Makefile b/programs/Makefile index 802e73c2a..ba8dd316b 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -242,7 +242,12 @@ x509/cert_req: x509/cert_req.c ../library/libmbedtls.a $(CC) $(CFLAGS) $(OFLAGS) x509/cert_req.c $(LDFLAGS) -o $@ clean: +ifndef WINDOWS rm -f $(APPS) +endif +ifdef WINDOWS + del /S /Q /F *.o *.exe +endif list: echo $(APPS) diff --git a/tests/Makefile b/tests/Makefile index b64eaffcf..6489e52b8 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -402,9 +402,15 @@ test_suite_version: test_suite_version.c $(DEP) $(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@ clean: +ifndef WINDOWS rm -f $(APPS) *.c +endif +ifdef WINDOWS + del /Q /F *.c *.exe +endif check: $(APPS) +ifndef WINDOWS echo "Running checks (Success if all tests PASSED)" RETURN=0; \ for i in $(APPS); \ @@ -421,3 +427,4 @@ check: $(APPS) echo ""; \ done; \ if [ "$$RETURN" -eq 1 ]; then exit 1; fi +endif