From c46d76e249f8de7d0422f9b3dffbb0f80fdd289d Mon Sep 17 00:00:00 2001
From: arteevraina <arteevraina@gmail.com>
Date: Tue, 6 Sep 2022 12:46:52 +0530
Subject: [PATCH 01/17] refactor: change in structure of stdlib in order to
 compiler it using fypp script

---
 fpm.toml                     | 16 ++++++++++++++++
 {src => include}/common.fypp |  0
 src/f08estop.f90             |  2 +-
 src/f18estop.f90             |  4 ++--
 4 files changed, 19 insertions(+), 3 deletions(-)
 create mode 100644 fpm.toml
 rename {src => include}/common.fypp (100%)

diff --git a/fpm.toml b/fpm.toml
new file mode 100644
index 000000000..3960950af
--- /dev/null
+++ b/fpm.toml
@@ -0,0 +1,16 @@
+name = "stdlib"
+
+[dev-dependencies]
+test-drive.git = "https://github.com/fortran-lang/test-drive.git"
+
+[build]
+auto-examples = false
+auto-tests = true
+
+[preprocess.cpp]
+macros = [
+  "PROJECT_VERSION_MAJOR=0",
+  "PROJECT_VERSION_MINOR=1",
+  "PROJECT_VERSION_PATCH=0",
+  "MAXRANK=4",
+]
\ No newline at end of file
diff --git a/src/common.fypp b/include/common.fypp
similarity index 100%
rename from src/common.fypp
rename to include/common.fypp
diff --git a/src/f08estop.f90 b/src/f08estop.f90
index 81c77f4a9..3fb044000 100644
--- a/src/f08estop.f90
+++ b/src/f08estop.f90
@@ -1,4 +1,4 @@
-submodule (stdlib_error) estop
+submodule (stdlib_error) f08estop
 
 implicit none
 
diff --git a/src/f18estop.f90 b/src/f18estop.f90
index 59fd0c97f..241665a36 100644
--- a/src/f18estop.f90
+++ b/src/f18estop.f90
@@ -1,4 +1,4 @@
-submodule (stdlib_error) estop
+submodule (stdlib_error) f18estop
 
 implicit none
 
@@ -26,4 +26,4 @@
 endif
 end procedure
 
-end submodule estop
+end submodule f18estop

From 6d0bbbc7edb5b2860938a30a47a1317cc13731c1 Mon Sep 17 00:00:00 2001
From: arteevraina <arteevraina@gmail.com>
Date: Thu, 8 Sep 2022 21:11:21 +0530
Subject: [PATCH 02/17] fix: skip tests in test_mean based on MAXRANK

---
 test/stats/test_mean_f03.fypp | 96 +++++++++++++++++++++++++++++++++--
 1 file changed, 93 insertions(+), 3 deletions(-)

diff --git a/test/stats/test_mean_f03.fypp b/test/stats/test_mean_f03.fypp
index 786438d98..82934f191 100644
--- a/test/stats/test_mean_f03.fypp
+++ b/test/stats/test_mean_f03.fypp
@@ -4,7 +4,7 @@
 #:set NRANK = 4
 
 module test_stats_meanf03
-    use testdrive, only : new_unittest, unittest_type, error_type, check
+    use testdrive, only : new_unittest, unittest_type, error_type, check, skip_test
     use stdlib_stats, only: mean
     use stdlib_kinds, only : int8, int16, int32, int64, sp, dp, xdp, qp
     use, intrinsic :: ieee_arithmetic, only : ieee_is_nan
@@ -65,25 +65,36 @@ contains
         !> Error handling
         type(error_type), allocatable, intent(out) :: error
 
+        #:if MAXRANK > 7
         call check(error, mean(d8_${k1}$), sum(real(d8_${k1}$, dp))/real(size(d8_${k1}$), dp)&
                     , 'mean(d8_${k1}$): uncorrect answer'&
                     , thr = dptol)
         if (allocated(error)) return
+
+        #:else
+        call skip_test(error, "Rank 7 is not supported")
+        #:endif
     end subroutine
 
     subroutine test_stats_meanf03_all_optmask_${k1}$(error)
         !> Error handling
         type(error_type), allocatable, intent(out) :: error
 
+        #:if MAXRANK > 7
         call check(error, ieee_is_nan(mean(d8_${k1}$, .false.))&
                     , 'mean(d8_${k1}$, .false.): uncorrect answer')
         if (allocated(error)) return
+
+        #:else
+        call skip_test(error, "Rank 7 is not supported")
+        #:endif
     end subroutine
 
     subroutine test_stats_meanf03_${k1}$(error)
         !> Error handling
         type(error_type), allocatable, intent(out) :: error
 
+        #:if MAXRANK > 7
         #:for dim in range(1, 9)
         call check(error&
                     , sum(abs(mean(d8_${k1}$, ${dim}$) -&
@@ -92,12 +103,17 @@ contains
                     )
         if (allocated(error)) return
         #:endfor
+
+        #:else
+        call skip_test(error, "Rank 7 is not supported")
+        #:endif
     end subroutine
 
     subroutine test_stats_meanf03_optmask_${k1}$(error)
         !> Error handling
         type(error_type), allocatable, intent(out) :: error
-
+        
+        #:if MAXRANK > 7
         call check(error, ieee_is_nan(mean(d1_${k1}$, 1, .false.))&
                     , 'mean(d1_${k1}$, 1, .false.): uncorrect answer'&
                     )
@@ -108,23 +124,33 @@ contains
                     , 'mean(d8_${k1}$, ${dim}$, .false.): uncorrect answer')
         if (allocated(error)) return
         #:endfor
+
+        #:else
+        call skip_test(error, "Rank 7 is not supported")
+        #:endif
     end subroutine
 
     subroutine test_stats_meanf03_mask_all_${k1}$(error)
         !> Error handling
         type(error_type), allocatable, intent(out) :: error
 
+        #:if MAXRANK > 7
         call check(error, mean(d8_${k1}$, d8_${k1}$ > 0)&
                     , sum(real(d8_${k1}$, dp), d8_${k1}$ > 0)/real(count(d8_${k1}$ > 0), dp)&
                     , 'mean(d8_${k1}$, d8_${k1}$ > 0): uncorrect answer'&
                     , thr = dptol)
         if (allocated(error)) return
+
+        #:else
+        call skip_test(error, "Rank 7 is not supported")
+        #:endif
     end subroutine
 
     subroutine test_stats_meanf03_mask_${k1}$(error)
         !> Error handling
         type(error_type), allocatable, intent(out) :: error
 
+        #:if MAXRANK > 7
         #:for dim in range(1, 9)
         call check(error&
                     , sum(abs(mean(d8_${k1}$, ${dim}$, d8_${k1}$ > 0) -&
@@ -133,6 +159,10 @@ contains
                     )
         if (allocated(error)) return
         #:endfor
+
+        #:else
+        call skip_test(error, "Rank 7 is not supported")
+        #:endif
     end subroutine
     #:endfor
 
@@ -141,25 +171,36 @@ contains
         !> Error handling
         type(error_type), allocatable, intent(out) :: error
 
+        #:if MAXRANK > 7
         call check(error, mean(d8_${k1}$), sum(d8_${k1}$)/real(size(d8_${k1}$), ${k1}$)&
                     , 'mean(d8_${k1}$): uncorrect answer'&
                     , thr = ${k1}$tol)
         if (allocated(error)) return
+        
+        #:else
+        call skip_test(error, "Rank 7 is not supported")
+        #:endif
     end subroutine
 
     subroutine test_stats_meanf03_all_optmask_${k1}$(error)
         !> Error handling
         type(error_type), allocatable, intent(out) :: error
 
+        #:if MAXRANK > 7
         call check(error, ieee_is_nan(mean(d8_${k1}$, .false.))&
                     , 'mean(d8_${k1}$, .false.): uncorrect answer')
         if (allocated(error)) return
+
+        #:else
+        call skip_test(error, "Rank 7 is not supported")
+        #:endif
     end subroutine
 
     subroutine test_stats_meanf03_${k1}$(error)
         !> Error handling
         type(error_type), allocatable, intent(out) :: error
 
+        #:if MAXRANK > 7
         #:for dim in range(1, 9)
         call check(error&
                     , sum(abs(mean(d8_${k1}$, ${dim}$) -&
@@ -168,34 +209,49 @@ contains
                     )
         if (allocated(error)) return
         #:endfor
+
+        #:else
+        call skip_test(error, "Rank 7 is not supported")
+        #:endif
     end subroutine
 
     subroutine test_stats_meanf03_optmask_${k1}$(error)
         !> Error handling
         type(error_type), allocatable, intent(out) :: error
 
+        #:if MAXRANK > 7
         #:for dim in range(1, 9)
         call check(error, any(ieee_is_nan(mean(d8_${k1}$, ${dim}$, .false.)))&
                     , 'mean(d8_${k1}$, ${dim}$, .false.): uncorrect answer')
         if (allocated(error)) return
         #:endfor
+
+        #:else
+        call skip_test(error, "Rank 7 is not supported")
+        #:endif
     end subroutine
 
     subroutine test_stats_meanf03_mask_all_${k1}$(error)
         !> Error handling
         type(error_type), allocatable, intent(out) :: error
-
+        
+        #:if MAXRANK > 7
         call check(error, mean(d8_${k1}$, d8_${k1}$ > 0)&
                     , sum(d8_${k1}$, d8_${k1}$ > 0)/real(count(d8_${k1}$ > 0), ${k1}$)&
                     , 'mean(d8_${k1}$, d8_${k1}$ > 0): uncorrect answer'&
                     , thr = ${k1}$tol)
         if (allocated(error)) return
+
+        #:else
+        call skip_test(error, "Rank 7 is not supported")
+        #:endif
     end subroutine
 
     subroutine test_stats_meanf03_mask_${k1}$(error)
         !> Error handling
         type(error_type), allocatable, intent(out) :: error
 
+        #:if MAXRANK > 7
         #:for dim in range(1, 9)
         call check(error&
                     , sum(abs(mean(d8_${k1}$, ${dim}$, d8_${k1}$ > 0) -&
@@ -204,6 +260,10 @@ contains
                     )
         if (allocated(error)) return
         #:endfor
+
+        #:else
+        call skip_test(error, "Rank 7 is not supported")
+        #:endif
     end subroutine
     #:endfor
 
@@ -212,25 +272,36 @@ contains
         !> Error handling
         type(error_type), allocatable, intent(out) :: error
 
+        #:if MAXRANK > 7
         call check(error, mean(d8_c${k1}$), sum(d8_c${k1}$)/real(size(d8_c${k1}$), ${k1}$)&
                     , 'mean(d8_c${k1}$): uncorrect answer'&
                     , thr = ${k1}$tol)
         if (allocated(error)) return
+
+        #:else
+        call skip_test(error, "Rank 7 is not supported")
+        #:endif
     end subroutine
 
     subroutine test_stats_meanf03_all_optmask_c${k1}$(error)
         !> Error handling
         type(error_type), allocatable, intent(out) :: error
 
+        #:if MAXRANK > 7
         call check(error, ieee_is_nan(real(mean(d8_c${k1}$, .false.)))&
                     , 'mean(d8_c${k1}$, .false.): uncorrect answer')
         if (allocated(error)) return
+
+        #:else
+        call skip_test(error, "Rank 7 is not supported")
+        #:endif
     end subroutine
 
     subroutine test_stats_meanf03_c${k1}$(error)
         !> Error handling
         type(error_type), allocatable, intent(out) :: error
 
+        #:if MAXRANK > 7
         #:for dim in range(1, 9)
         call check(error&
                     , sum(abs(mean(d8_c${k1}$, ${dim}$) -&
@@ -239,34 +310,49 @@ contains
                     )
         if (allocated(error)) return
         #:endfor
+
+        #:else
+        call skip_test(error, "Rank 7 is not supported")
+        #:endif
     end subroutine
 
     subroutine test_stats_meanf03_optmask_c${k1}$(error)
         !> Error handling
         type(error_type), allocatable, intent(out) :: error
 
+        #:if MAXRANK > 7
         #:for dim in range(1, 9)
         call check(error, any(ieee_is_nan(real(mean(d8_c${k1}$, ${dim}$, .false.))))&
                     , 'mean(d8_c${k1}$, ${dim}$, .false.): uncorrect answer')
         if (allocated(error)) return
         #:endfor
+
+        #:else
+        call skip_test(error, "Rank 7 is not supported")
+        #:endif
     end subroutine
 
     subroutine test_stats_meanf03_mask_all_c${k1}$(error)
         !> Error handling
         type(error_type), allocatable, intent(out) :: error
 
+        #:if MAXRANK > 7
         call check(error, mean(d8_c${k1}$, d8_c${k1}$%re > 0)&
                     , sum(d8_c${k1}$, d8_c${k1}$%re > 0)/real(count(d8_c${k1}$%re > 0), ${k1}$)&
                     , 'mean(d8_c${k1}$, d8_c${k1}$%re > 0): uncorrect answer'&
                     , thr = ${k1}$tol)
         if (allocated(error)) return
+
+        #:else
+        call skip_test(error, "Rank 7 is not supported")
+        #:endif
     end subroutine
 
     subroutine test_stats_meanf03_mask_c${k1}$(error)
         !> Error handling
         type(error_type), allocatable, intent(out) :: error
 
+        #:if MAXRANK > 7
         #:for dim in range(1, 9)
         call check(error&
                     , sum(abs(mean(d8_c${k1}$, ${dim}$, d8_c${k1}$%re > 0) -&
@@ -275,6 +361,10 @@ contains
                     )
         if (allocated(error)) return
         #:endfor
+
+        #:else
+        call skip_test(error, "Rank 7 is not supported")
+        #:endif
     end subroutine
     #:endfor
 

From 4e4b0d2c4d90e78912b19e2b20ea4f60df728eee Mon Sep 17 00:00:00 2001
From: arteevraina <arteevraina@gmail.com>
Date: Thu, 8 Sep 2022 21:12:08 +0530
Subject: [PATCH 03/17] refactor: remove nmhash.c file

---
 test/hash_functions/nmhash.c | 8 --------
 1 file changed, 8 deletions(-)
 delete mode 100644 test/hash_functions/nmhash.c

diff --git a/test/hash_functions/nmhash.c b/test/hash_functions/nmhash.c
deleted file mode 100644
index 987bc568c..000000000
--- a/test/hash_functions/nmhash.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#include "nmhash.h"
-int32_t nmhash32_test ( const void * key, size_t len, uint32_t seed ) {
-  return NMHASH32 (key, (const size_t) len, seed);
-}
-
-int32_t nmhash32x_test ( const void * key, size_t len, uint32_t seed ) {
-  return NMHASH32X (key, (const size_t) len, seed);
-}

From 21212c8a6fcbd6a36b91907785b9aecaed62da47 Mon Sep 17 00:00:00 2001
From: arteevraina <arteevraina@gmail.com>
Date: Thu, 8 Sep 2022 21:12:40 +0530
Subject: [PATCH 04/17] refactor: remove test_always_skip & test_always_fail
 files

---
 test/test_always_fail.f90 | 8 --------
 test/test_always_skip.f90 | 8 --------
 2 files changed, 16 deletions(-)
 delete mode 100644 test/test_always_fail.f90
 delete mode 100644 test/test_always_skip.f90

diff --git a/test/test_always_fail.f90 b/test/test_always_fail.f90
deleted file mode 100644
index c52b5788d..000000000
--- a/test/test_always_fail.f90
+++ /dev/null
@@ -1,8 +0,0 @@
-program test_always_fail
-
-use stdlib_error, only: check
-implicit none
-
-call check(.false.)
-
-end program
diff --git a/test/test_always_skip.f90 b/test/test_always_skip.f90
deleted file mode 100644
index 2d10c3daa..000000000
--- a/test/test_always_skip.f90
+++ /dev/null
@@ -1,8 +0,0 @@
-program test_always_skip
-
-use stdlib_error, only: check
-implicit none
-
-call check(.false., code=77)
-
-end program

From 35ed9b6489f22a324d0dc59cb92a8d068e9b97ae Mon Sep 17 00:00:00 2001
From: arteevraina <arteevraina@gmail.com>
Date: Thu, 8 Sep 2022 21:17:03 +0530
Subject: [PATCH 05/17] fix: failing ci

---
 CMakeLists.txt      | 2 +-
 test/CMakeLists.txt | 5 -----
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 26f49a428..296b1fcd7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -50,7 +50,7 @@ endif()
 
 # Custom preprocessor flags
 if(DEFINED CMAKE_MAXIMUM_RANK)
-  set(fyppFlags "-DMAXRANK=${CMAKE_MAXIMUM_RANK}")
+  set(fyppFlags "-DMAXRANK=${CMAKE_MAXIMUM_RANK} -I${PROJECT_SOURCE_DIR}/include")
 elseif(f03rank)
   set(fyppFlags)
 else()
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index de332abb3..b791c1696 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -10,11 +10,6 @@ macro(ADDTEST name)
              WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
 endmacro(ADDTEST)
 
-list(
-  APPEND fyppFlags
-  "-I${PROJECT_SOURCE_DIR}/src"
-)
-
 add_subdirectory(array)
 add_subdirectory(ascii)
 add_subdirectory(bitsets)

From 1608e14665569d6e446334c93f9aa8011347e963 Mon Sep 17 00:00:00 2001
From: arteevraina <arteevraina@gmail.com>
Date: Thu, 8 Sep 2022 22:20:04 +0530
Subject: [PATCH 06/17] fix: append include directory later

---
 CMakeLists.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 296b1fcd7..4d3d2a1f8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -50,7 +50,7 @@ endif()
 
 # Custom preprocessor flags
 if(DEFINED CMAKE_MAXIMUM_RANK)
-  set(fyppFlags "-DMAXRANK=${CMAKE_MAXIMUM_RANK} -I${PROJECT_SOURCE_DIR}/include")
+  set(fyppFlags "-DMAXRANK=${CMAKE_MAXIMUM_RANK}")
 elseif(f03rank)
   set(fyppFlags)
 else()
@@ -64,6 +64,7 @@ list(
   "-DPROJECT_VERSION_MAJOR=${PROJECT_VERSION_MAJOR}"
   "-DPROJECT_VERSION_MINOR=${PROJECT_VERSION_MINOR}"
   "-DPROJECT_VERSION_PATCH=${PROJECT_VERSION_PATCH}"
+  "-I${PROJECT_SOURCE_DIR}/include"
 )
 
 add_subdirectory(src)

From d0363113c7e9481d9b5ce645d427789000c3f64d Mon Sep 17 00:00:00 2001
From: arteevraina <arteevraina@gmail.com>
Date: Fri, 9 Sep 2022 09:59:08 +0530
Subject: [PATCH 07/17] fix: remove test_always_fail & test_always_skip
 declaration from CMake file

---
 test/CMakeLists.txt | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index b791c1696..3519432a3 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -29,8 +29,3 @@ add_subdirectory(system)
 add_subdirectory(quadrature)
 add_subdirectory(math)
 add_subdirectory(stringlist)
-
-ADDTEST(always_skip)
-set_tests_properties(always_skip PROPERTIES SKIP_RETURN_CODE 77)
-ADDTEST(always_fail)
-set_tests_properties(always_fail PROPERTIES WILL_FAIL true)

From 0d4fc9177c9b3bfd69efd9b76f5904c83b019fc1 Mon Sep 17 00:00:00 2001
From: arteevraina <arteevraina@gmail.com>
Date: Fri, 9 Sep 2022 11:37:23 +0530
Subject: [PATCH 08/17] fix: failing ci for common.fypp

---
 ci/fpm-deployment.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ci/fpm-deployment.sh b/ci/fpm-deployment.sh
index bdd3c2b6e..274a8487b 100644
--- a/ci/fpm-deployment.sh
+++ b/ci/fpm-deployment.sh
@@ -23,6 +23,7 @@ include=(
   "ci/fpm.toml"
   "LICENSE"
   "VERSION"
+  "include/common.fypp"
 )
 
 # Files to remove from collection

From e88c9222113e4bde35a16f5ea09337a51cde7dc4 Mon Sep 17 00:00:00 2001
From: arteevraina <arteevraina@gmail.com>
Date: Fri, 9 Sep 2022 11:44:51 +0530
Subject: [PATCH 09/17] refactor: replace Rank 7 with Rank > 7

---
 test/stats/test_mean_f03.fypp | 36 +++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/test/stats/test_mean_f03.fypp b/test/stats/test_mean_f03.fypp
index 82934f191..0919572b8 100644
--- a/test/stats/test_mean_f03.fypp
+++ b/test/stats/test_mean_f03.fypp
@@ -72,7 +72,7 @@ contains
         if (allocated(error)) return
 
         #:else
-        call skip_test(error, "Rank 7 is not supported")
+        call skip_test(error, "Rank > 7 is not supported")
         #:endif
     end subroutine
 
@@ -86,7 +86,7 @@ contains
         if (allocated(error)) return
 
         #:else
-        call skip_test(error, "Rank 7 is not supported")
+        call skip_test(error, "Rank > 7 is not supported")
         #:endif
     end subroutine
 
@@ -105,7 +105,7 @@ contains
         #:endfor
 
         #:else
-        call skip_test(error, "Rank 7 is not supported")
+        call skip_test(error, "Rank > 7 is not supported")
         #:endif
     end subroutine
 
@@ -126,7 +126,7 @@ contains
         #:endfor
 
         #:else
-        call skip_test(error, "Rank 7 is not supported")
+        call skip_test(error, "Rank > 7 is not supported")
         #:endif
     end subroutine
 
@@ -142,7 +142,7 @@ contains
         if (allocated(error)) return
 
         #:else
-        call skip_test(error, "Rank 7 is not supported")
+        call skip_test(error, "Rank > 7 is not supported")
         #:endif
     end subroutine
 
@@ -161,7 +161,7 @@ contains
         #:endfor
 
         #:else
-        call skip_test(error, "Rank 7 is not supported")
+        call skip_test(error, "Rank > 7 is not supported")
         #:endif
     end subroutine
     #:endfor
@@ -178,7 +178,7 @@ contains
         if (allocated(error)) return
         
         #:else
-        call skip_test(error, "Rank 7 is not supported")
+        call skip_test(error, "Rank > 7 is not supported")
         #:endif
     end subroutine
 
@@ -192,7 +192,7 @@ contains
         if (allocated(error)) return
 
         #:else
-        call skip_test(error, "Rank 7 is not supported")
+        call skip_test(error, "Rank > 7 is not supported")
         #:endif
     end subroutine
 
@@ -211,7 +211,7 @@ contains
         #:endfor
 
         #:else
-        call skip_test(error, "Rank 7 is not supported")
+        call skip_test(error, "Rank > 7 is not supported")
         #:endif
     end subroutine
 
@@ -227,7 +227,7 @@ contains
         #:endfor
 
         #:else
-        call skip_test(error, "Rank 7 is not supported")
+        call skip_test(error, "Rank > 7 is not supported")
         #:endif
     end subroutine
 
@@ -243,7 +243,7 @@ contains
         if (allocated(error)) return
 
         #:else
-        call skip_test(error, "Rank 7 is not supported")
+        call skip_test(error, "Rank > 7 is not supported")
         #:endif
     end subroutine
 
@@ -262,7 +262,7 @@ contains
         #:endfor
 
         #:else
-        call skip_test(error, "Rank 7 is not supported")
+        call skip_test(error, "Rank > 7 is not supported")
         #:endif
     end subroutine
     #:endfor
@@ -279,7 +279,7 @@ contains
         if (allocated(error)) return
 
         #:else
-        call skip_test(error, "Rank 7 is not supported")
+        call skip_test(error, "Rank > 7 is not supported")
         #:endif
     end subroutine
 
@@ -293,7 +293,7 @@ contains
         if (allocated(error)) return
 
         #:else
-        call skip_test(error, "Rank 7 is not supported")
+        call skip_test(error, "Rank > 7 is not supported")
         #:endif
     end subroutine
 
@@ -312,7 +312,7 @@ contains
         #:endfor
 
         #:else
-        call skip_test(error, "Rank 7 is not supported")
+        call skip_test(error, "Rank > 7 is not supported")
         #:endif
     end subroutine
 
@@ -328,7 +328,7 @@ contains
         #:endfor
 
         #:else
-        call skip_test(error, "Rank 7 is not supported")
+        call skip_test(error, "Rank > 7 is not supported")
         #:endif
     end subroutine
 
@@ -344,7 +344,7 @@ contains
         if (allocated(error)) return
 
         #:else
-        call skip_test(error, "Rank 7 is not supported")
+        call skip_test(error, "Rank > 7 is not supported")
         #:endif
     end subroutine
 
@@ -363,7 +363,7 @@ contains
         #:endfor
 
         #:else
-        call skip_test(error, "Rank 7 is not supported")
+        call skip_test(error, "Rank > 7 is not supported")
         #:endif
     end subroutine
     #:endfor

From 9877ed4aabfddbdbf01bf0e799b4302a2dd51754 Mon Sep 17 00:00:00 2001
From: arteevraina <arteevraina@gmail.com>
Date: Fri, 9 Sep 2022 21:15:42 +0530
Subject: [PATCH 10/17] fix: remove test_always_skip & test_always_fail
 reference from deployment script

---
 ci/fpm-deployment.sh | 2 --
 1 file changed, 2 deletions(-)
 mode change 100644 => 100755 ci/fpm-deployment.sh

diff --git a/ci/fpm-deployment.sh b/ci/fpm-deployment.sh
old mode 100644
new mode 100755
index 274a8487b..5ff7d25c8
--- a/ci/fpm-deployment.sh
+++ b/ci/fpm-deployment.sh
@@ -28,8 +28,6 @@ include=(
 
 # Files to remove from collection
 prune=(
-  "$destdir/test/test_always_fail.f90"
-  "$destdir/test/test_always_skip.f90"
   "$destdir/test/test_hash_functions.f90"
   "$destdir/src/common.f90"
   "$destdir/src/f18estop.f90"

From 2a6c4292390a5d3d50dedc7258dafaefb4711af2 Mon Sep 17 00:00:00 2001
From: arteevraina <arteevraina@gmail.com>
Date: Fri, 9 Sep 2022 21:54:26 +0530
Subject: [PATCH 11/17] fix: fpm deployment script for removing files

---
 ci/fpm-deployment.sh | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/ci/fpm-deployment.sh b/ci/fpm-deployment.sh
index 5ff7d25c8..b2ea2f2fb 100755
--- a/ci/fpm-deployment.sh
+++ b/ci/fpm-deployment.sh
@@ -23,13 +23,12 @@ include=(
   "ci/fpm.toml"
   "LICENSE"
   "VERSION"
-  "include/common.fypp"
 )
 
 # Files to remove from collection
 prune=(
   "$destdir/test/test_hash_functions.f90"
-  "$destdir/src/common.f90"
+  "$destdir/include/common.f90"
   "$destdir/src/f18estop.f90"
 )
 

From 21748c016c5dc868b18a6fb6a7502cc95908ca96 Mon Sep 17 00:00:00 2001
From: arteevraina <arteevraina@gmail.com>
Date: Fri, 9 Sep 2022 21:55:23 +0530
Subject: [PATCH 12/17] fix: replace path of common.fypp

---
 src/stdlib_ascii.fypp                                  | 2 +-
 src/stdlib_bitsets.fypp                                | 2 +-
 src/stdlib_bitsets_64.fypp                             | 2 +-
 src/stdlib_bitsets_large.fypp                          | 2 +-
 src/stdlib_io.fypp                                     | 2 +-
 src/stdlib_io_npy.fypp                                 | 2 +-
 src/stdlib_io_npy_load.fypp                            | 2 +-
 src/stdlib_io_npy_save.fypp                            | 2 +-
 src/stdlib_kinds.fypp                                  | 2 +-
 src/stdlib_linalg.fypp                                 | 2 +-
 src/stdlib_linalg_diag.fypp                            | 2 +-
 src/stdlib_linalg_outer_product.fypp                   | 2 +-
 src/stdlib_math.fypp                                   | 2 +-
 src/stdlib_math_all_close.fypp                         | 2 +-
 src/stdlib_math_arange.fypp                            | 2 +-
 src/stdlib_math_diff.fypp                              | 2 +-
 src/stdlib_math_is_close.fypp                          | 2 +-
 src/stdlib_math_linspace.fypp                          | 2 +-
 src/stdlib_math_logspace.fypp                          | 2 +-
 src/stdlib_optval.fypp                                 | 2 +-
 src/stdlib_quadrature.fypp                             | 2 +-
 src/stdlib_quadrature_simps.fypp                       | 2 +-
 src/stdlib_quadrature_trapz.fypp                       | 2 +-
 src/stdlib_random.fypp                                 | 2 +-
 src/stdlib_selection.fypp                              | 2 +-
 src/stdlib_sorting.fypp                                | 2 +-
 src/stdlib_sorting_ord_sort.fypp                       | 2 +-
 src/stdlib_sorting_sort.fypp                           | 2 +-
 src/stdlib_sorting_sort_index.fypp                     | 2 +-
 src/stdlib_specialfunctions_gamma.fypp                 | 2 +-
 src/stdlib_stats.fypp                                  | 2 +-
 src/stdlib_stats_corr.fypp                             | 2 +-
 src/stdlib_stats_cov.fypp                              | 2 +-
 src/stdlib_stats_distribution_exponential.fypp         | 2 +-
 src/stdlib_stats_distribution_normal.fypp              | 2 +-
 src/stdlib_stats_distribution_uniform.fypp             | 2 +-
 src/stdlib_stats_mean.fypp                             | 2 +-
 src/stdlib_stats_median.fypp                           | 2 +-
 src/stdlib_stats_moment.fypp                           | 2 +-
 src/stdlib_stats_moment_all.fypp                       | 2 +-
 src/stdlib_stats_moment_mask.fypp                      | 2 +-
 src/stdlib_stats_moment_scalar.fypp                    | 2 +-
 src/stdlib_stats_var.fypp                              | 2 +-
 src/stdlib_string_type.fypp                            | 2 +-
 src/stdlib_string_type_constructor.fypp                | 2 +-
 src/stdlib_strings.fypp                                | 2 +-
 src/stdlib_strings_to_string.fypp                      | 2 +-
 src/stdlib_version.fypp                                | 2 +-
 test/io/test_loadtxt_qp.fypp                           | 2 +-
 test/io/test_savetxt_qp.fypp                           | 2 +-
 test/linalg/test_linalg.fypp                           | 2 +-
 test/linalg/test_linalg_matrix_property_checks.fypp    | 2 +-
 test/math/test_stdlib_math.fypp                        | 2 +-
 test/optval/test_optval.fypp                           | 2 +-
 test/quadrature/test_simps.fypp                        | 2 +-
 test/quadrature/test_trapz.fypp                        | 2 +-
 test/selection/test_selection.fypp                     | 2 +-
 test/specialfunctions/test_specialfunctions_gamma.fypp | 2 +-
 test/stats/test_distribution_exponential.fypp          | 2 +-
 test/stats/test_distribution_normal.fypp               | 2 +-
 test/stats/test_distribution_uniform.fypp              | 2 +-
 test/stats/test_mean.fypp                              | 2 +-
 test/stats/test_mean_f03.fypp                          | 2 +-
 test/stats/test_median.fypp                            | 2 +-
 64 files changed, 64 insertions(+), 64 deletions(-)

diff --git a/src/stdlib_ascii.fypp b/src/stdlib_ascii.fypp
index 8dc47388a..3c5a61cee 100644
--- a/src/stdlib_ascii.fypp
+++ b/src/stdlib_ascii.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 
 !> The `stdlib_ascii` module provides procedures for handling and manipulating
 !> intrinsic character variables and constants.
diff --git a/src/stdlib_bitsets.fypp b/src/stdlib_bitsets.fypp
index 0605f2792..479f7b8d3 100644
--- a/src/stdlib_bitsets.fypp
+++ b/src/stdlib_bitsets.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 module stdlib_bitsets
 !! Implements zero based bitsets of size up to `huge(0_int32)`.
 !! The current code uses 64 bit integers to store the bits and uses all 64 bits.
diff --git a/src/stdlib_bitsets_64.fypp b/src/stdlib_bitsets_64.fypp
index 82ad1397c..a6b1fea5f 100644
--- a/src/stdlib_bitsets_64.fypp
+++ b/src/stdlib_bitsets_64.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 submodule(stdlib_bitsets) stdlib_bitsets_64
     implicit none
 
diff --git a/src/stdlib_bitsets_large.fypp b/src/stdlib_bitsets_large.fypp
index 324f19741..5856ba6dd 100644
--- a/src/stdlib_bitsets_large.fypp
+++ b/src/stdlib_bitsets_large.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 submodule(stdlib_bitsets) stdlib_bitsets_large
     implicit none
 
diff --git a/src/stdlib_io.fypp b/src/stdlib_io.fypp
index c0f84932e..b76cc185d 100644
--- a/src/stdlib_io.fypp
+++ b/src/stdlib_io.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 
 #:set KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES + CMPLX_KINDS_TYPES
 
diff --git a/src/stdlib_io_npy.fypp b/src/stdlib_io_npy.fypp
index bf69a6a0c..017357a44 100644
--- a/src/stdlib_io_npy.fypp
+++ b/src/stdlib_io_npy.fypp
@@ -1,6 +1,6 @@
 ! SPDX-Identifer: MIT
 
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set RANKS = range(1, MAXRANK + 1)
 #:set KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES + CMPLX_KINDS_TYPES
 
diff --git a/src/stdlib_io_npy_load.fypp b/src/stdlib_io_npy_load.fypp
index 01fce87a9..267ff4f63 100644
--- a/src/stdlib_io_npy_load.fypp
+++ b/src/stdlib_io_npy_load.fypp
@@ -1,6 +1,6 @@
 ! SPDX-Identifier: MIT
 
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set RANKS = range(1, MAXRANK + 1)
 #:set KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES + CMPLX_KINDS_TYPES
 
diff --git a/src/stdlib_io_npy_save.fypp b/src/stdlib_io_npy_save.fypp
index 706c3cd90..1e6062670 100644
--- a/src/stdlib_io_npy_save.fypp
+++ b/src/stdlib_io_npy_save.fypp
@@ -1,6 +1,6 @@
 ! SPDX-Identifer: MIT
 
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set RANKS = range(1, MAXRANK + 1)
 #:set KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES + CMPLX_KINDS_TYPES
 
diff --git a/src/stdlib_kinds.fypp b/src/stdlib_kinds.fypp
index f6b7726c1..fe46f346c 100644
--- a/src/stdlib_kinds.fypp
+++ b/src/stdlib_kinds.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 !> Version: experimental
 !>
 !> The specification of this module is available [here](../page/specs/stdlib_kinds.html).
diff --git a/src/stdlib_linalg.fypp b/src/stdlib_linalg.fypp
index bc1017f0a..5b365f9c9 100644
--- a/src/stdlib_linalg.fypp
+++ b/src/stdlib_linalg.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set RCI_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES + INT_KINDS_TYPES
 module stdlib_linalg
   !!Provides a support for various linear algebra procedures
diff --git a/src/stdlib_linalg_diag.fypp b/src/stdlib_linalg_diag.fypp
index ec05abc42..84281075c 100644
--- a/src/stdlib_linalg_diag.fypp
+++ b/src/stdlib_linalg_diag.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set RCI_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES + INT_KINDS_TYPES
 submodule (stdlib_linalg) stdlib_linalg_diag
 
diff --git a/src/stdlib_linalg_outer_product.fypp b/src/stdlib_linalg_outer_product.fypp
index 26c726435..1ee325f2a 100644
--- a/src/stdlib_linalg_outer_product.fypp
+++ b/src/stdlib_linalg_outer_product.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set RCI_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES + INT_KINDS_TYPES
 submodule (stdlib_linalg) stdlib_linalg_outer_product
 
diff --git a/src/stdlib_math.fypp b/src/stdlib_math.fypp
index c75b4d9f5..5ae8ed743 100644
--- a/src/stdlib_math.fypp
+++ b/src/stdlib_math.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set IR_KINDS_TYPES = INT_KINDS_TYPES + REAL_KINDS_TYPES
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
 
diff --git a/src/stdlib_math_all_close.fypp b/src/stdlib_math_all_close.fypp
index 788587e62..5b1141f27 100644
--- a/src/stdlib_math_all_close.fypp
+++ b/src/stdlib_math_all_close.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set RANKS = range(1, MAXRANK + 1)
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
 
diff --git a/src/stdlib_math_arange.fypp b/src/stdlib_math_arange.fypp
index eb3be3202..46c30d63a 100644
--- a/src/stdlib_math_arange.fypp
+++ b/src/stdlib_math_arange.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 submodule(stdlib_math) stdlib_math_arange
 
 contains
diff --git a/src/stdlib_math_diff.fypp b/src/stdlib_math_diff.fypp
index eb8cb0bc2..de995404f 100644
--- a/src/stdlib_math_diff.fypp
+++ b/src/stdlib_math_diff.fypp
@@ -1,7 +1,7 @@
 !> Inspired by original code (MIT license) written in 2016 by Keurfon Luu (keurfonluu@outlook.com)
 !> https://github.com/keurfonluu/Forlab
 
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set RI_KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES
 submodule (stdlib_math) stdlib_math_diff
 
diff --git a/src/stdlib_math_is_close.fypp b/src/stdlib_math_is_close.fypp
index b97134802..f54fce83d 100644
--- a/src/stdlib_math_is_close.fypp
+++ b/src/stdlib_math_is_close.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 
 submodule(stdlib_math) stdlib_math_is_close
 
diff --git a/src/stdlib_math_linspace.fypp b/src/stdlib_math_linspace.fypp
index 802c5e80a..b9e0983c2 100644
--- a/src/stdlib_math_linspace.fypp
+++ b/src/stdlib_math_linspace.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 submodule (stdlib_math) stdlib_math_linspace
 
 implicit none
diff --git a/src/stdlib_math_logspace.fypp b/src/stdlib_math_logspace.fypp
index f43169177..bdb559bfe 100644
--- a/src/stdlib_math_logspace.fypp
+++ b/src/stdlib_math_logspace.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
 
 submodule (stdlib_math) stdlib_math_logspace
diff --git a/src/stdlib_optval.fypp b/src/stdlib_optval.fypp
index f559e1d98..633050dcd 100644
--- a/src/stdlib_optval.fypp
+++ b/src/stdlib_optval.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 
 #:set KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES + CMPLX_KINDS_TYPES + &
   & [('l1','logical')]
diff --git a/src/stdlib_quadrature.fypp b/src/stdlib_quadrature.fypp
index af7bd2369..c570891b4 100644
--- a/src/stdlib_quadrature.fypp
+++ b/src/stdlib_quadrature.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 module stdlib_quadrature
     !! ([Specification](../page/specs/stdlib_quadrature.html#description))
     use stdlib_kinds, only: sp, dp, xdp, qp
diff --git a/src/stdlib_quadrature_simps.fypp b/src/stdlib_quadrature_simps.fypp
index 9d6ef8b05..256508199 100644
--- a/src/stdlib_quadrature_simps.fypp
+++ b/src/stdlib_quadrature_simps.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 
 submodule (stdlib_quadrature) stdlib_quadrature_simps
     use stdlib_error, only: check
diff --git a/src/stdlib_quadrature_trapz.fypp b/src/stdlib_quadrature_trapz.fypp
index 3ffa019de..aa878e387 100644
--- a/src/stdlib_quadrature_trapz.fypp
+++ b/src/stdlib_quadrature_trapz.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 
 submodule (stdlib_quadrature) stdlib_quadrature_trapz
     use stdlib_error, only: check
diff --git a/src/stdlib_random.fypp b/src/stdlib_random.fypp
index 9a587c86b..6bcf7a4f8 100644
--- a/src/stdlib_random.fypp
+++ b/src/stdlib_random.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 module stdlib_random
     use stdlib_kinds, only: int8, int16, int32, int64
     use stdlib_optval, only: optval
diff --git a/src/stdlib_selection.fypp b/src/stdlib_selection.fypp
index 089b489fa..ad4bc014e 100644
--- a/src/stdlib_selection.fypp
+++ b/src/stdlib_selection.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 ! Specify kinds/types for the input array in select and arg_select
 #:set ARRAY_KINDS_TYPES = INT_KINDS_TYPES + REAL_KINDS_TYPES
 ! The index arrays are of all INT_KINDS_TYPES
diff --git a/src/stdlib_sorting.fypp b/src/stdlib_sorting.fypp
index 3ef5ca9ae..b5630659b 100644
--- a/src/stdlib_sorting.fypp
+++ b/src/stdlib_sorting.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 
 #:set INT_TYPES_ALT_NAME = list(zip(INT_TYPES, INT_TYPES, INT_KINDS))
 #:set REAL_TYPES_ALT_NAME = list(zip(REAL_TYPES, REAL_TYPES, REAL_KINDS))
diff --git a/src/stdlib_sorting_ord_sort.fypp b/src/stdlib_sorting_ord_sort.fypp
index a5d950447..0e1e33472 100644
--- a/src/stdlib_sorting_ord_sort.fypp
+++ b/src/stdlib_sorting_ord_sort.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set INT_TYPES_ALT_NAME = list(zip(INT_TYPES, INT_TYPES, INT_TYPES, INT_KINDS))
 #:set REAL_TYPES_ALT_NAME = list(zip(REAL_TYPES, REAL_TYPES, REAL_TYPES, REAL_KINDS))
 #:set STRING_TYPES_ALT_NAME = list(zip(STRING_TYPES, STRING_TYPES, STRING_TYPES, STRING_KINDS))
diff --git a/src/stdlib_sorting_sort.fypp b/src/stdlib_sorting_sort.fypp
index ecc2c3154..404ba76c8 100644
--- a/src/stdlib_sorting_sort.fypp
+++ b/src/stdlib_sorting_sort.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set INT_TYPES_ALT_NAME = list(zip(INT_TYPES, INT_TYPES, INT_KINDS))
 #:set REAL_TYPES_ALT_NAME = list(zip(REAL_TYPES, REAL_TYPES, REAL_KINDS))
 #:set STRING_TYPES_ALT_NAME = list(zip(STRING_TYPES, STRING_TYPES, STRING_KINDS))
diff --git a/src/stdlib_sorting_sort_index.fypp b/src/stdlib_sorting_sort_index.fypp
index b2a100d92..401f15039 100644
--- a/src/stdlib_sorting_sort_index.fypp
+++ b/src/stdlib_sorting_sort_index.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set INT_TYPES_ALT_NAME = list(zip(INT_TYPES, INT_TYPES, INT_TYPES, INT_KINDS))
 #:set REAL_TYPES_ALT_NAME = list(zip(REAL_TYPES, REAL_TYPES, REAL_TYPES, REAL_KINDS))
 #:set STRING_TYPES_ALT_NAME = list(zip(STRING_TYPES, STRING_TYPES, STRING_TYPES, STRING_KINDS))
diff --git a/src/stdlib_specialfunctions_gamma.fypp b/src/stdlib_specialfunctions_gamma.fypp
index 7129fddf4..23d0ad7b1 100644
--- a/src/stdlib_specialfunctions_gamma.fypp
+++ b/src/stdlib_specialfunctions_gamma.fypp
@@ -1,6 +1,6 @@
 #:set WITH_QP = False
 #:set WITH_XDP = False
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set CI_KINDS_TYPES = INT_KINDS_TYPES + CMPLX_KINDS_TYPES
 module stdlib_specialfunctions_gamma
     use iso_fortran_env, only : qp => real128
diff --git a/src/stdlib_stats.fypp b/src/stdlib_stats.fypp
index adf373f0a..747037dd8 100644
--- a/src/stdlib_stats.fypp
+++ b/src/stdlib_stats.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set RANKS = range(1, MAXRANK + 1)
 #:set REDRANKS = range(2, MAXRANK + 1)
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
diff --git a/src/stdlib_stats_corr.fypp b/src/stdlib_stats_corr.fypp
index bea4b802a..c92d4ada1 100644
--- a/src/stdlib_stats_corr.fypp
+++ b/src/stdlib_stats_corr.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
 submodule (stdlib_stats) stdlib_stats_corr
 
diff --git a/src/stdlib_stats_cov.fypp b/src/stdlib_stats_cov.fypp
index a4c473a11..af606cca5 100644
--- a/src/stdlib_stats_cov.fypp
+++ b/src/stdlib_stats_cov.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
 submodule (stdlib_stats) stdlib_stats_cov
 
diff --git a/src/stdlib_stats_distribution_exponential.fypp b/src/stdlib_stats_distribution_exponential.fypp
index 01d4e8eb8..4e7a09207 100644
--- a/src/stdlib_stats_distribution_exponential.fypp
+++ b/src/stdlib_stats_distribution_exponential.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
 module stdlib_stats_distribution_exponential
     use stdlib_kinds, only : sp, dp, xdp, qp, int32
diff --git a/src/stdlib_stats_distribution_normal.fypp b/src/stdlib_stats_distribution_normal.fypp
index de4f4b275..3abd9755e 100644
--- a/src/stdlib_stats_distribution_normal.fypp
+++ b/src/stdlib_stats_distribution_normal.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
 module stdlib_stats_distribution_normal
     use stdlib_kinds, only : sp, dp, xdp, qp, int32
diff --git a/src/stdlib_stats_distribution_uniform.fypp b/src/stdlib_stats_distribution_uniform.fypp
index 1bf67a698..8f1a553ab 100644
--- a/src/stdlib_stats_distribution_uniform.fypp
+++ b/src/stdlib_stats_distribution_uniform.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
 #:set ALL_KINDS_TYPES = INT_KINDS_TYPES + RC_KINDS_TYPES
 module stdlib_stats_distribution_uniform
diff --git a/src/stdlib_stats_mean.fypp b/src/stdlib_stats_mean.fypp
index 3e27d95ef..c7705dfdd 100644
--- a/src/stdlib_stats_mean.fypp
+++ b/src/stdlib_stats_mean.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set RANKS = range(1, MAXRANK + 1)
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
 submodule (stdlib_stats) stdlib_stats_mean
diff --git a/src/stdlib_stats_median.fypp b/src/stdlib_stats_median.fypp
index ef1e797ca..ec2c592b6 100644
--- a/src/stdlib_stats_median.fypp
+++ b/src/stdlib_stats_median.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set RANKS = range(1, MAXRANK + 1)
 #:set IR_KINDS_TYPES_OUTPUT = list(zip(INT_KINDS,INT_TYPES, ['dp']*len(INT_KINDS))) + list(zip(REAL_KINDS, REAL_TYPES, REAL_KINDS))
 
diff --git a/src/stdlib_stats_moment.fypp b/src/stdlib_stats_moment.fypp
index 7283cc576..ed0e2b883 100644
--- a/src/stdlib_stats_moment.fypp
+++ b/src/stdlib_stats_moment.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set RANKS = range(1, MAXRANK + 1)
 #:set REDRANKS = range(2, MAXRANK + 1)
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
diff --git a/src/stdlib_stats_moment_all.fypp b/src/stdlib_stats_moment_all.fypp
index bc5ae00c7..543586caa 100644
--- a/src/stdlib_stats_moment_all.fypp
+++ b/src/stdlib_stats_moment_all.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set RANKS = range(1, MAXRANK + 1)
 #:set REDRANKS = range(2, MAXRANK + 1)
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
diff --git a/src/stdlib_stats_moment_mask.fypp b/src/stdlib_stats_moment_mask.fypp
index a56d4d1b3..11e6de347 100644
--- a/src/stdlib_stats_moment_mask.fypp
+++ b/src/stdlib_stats_moment_mask.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set RANKS = range(1, MAXRANK + 1)
 #:set REDRANKS = range(2, MAXRANK + 1)
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
diff --git a/src/stdlib_stats_moment_scalar.fypp b/src/stdlib_stats_moment_scalar.fypp
index 137ff6d79..0b0f8a87c 100644
--- a/src/stdlib_stats_moment_scalar.fypp
+++ b/src/stdlib_stats_moment_scalar.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set RANKS = range(1, MAXRANK + 1)
 #:set REDRANKS = range(2, MAXRANK + 1)
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
diff --git a/src/stdlib_stats_var.fypp b/src/stdlib_stats_var.fypp
index 31eaf243e..dbc0da557 100644
--- a/src/stdlib_stats_var.fypp
+++ b/src/stdlib_stats_var.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set RANKS = range(1, MAXRANK + 1)
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
 submodule (stdlib_stats) stdlib_stats_var
diff --git a/src/stdlib_string_type.fypp b/src/stdlib_string_type.fypp
index 0bb5ff8a2..bb5c2fcd0 100644
--- a/src/stdlib_string_type.fypp
+++ b/src/stdlib_string_type.fypp
@@ -1,5 +1,5 @@
 ! SPDX-Identifier: MIT
-#:include "common.fypp"
+#:include "../include/common.fypp"
 
 !> Implementation of a string type to hold an arbitrary sequence of characters.
 !>
diff --git a/src/stdlib_string_type_constructor.fypp b/src/stdlib_string_type_constructor.fypp
index 859eaf103..591701708 100644
--- a/src/stdlib_string_type_constructor.fypp
+++ b/src/stdlib_string_type_constructor.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 submodule(stdlib_string_type) stdlib_string_type_constructor
 
     use stdlib_strings, only: to_string
diff --git a/src/stdlib_strings.fypp b/src/stdlib_strings.fypp
index 367c08159..4011f4aa2 100644
--- a/src/stdlib_strings.fypp
+++ b/src/stdlib_strings.fypp
@@ -1,5 +1,5 @@
 ! SPDX-Identifier: MIT
-#:include "common.fypp"
+#:include "../include/common.fypp"
 !> This module implements basic string handling routines.
 !>
 !> The specification of this module is available [here](../page/specs/stdlib_strings.html).
diff --git a/src/stdlib_strings_to_string.fypp b/src/stdlib_strings_to_string.fypp
index c9a6bcd99..daa754504 100644
--- a/src/stdlib_strings_to_string.fypp
+++ b/src/stdlib_strings_to_string.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 submodule(stdlib_strings) stdlib_strings_to_string
 
     integer, parameter :: buffer_len = 128
diff --git a/src/stdlib_version.fypp b/src/stdlib_version.fypp
index 5be172cdc..dbb8dd008 100644
--- a/src/stdlib_version.fypp
+++ b/src/stdlib_version.fypp
@@ -1,6 +1,6 @@
 ! SPDX-Identifier: MIT
 
-#:include "common.fypp"
+#:include "../include/common.fypp"
 
 !> Version information on stdlib
 module stdlib_version
diff --git a/test/io/test_loadtxt_qp.fypp b/test/io/test_loadtxt_qp.fypp
index fc041a60a..3bd26a22b 100644
--- a/test/io/test_loadtxt_qp.fypp
+++ b/test/io/test_loadtxt_qp.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 
 module test_loadtxt_qp
     use stdlib_kinds, only: qp
diff --git a/test/io/test_savetxt_qp.fypp b/test/io/test_savetxt_qp.fypp
index 237d8e806..fcfefe1bd 100644
--- a/test/io/test_savetxt_qp.fypp
+++ b/test/io/test_savetxt_qp.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 
 module test_savetxt_qp
     use stdlib_kinds, only: qp
diff --git a/test/linalg/test_linalg.fypp b/test/linalg/test_linalg.fypp
index f74cbff6b..1aba7c342 100644
--- a/test/linalg/test_linalg.fypp
+++ b/test/linalg/test_linalg.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 
 module test_linalg
     use testdrive, only : new_unittest, unittest_type, error_type, check, skip_test
diff --git a/test/linalg/test_linalg_matrix_property_checks.fypp b/test/linalg/test_linalg_matrix_property_checks.fypp
index b2e8b2116..aac32a1cc 100644
--- a/test/linalg/test_linalg_matrix_property_checks.fypp
+++ b/test/linalg/test_linalg_matrix_property_checks.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set RCI_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES + INT_KINDS_TYPES
 
 module test_linalg_matrix_property_checks
diff --git a/test/math/test_stdlib_math.fypp b/test/math/test_stdlib_math.fypp
index 9b02f5fbe..3907b3e0e 100644
--- a/test/math/test_stdlib_math.fypp
+++ b/test/math/test_stdlib_math.fypp
@@ -1,6 +1,6 @@
 ! SPDX-Identifier: MIT
 
-#:include "common.fypp"
+#:include "../include/common.fypp"
 
 module test_stdlib_math
     use testdrive, only : new_unittest, unittest_type, error_type, check, skip_test
diff --git a/test/optval/test_optval.fypp b/test/optval/test_optval.fypp
index 062e04c6d..6d651d7f6 100644
--- a/test/optval/test_optval.fypp
+++ b/test/optval/test_optval.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 
 module test_optval
     use, intrinsic :: iso_fortran_env, only: &
diff --git a/test/quadrature/test_simps.fypp b/test/quadrature/test_simps.fypp
index 26814c1c1..40b940cf3 100644
--- a/test/quadrature/test_simps.fypp
+++ b/test/quadrature/test_simps.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 
 module test_simps
     use stdlib_kinds, only: sp, dp, xdp, qp
diff --git a/test/quadrature/test_trapz.fypp b/test/quadrature/test_trapz.fypp
index 621323746..e55bf0f98 100644
--- a/test/quadrature/test_trapz.fypp
+++ b/test/quadrature/test_trapz.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 
 module test_trapz
     use stdlib_kinds, only: sp, dp, xdp, qp
diff --git a/test/selection/test_selection.fypp b/test/selection/test_selection.fypp
index 5c3932386..1ef4c09b2 100644
--- a/test/selection/test_selection.fypp
+++ b/test/selection/test_selection.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 ! Specify kinds/types for the input array in select and arg_select
 #:set ARRAY_KINDS_TYPES = INT_KINDS_TYPES + REAL_KINDS_TYPES
 ! The index arrays are of all INT_KINDS_TYPES
diff --git a/test/specialfunctions/test_specialfunctions_gamma.fypp b/test/specialfunctions/test_specialfunctions_gamma.fypp
index 26421bded..0c7bdc78b 100644
--- a/test/specialfunctions/test_specialfunctions_gamma.fypp
+++ b/test/specialfunctions/test_specialfunctions_gamma.fypp
@@ -1,6 +1,6 @@
 #:set WITH_QP = False
 #:set WITH_XDP = False
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set CI_KINDS_TYPES = INT_KINDS_TYPES + CMPLX_KINDS_TYPES
 module test_specialfunctions_gamma
     use testdrive, only : new_unittest, unittest_type, error_type, check
diff --git a/test/stats/test_distribution_exponential.fypp b/test/stats/test_distribution_exponential.fypp
index 95dc998c1..5d2d10257 100644
--- a/test/stats/test_distribution_exponential.fypp
+++ b/test/stats/test_distribution_exponential.fypp
@@ -1,5 +1,5 @@
 
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
 program test_distribution_expon
     use stdlib_kinds, only : sp, dp, xdp, qp
diff --git a/test/stats/test_distribution_normal.fypp b/test/stats/test_distribution_normal.fypp
index 72e2746a4..fc358f455 100644
--- a/test/stats/test_distribution_normal.fypp
+++ b/test/stats/test_distribution_normal.fypp
@@ -1,5 +1,5 @@
 
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
 program test_distribution_normal
     use stdlib_kinds, only : sp, dp, xdp, qp
diff --git a/test/stats/test_distribution_uniform.fypp b/test/stats/test_distribution_uniform.fypp
index 4975d9003..579bf0066 100644
--- a/test/stats/test_distribution_uniform.fypp
+++ b/test/stats/test_distribution_uniform.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set ALL_KINDS_TYPES = INT_KINDS_TYPES + REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
 program test_distribution_uniform
     use stdlib_error, only : check
diff --git a/test/stats/test_mean.fypp b/test/stats/test_mean.fypp
index ffa40bb05..4f0f9d6d3 100644
--- a/test/stats/test_mean.fypp
+++ b/test/stats/test_mean.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set IR_KINDS_TYPES = INT_KINDS_TYPES + REAL_KINDS_TYPES
 
 #:set NRANK = 4
diff --git a/test/stats/test_mean_f03.fypp b/test/stats/test_mean_f03.fypp
index 0919572b8..e5e72ad7a 100644
--- a/test/stats/test_mean_f03.fypp
+++ b/test/stats/test_mean_f03.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set IR_KINDS_TYPES = INT_KINDS_TYPES + REAL_KINDS_TYPES
 
 #:set NRANK = 4
diff --git a/test/stats/test_median.fypp b/test/stats/test_median.fypp
index 22d19785d..b8e86904e 100644
--- a/test/stats/test_median.fypp
+++ b/test/stats/test_median.fypp
@@ -1,4 +1,4 @@
-#:include "common.fypp"
+#:include "../include/common.fypp"
 #:set IR_KINDS_TYPES = INT_KINDS_TYPES + REAL_KINDS_TYPES
 
 #:set NRANK = 3

From f941556a113fe2474b299e52232106ace8158d7a Mon Sep 17 00:00:00 2001
From: arteevraina <arteevraina@gmail.com>
Date: Fri, 9 Sep 2022 21:55:53 +0530
Subject: [PATCH 13/17] fix: remove reference of common.fypp

---
 ci/fpm-deployment.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/ci/fpm-deployment.sh b/ci/fpm-deployment.sh
index b2ea2f2fb..1e0f6c65d 100755
--- a/ci/fpm-deployment.sh
+++ b/ci/fpm-deployment.sh
@@ -28,7 +28,6 @@ include=(
 # Files to remove from collection
 prune=(
   "$destdir/test/test_hash_functions.f90"
-  "$destdir/include/common.f90"
   "$destdir/src/f18estop.f90"
 )
 

From 5904f32e8cb9a1f061cd9ee4579c6a64cd94baab Mon Sep 17 00:00:00 2001
From: arteevraina <arteevraina@gmail.com>
Date: Sun, 11 Sep 2022 01:30:44 +0530
Subject: [PATCH 14/17] Revert "fix: replace path of common.fypp"

This reverts commit 16d8b86663a9b4e60198e87326987884fb5fefb7.
---
 src/stdlib_ascii.fypp                                  | 2 +-
 src/stdlib_bitsets.fypp                                | 2 +-
 src/stdlib_bitsets_64.fypp                             | 2 +-
 src/stdlib_bitsets_large.fypp                          | 2 +-
 src/stdlib_io.fypp                                     | 2 +-
 src/stdlib_io_npy.fypp                                 | 2 +-
 src/stdlib_io_npy_load.fypp                            | 2 +-
 src/stdlib_io_npy_save.fypp                            | 2 +-
 src/stdlib_kinds.fypp                                  | 2 +-
 src/stdlib_linalg.fypp                                 | 2 +-
 src/stdlib_linalg_diag.fypp                            | 2 +-
 src/stdlib_linalg_outer_product.fypp                   | 2 +-
 src/stdlib_math.fypp                                   | 2 +-
 src/stdlib_math_all_close.fypp                         | 2 +-
 src/stdlib_math_arange.fypp                            | 2 +-
 src/stdlib_math_diff.fypp                              | 2 +-
 src/stdlib_math_is_close.fypp                          | 2 +-
 src/stdlib_math_linspace.fypp                          | 2 +-
 src/stdlib_math_logspace.fypp                          | 2 +-
 src/stdlib_optval.fypp                                 | 2 +-
 src/stdlib_quadrature.fypp                             | 2 +-
 src/stdlib_quadrature_simps.fypp                       | 2 +-
 src/stdlib_quadrature_trapz.fypp                       | 2 +-
 src/stdlib_random.fypp                                 | 2 +-
 src/stdlib_selection.fypp                              | 2 +-
 src/stdlib_sorting.fypp                                | 2 +-
 src/stdlib_sorting_ord_sort.fypp                       | 2 +-
 src/stdlib_sorting_sort.fypp                           | 2 +-
 src/stdlib_sorting_sort_index.fypp                     | 2 +-
 src/stdlib_specialfunctions_gamma.fypp                 | 2 +-
 src/stdlib_stats.fypp                                  | 2 +-
 src/stdlib_stats_corr.fypp                             | 2 +-
 src/stdlib_stats_cov.fypp                              | 2 +-
 src/stdlib_stats_distribution_exponential.fypp         | 2 +-
 src/stdlib_stats_distribution_normal.fypp              | 2 +-
 src/stdlib_stats_distribution_uniform.fypp             | 2 +-
 src/stdlib_stats_mean.fypp                             | 2 +-
 src/stdlib_stats_median.fypp                           | 2 +-
 src/stdlib_stats_moment.fypp                           | 2 +-
 src/stdlib_stats_moment_all.fypp                       | 2 +-
 src/stdlib_stats_moment_mask.fypp                      | 2 +-
 src/stdlib_stats_moment_scalar.fypp                    | 2 +-
 src/stdlib_stats_var.fypp                              | 2 +-
 src/stdlib_string_type.fypp                            | 2 +-
 src/stdlib_string_type_constructor.fypp                | 2 +-
 src/stdlib_strings.fypp                                | 2 +-
 src/stdlib_strings_to_string.fypp                      | 2 +-
 src/stdlib_version.fypp                                | 2 +-
 test/io/test_loadtxt_qp.fypp                           | 2 +-
 test/io/test_savetxt_qp.fypp                           | 2 +-
 test/linalg/test_linalg.fypp                           | 2 +-
 test/linalg/test_linalg_matrix_property_checks.fypp    | 2 +-
 test/math/test_stdlib_math.fypp                        | 2 +-
 test/optval/test_optval.fypp                           | 2 +-
 test/quadrature/test_simps.fypp                        | 2 +-
 test/quadrature/test_trapz.fypp                        | 2 +-
 test/selection/test_selection.fypp                     | 2 +-
 test/specialfunctions/test_specialfunctions_gamma.fypp | 2 +-
 test/stats/test_distribution_exponential.fypp          | 2 +-
 test/stats/test_distribution_normal.fypp               | 2 +-
 test/stats/test_distribution_uniform.fypp              | 2 +-
 test/stats/test_mean.fypp                              | 2 +-
 test/stats/test_mean_f03.fypp                          | 2 +-
 test/stats/test_median.fypp                            | 2 +-
 64 files changed, 64 insertions(+), 64 deletions(-)

diff --git a/src/stdlib_ascii.fypp b/src/stdlib_ascii.fypp
index 3c5a61cee..8dc47388a 100644
--- a/src/stdlib_ascii.fypp
+++ b/src/stdlib_ascii.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 
 !> The `stdlib_ascii` module provides procedures for handling and manipulating
 !> intrinsic character variables and constants.
diff --git a/src/stdlib_bitsets.fypp b/src/stdlib_bitsets.fypp
index 479f7b8d3..0605f2792 100644
--- a/src/stdlib_bitsets.fypp
+++ b/src/stdlib_bitsets.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 module stdlib_bitsets
 !! Implements zero based bitsets of size up to `huge(0_int32)`.
 !! The current code uses 64 bit integers to store the bits and uses all 64 bits.
diff --git a/src/stdlib_bitsets_64.fypp b/src/stdlib_bitsets_64.fypp
index a6b1fea5f..82ad1397c 100644
--- a/src/stdlib_bitsets_64.fypp
+++ b/src/stdlib_bitsets_64.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 submodule(stdlib_bitsets) stdlib_bitsets_64
     implicit none
 
diff --git a/src/stdlib_bitsets_large.fypp b/src/stdlib_bitsets_large.fypp
index 5856ba6dd..324f19741 100644
--- a/src/stdlib_bitsets_large.fypp
+++ b/src/stdlib_bitsets_large.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 submodule(stdlib_bitsets) stdlib_bitsets_large
     implicit none
 
diff --git a/src/stdlib_io.fypp b/src/stdlib_io.fypp
index b76cc185d..c0f84932e 100644
--- a/src/stdlib_io.fypp
+++ b/src/stdlib_io.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 
 #:set KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES + CMPLX_KINDS_TYPES
 
diff --git a/src/stdlib_io_npy.fypp b/src/stdlib_io_npy.fypp
index 017357a44..bf69a6a0c 100644
--- a/src/stdlib_io_npy.fypp
+++ b/src/stdlib_io_npy.fypp
@@ -1,6 +1,6 @@
 ! SPDX-Identifer: MIT
 
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set RANKS = range(1, MAXRANK + 1)
 #:set KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES + CMPLX_KINDS_TYPES
 
diff --git a/src/stdlib_io_npy_load.fypp b/src/stdlib_io_npy_load.fypp
index 267ff4f63..01fce87a9 100644
--- a/src/stdlib_io_npy_load.fypp
+++ b/src/stdlib_io_npy_load.fypp
@@ -1,6 +1,6 @@
 ! SPDX-Identifier: MIT
 
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set RANKS = range(1, MAXRANK + 1)
 #:set KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES + CMPLX_KINDS_TYPES
 
diff --git a/src/stdlib_io_npy_save.fypp b/src/stdlib_io_npy_save.fypp
index 1e6062670..706c3cd90 100644
--- a/src/stdlib_io_npy_save.fypp
+++ b/src/stdlib_io_npy_save.fypp
@@ -1,6 +1,6 @@
 ! SPDX-Identifer: MIT
 
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set RANKS = range(1, MAXRANK + 1)
 #:set KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES + CMPLX_KINDS_TYPES
 
diff --git a/src/stdlib_kinds.fypp b/src/stdlib_kinds.fypp
index fe46f346c..f6b7726c1 100644
--- a/src/stdlib_kinds.fypp
+++ b/src/stdlib_kinds.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 !> Version: experimental
 !>
 !> The specification of this module is available [here](../page/specs/stdlib_kinds.html).
diff --git a/src/stdlib_linalg.fypp b/src/stdlib_linalg.fypp
index 5b365f9c9..bc1017f0a 100644
--- a/src/stdlib_linalg.fypp
+++ b/src/stdlib_linalg.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set RCI_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES + INT_KINDS_TYPES
 module stdlib_linalg
   !!Provides a support for various linear algebra procedures
diff --git a/src/stdlib_linalg_diag.fypp b/src/stdlib_linalg_diag.fypp
index 84281075c..ec05abc42 100644
--- a/src/stdlib_linalg_diag.fypp
+++ b/src/stdlib_linalg_diag.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set RCI_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES + INT_KINDS_TYPES
 submodule (stdlib_linalg) stdlib_linalg_diag
 
diff --git a/src/stdlib_linalg_outer_product.fypp b/src/stdlib_linalg_outer_product.fypp
index 1ee325f2a..26c726435 100644
--- a/src/stdlib_linalg_outer_product.fypp
+++ b/src/stdlib_linalg_outer_product.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set RCI_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES + INT_KINDS_TYPES
 submodule (stdlib_linalg) stdlib_linalg_outer_product
 
diff --git a/src/stdlib_math.fypp b/src/stdlib_math.fypp
index 5ae8ed743..c75b4d9f5 100644
--- a/src/stdlib_math.fypp
+++ b/src/stdlib_math.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set IR_KINDS_TYPES = INT_KINDS_TYPES + REAL_KINDS_TYPES
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
 
diff --git a/src/stdlib_math_all_close.fypp b/src/stdlib_math_all_close.fypp
index 5b1141f27..788587e62 100644
--- a/src/stdlib_math_all_close.fypp
+++ b/src/stdlib_math_all_close.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set RANKS = range(1, MAXRANK + 1)
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
 
diff --git a/src/stdlib_math_arange.fypp b/src/stdlib_math_arange.fypp
index 46c30d63a..eb3be3202 100644
--- a/src/stdlib_math_arange.fypp
+++ b/src/stdlib_math_arange.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 submodule(stdlib_math) stdlib_math_arange
 
 contains
diff --git a/src/stdlib_math_diff.fypp b/src/stdlib_math_diff.fypp
index de995404f..eb8cb0bc2 100644
--- a/src/stdlib_math_diff.fypp
+++ b/src/stdlib_math_diff.fypp
@@ -1,7 +1,7 @@
 !> Inspired by original code (MIT license) written in 2016 by Keurfon Luu (keurfonluu@outlook.com)
 !> https://github.com/keurfonluu/Forlab
 
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set RI_KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES
 submodule (stdlib_math) stdlib_math_diff
 
diff --git a/src/stdlib_math_is_close.fypp b/src/stdlib_math_is_close.fypp
index f54fce83d..b97134802 100644
--- a/src/stdlib_math_is_close.fypp
+++ b/src/stdlib_math_is_close.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 
 submodule(stdlib_math) stdlib_math_is_close
 
diff --git a/src/stdlib_math_linspace.fypp b/src/stdlib_math_linspace.fypp
index b9e0983c2..802c5e80a 100644
--- a/src/stdlib_math_linspace.fypp
+++ b/src/stdlib_math_linspace.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 submodule (stdlib_math) stdlib_math_linspace
 
 implicit none
diff --git a/src/stdlib_math_logspace.fypp b/src/stdlib_math_logspace.fypp
index bdb559bfe..f43169177 100644
--- a/src/stdlib_math_logspace.fypp
+++ b/src/stdlib_math_logspace.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
 
 submodule (stdlib_math) stdlib_math_logspace
diff --git a/src/stdlib_optval.fypp b/src/stdlib_optval.fypp
index 633050dcd..f559e1d98 100644
--- a/src/stdlib_optval.fypp
+++ b/src/stdlib_optval.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 
 #:set KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES + CMPLX_KINDS_TYPES + &
   & [('l1','logical')]
diff --git a/src/stdlib_quadrature.fypp b/src/stdlib_quadrature.fypp
index c570891b4..af7bd2369 100644
--- a/src/stdlib_quadrature.fypp
+++ b/src/stdlib_quadrature.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 module stdlib_quadrature
     !! ([Specification](../page/specs/stdlib_quadrature.html#description))
     use stdlib_kinds, only: sp, dp, xdp, qp
diff --git a/src/stdlib_quadrature_simps.fypp b/src/stdlib_quadrature_simps.fypp
index 256508199..9d6ef8b05 100644
--- a/src/stdlib_quadrature_simps.fypp
+++ b/src/stdlib_quadrature_simps.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 
 submodule (stdlib_quadrature) stdlib_quadrature_simps
     use stdlib_error, only: check
diff --git a/src/stdlib_quadrature_trapz.fypp b/src/stdlib_quadrature_trapz.fypp
index aa878e387..3ffa019de 100644
--- a/src/stdlib_quadrature_trapz.fypp
+++ b/src/stdlib_quadrature_trapz.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 
 submodule (stdlib_quadrature) stdlib_quadrature_trapz
     use stdlib_error, only: check
diff --git a/src/stdlib_random.fypp b/src/stdlib_random.fypp
index 6bcf7a4f8..9a587c86b 100644
--- a/src/stdlib_random.fypp
+++ b/src/stdlib_random.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 module stdlib_random
     use stdlib_kinds, only: int8, int16, int32, int64
     use stdlib_optval, only: optval
diff --git a/src/stdlib_selection.fypp b/src/stdlib_selection.fypp
index ad4bc014e..089b489fa 100644
--- a/src/stdlib_selection.fypp
+++ b/src/stdlib_selection.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 ! Specify kinds/types for the input array in select and arg_select
 #:set ARRAY_KINDS_TYPES = INT_KINDS_TYPES + REAL_KINDS_TYPES
 ! The index arrays are of all INT_KINDS_TYPES
diff --git a/src/stdlib_sorting.fypp b/src/stdlib_sorting.fypp
index b5630659b..3ef5ca9ae 100644
--- a/src/stdlib_sorting.fypp
+++ b/src/stdlib_sorting.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 
 #:set INT_TYPES_ALT_NAME = list(zip(INT_TYPES, INT_TYPES, INT_KINDS))
 #:set REAL_TYPES_ALT_NAME = list(zip(REAL_TYPES, REAL_TYPES, REAL_KINDS))
diff --git a/src/stdlib_sorting_ord_sort.fypp b/src/stdlib_sorting_ord_sort.fypp
index 0e1e33472..a5d950447 100644
--- a/src/stdlib_sorting_ord_sort.fypp
+++ b/src/stdlib_sorting_ord_sort.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set INT_TYPES_ALT_NAME = list(zip(INT_TYPES, INT_TYPES, INT_TYPES, INT_KINDS))
 #:set REAL_TYPES_ALT_NAME = list(zip(REAL_TYPES, REAL_TYPES, REAL_TYPES, REAL_KINDS))
 #:set STRING_TYPES_ALT_NAME = list(zip(STRING_TYPES, STRING_TYPES, STRING_TYPES, STRING_KINDS))
diff --git a/src/stdlib_sorting_sort.fypp b/src/stdlib_sorting_sort.fypp
index 404ba76c8..ecc2c3154 100644
--- a/src/stdlib_sorting_sort.fypp
+++ b/src/stdlib_sorting_sort.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set INT_TYPES_ALT_NAME = list(zip(INT_TYPES, INT_TYPES, INT_KINDS))
 #:set REAL_TYPES_ALT_NAME = list(zip(REAL_TYPES, REAL_TYPES, REAL_KINDS))
 #:set STRING_TYPES_ALT_NAME = list(zip(STRING_TYPES, STRING_TYPES, STRING_KINDS))
diff --git a/src/stdlib_sorting_sort_index.fypp b/src/stdlib_sorting_sort_index.fypp
index 401f15039..b2a100d92 100644
--- a/src/stdlib_sorting_sort_index.fypp
+++ b/src/stdlib_sorting_sort_index.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set INT_TYPES_ALT_NAME = list(zip(INT_TYPES, INT_TYPES, INT_TYPES, INT_KINDS))
 #:set REAL_TYPES_ALT_NAME = list(zip(REAL_TYPES, REAL_TYPES, REAL_TYPES, REAL_KINDS))
 #:set STRING_TYPES_ALT_NAME = list(zip(STRING_TYPES, STRING_TYPES, STRING_TYPES, STRING_KINDS))
diff --git a/src/stdlib_specialfunctions_gamma.fypp b/src/stdlib_specialfunctions_gamma.fypp
index 23d0ad7b1..7129fddf4 100644
--- a/src/stdlib_specialfunctions_gamma.fypp
+++ b/src/stdlib_specialfunctions_gamma.fypp
@@ -1,6 +1,6 @@
 #:set WITH_QP = False
 #:set WITH_XDP = False
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set CI_KINDS_TYPES = INT_KINDS_TYPES + CMPLX_KINDS_TYPES
 module stdlib_specialfunctions_gamma
     use iso_fortran_env, only : qp => real128
diff --git a/src/stdlib_stats.fypp b/src/stdlib_stats.fypp
index 747037dd8..adf373f0a 100644
--- a/src/stdlib_stats.fypp
+++ b/src/stdlib_stats.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set RANKS = range(1, MAXRANK + 1)
 #:set REDRANKS = range(2, MAXRANK + 1)
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
diff --git a/src/stdlib_stats_corr.fypp b/src/stdlib_stats_corr.fypp
index c92d4ada1..bea4b802a 100644
--- a/src/stdlib_stats_corr.fypp
+++ b/src/stdlib_stats_corr.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
 submodule (stdlib_stats) stdlib_stats_corr
 
diff --git a/src/stdlib_stats_cov.fypp b/src/stdlib_stats_cov.fypp
index af606cca5..a4c473a11 100644
--- a/src/stdlib_stats_cov.fypp
+++ b/src/stdlib_stats_cov.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
 submodule (stdlib_stats) stdlib_stats_cov
 
diff --git a/src/stdlib_stats_distribution_exponential.fypp b/src/stdlib_stats_distribution_exponential.fypp
index 4e7a09207..01d4e8eb8 100644
--- a/src/stdlib_stats_distribution_exponential.fypp
+++ b/src/stdlib_stats_distribution_exponential.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
 module stdlib_stats_distribution_exponential
     use stdlib_kinds, only : sp, dp, xdp, qp, int32
diff --git a/src/stdlib_stats_distribution_normal.fypp b/src/stdlib_stats_distribution_normal.fypp
index 3abd9755e..de4f4b275 100644
--- a/src/stdlib_stats_distribution_normal.fypp
+++ b/src/stdlib_stats_distribution_normal.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
 module stdlib_stats_distribution_normal
     use stdlib_kinds, only : sp, dp, xdp, qp, int32
diff --git a/src/stdlib_stats_distribution_uniform.fypp b/src/stdlib_stats_distribution_uniform.fypp
index 8f1a553ab..1bf67a698 100644
--- a/src/stdlib_stats_distribution_uniform.fypp
+++ b/src/stdlib_stats_distribution_uniform.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
 #:set ALL_KINDS_TYPES = INT_KINDS_TYPES + RC_KINDS_TYPES
 module stdlib_stats_distribution_uniform
diff --git a/src/stdlib_stats_mean.fypp b/src/stdlib_stats_mean.fypp
index c7705dfdd..3e27d95ef 100644
--- a/src/stdlib_stats_mean.fypp
+++ b/src/stdlib_stats_mean.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set RANKS = range(1, MAXRANK + 1)
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
 submodule (stdlib_stats) stdlib_stats_mean
diff --git a/src/stdlib_stats_median.fypp b/src/stdlib_stats_median.fypp
index ec2c592b6..ef1e797ca 100644
--- a/src/stdlib_stats_median.fypp
+++ b/src/stdlib_stats_median.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set RANKS = range(1, MAXRANK + 1)
 #:set IR_KINDS_TYPES_OUTPUT = list(zip(INT_KINDS,INT_TYPES, ['dp']*len(INT_KINDS))) + list(zip(REAL_KINDS, REAL_TYPES, REAL_KINDS))
 
diff --git a/src/stdlib_stats_moment.fypp b/src/stdlib_stats_moment.fypp
index ed0e2b883..7283cc576 100644
--- a/src/stdlib_stats_moment.fypp
+++ b/src/stdlib_stats_moment.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set RANKS = range(1, MAXRANK + 1)
 #:set REDRANKS = range(2, MAXRANK + 1)
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
diff --git a/src/stdlib_stats_moment_all.fypp b/src/stdlib_stats_moment_all.fypp
index 543586caa..bc5ae00c7 100644
--- a/src/stdlib_stats_moment_all.fypp
+++ b/src/stdlib_stats_moment_all.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set RANKS = range(1, MAXRANK + 1)
 #:set REDRANKS = range(2, MAXRANK + 1)
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
diff --git a/src/stdlib_stats_moment_mask.fypp b/src/stdlib_stats_moment_mask.fypp
index 11e6de347..a56d4d1b3 100644
--- a/src/stdlib_stats_moment_mask.fypp
+++ b/src/stdlib_stats_moment_mask.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set RANKS = range(1, MAXRANK + 1)
 #:set REDRANKS = range(2, MAXRANK + 1)
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
diff --git a/src/stdlib_stats_moment_scalar.fypp b/src/stdlib_stats_moment_scalar.fypp
index 0b0f8a87c..137ff6d79 100644
--- a/src/stdlib_stats_moment_scalar.fypp
+++ b/src/stdlib_stats_moment_scalar.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set RANKS = range(1, MAXRANK + 1)
 #:set REDRANKS = range(2, MAXRANK + 1)
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
diff --git a/src/stdlib_stats_var.fypp b/src/stdlib_stats_var.fypp
index dbc0da557..31eaf243e 100644
--- a/src/stdlib_stats_var.fypp
+++ b/src/stdlib_stats_var.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set RANKS = range(1, MAXRANK + 1)
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
 submodule (stdlib_stats) stdlib_stats_var
diff --git a/src/stdlib_string_type.fypp b/src/stdlib_string_type.fypp
index bb5c2fcd0..0bb5ff8a2 100644
--- a/src/stdlib_string_type.fypp
+++ b/src/stdlib_string_type.fypp
@@ -1,5 +1,5 @@
 ! SPDX-Identifier: MIT
-#:include "../include/common.fypp"
+#:include "common.fypp"
 
 !> Implementation of a string type to hold an arbitrary sequence of characters.
 !>
diff --git a/src/stdlib_string_type_constructor.fypp b/src/stdlib_string_type_constructor.fypp
index 591701708..859eaf103 100644
--- a/src/stdlib_string_type_constructor.fypp
+++ b/src/stdlib_string_type_constructor.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 submodule(stdlib_string_type) stdlib_string_type_constructor
 
     use stdlib_strings, only: to_string
diff --git a/src/stdlib_strings.fypp b/src/stdlib_strings.fypp
index 4011f4aa2..367c08159 100644
--- a/src/stdlib_strings.fypp
+++ b/src/stdlib_strings.fypp
@@ -1,5 +1,5 @@
 ! SPDX-Identifier: MIT
-#:include "../include/common.fypp"
+#:include "common.fypp"
 !> This module implements basic string handling routines.
 !>
 !> The specification of this module is available [here](../page/specs/stdlib_strings.html).
diff --git a/src/stdlib_strings_to_string.fypp b/src/stdlib_strings_to_string.fypp
index daa754504..c9a6bcd99 100644
--- a/src/stdlib_strings_to_string.fypp
+++ b/src/stdlib_strings_to_string.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 submodule(stdlib_strings) stdlib_strings_to_string
 
     integer, parameter :: buffer_len = 128
diff --git a/src/stdlib_version.fypp b/src/stdlib_version.fypp
index dbb8dd008..5be172cdc 100644
--- a/src/stdlib_version.fypp
+++ b/src/stdlib_version.fypp
@@ -1,6 +1,6 @@
 ! SPDX-Identifier: MIT
 
-#:include "../include/common.fypp"
+#:include "common.fypp"
 
 !> Version information on stdlib
 module stdlib_version
diff --git a/test/io/test_loadtxt_qp.fypp b/test/io/test_loadtxt_qp.fypp
index 3bd26a22b..fc041a60a 100644
--- a/test/io/test_loadtxt_qp.fypp
+++ b/test/io/test_loadtxt_qp.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 
 module test_loadtxt_qp
     use stdlib_kinds, only: qp
diff --git a/test/io/test_savetxt_qp.fypp b/test/io/test_savetxt_qp.fypp
index fcfefe1bd..237d8e806 100644
--- a/test/io/test_savetxt_qp.fypp
+++ b/test/io/test_savetxt_qp.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 
 module test_savetxt_qp
     use stdlib_kinds, only: qp
diff --git a/test/linalg/test_linalg.fypp b/test/linalg/test_linalg.fypp
index 1aba7c342..f74cbff6b 100644
--- a/test/linalg/test_linalg.fypp
+++ b/test/linalg/test_linalg.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 
 module test_linalg
     use testdrive, only : new_unittest, unittest_type, error_type, check, skip_test
diff --git a/test/linalg/test_linalg_matrix_property_checks.fypp b/test/linalg/test_linalg_matrix_property_checks.fypp
index aac32a1cc..b2e8b2116 100644
--- a/test/linalg/test_linalg_matrix_property_checks.fypp
+++ b/test/linalg/test_linalg_matrix_property_checks.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set RCI_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES + INT_KINDS_TYPES
 
 module test_linalg_matrix_property_checks
diff --git a/test/math/test_stdlib_math.fypp b/test/math/test_stdlib_math.fypp
index 3907b3e0e..9b02f5fbe 100644
--- a/test/math/test_stdlib_math.fypp
+++ b/test/math/test_stdlib_math.fypp
@@ -1,6 +1,6 @@
 ! SPDX-Identifier: MIT
 
-#:include "../include/common.fypp"
+#:include "common.fypp"
 
 module test_stdlib_math
     use testdrive, only : new_unittest, unittest_type, error_type, check, skip_test
diff --git a/test/optval/test_optval.fypp b/test/optval/test_optval.fypp
index 6d651d7f6..062e04c6d 100644
--- a/test/optval/test_optval.fypp
+++ b/test/optval/test_optval.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 
 module test_optval
     use, intrinsic :: iso_fortran_env, only: &
diff --git a/test/quadrature/test_simps.fypp b/test/quadrature/test_simps.fypp
index 40b940cf3..26814c1c1 100644
--- a/test/quadrature/test_simps.fypp
+++ b/test/quadrature/test_simps.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 
 module test_simps
     use stdlib_kinds, only: sp, dp, xdp, qp
diff --git a/test/quadrature/test_trapz.fypp b/test/quadrature/test_trapz.fypp
index e55bf0f98..621323746 100644
--- a/test/quadrature/test_trapz.fypp
+++ b/test/quadrature/test_trapz.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 
 module test_trapz
     use stdlib_kinds, only: sp, dp, xdp, qp
diff --git a/test/selection/test_selection.fypp b/test/selection/test_selection.fypp
index 1ef4c09b2..5c3932386 100644
--- a/test/selection/test_selection.fypp
+++ b/test/selection/test_selection.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 ! Specify kinds/types for the input array in select and arg_select
 #:set ARRAY_KINDS_TYPES = INT_KINDS_TYPES + REAL_KINDS_TYPES
 ! The index arrays are of all INT_KINDS_TYPES
diff --git a/test/specialfunctions/test_specialfunctions_gamma.fypp b/test/specialfunctions/test_specialfunctions_gamma.fypp
index 0c7bdc78b..26421bded 100644
--- a/test/specialfunctions/test_specialfunctions_gamma.fypp
+++ b/test/specialfunctions/test_specialfunctions_gamma.fypp
@@ -1,6 +1,6 @@
 #:set WITH_QP = False
 #:set WITH_XDP = False
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set CI_KINDS_TYPES = INT_KINDS_TYPES + CMPLX_KINDS_TYPES
 module test_specialfunctions_gamma
     use testdrive, only : new_unittest, unittest_type, error_type, check
diff --git a/test/stats/test_distribution_exponential.fypp b/test/stats/test_distribution_exponential.fypp
index 5d2d10257..95dc998c1 100644
--- a/test/stats/test_distribution_exponential.fypp
+++ b/test/stats/test_distribution_exponential.fypp
@@ -1,5 +1,5 @@
 
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
 program test_distribution_expon
     use stdlib_kinds, only : sp, dp, xdp, qp
diff --git a/test/stats/test_distribution_normal.fypp b/test/stats/test_distribution_normal.fypp
index fc358f455..72e2746a4 100644
--- a/test/stats/test_distribution_normal.fypp
+++ b/test/stats/test_distribution_normal.fypp
@@ -1,5 +1,5 @@
 
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
 program test_distribution_normal
     use stdlib_kinds, only : sp, dp, xdp, qp
diff --git a/test/stats/test_distribution_uniform.fypp b/test/stats/test_distribution_uniform.fypp
index 579bf0066..4975d9003 100644
--- a/test/stats/test_distribution_uniform.fypp
+++ b/test/stats/test_distribution_uniform.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set ALL_KINDS_TYPES = INT_KINDS_TYPES + REAL_KINDS_TYPES + CMPLX_KINDS_TYPES
 program test_distribution_uniform
     use stdlib_error, only : check
diff --git a/test/stats/test_mean.fypp b/test/stats/test_mean.fypp
index 4f0f9d6d3..ffa40bb05 100644
--- a/test/stats/test_mean.fypp
+++ b/test/stats/test_mean.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set IR_KINDS_TYPES = INT_KINDS_TYPES + REAL_KINDS_TYPES
 
 #:set NRANK = 4
diff --git a/test/stats/test_mean_f03.fypp b/test/stats/test_mean_f03.fypp
index e5e72ad7a..0919572b8 100644
--- a/test/stats/test_mean_f03.fypp
+++ b/test/stats/test_mean_f03.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set IR_KINDS_TYPES = INT_KINDS_TYPES + REAL_KINDS_TYPES
 
 #:set NRANK = 4
diff --git a/test/stats/test_median.fypp b/test/stats/test_median.fypp
index b8e86904e..22d19785d 100644
--- a/test/stats/test_median.fypp
+++ b/test/stats/test_median.fypp
@@ -1,4 +1,4 @@
-#:include "../include/common.fypp"
+#:include "common.fypp"
 #:set IR_KINDS_TYPES = INT_KINDS_TYPES + REAL_KINDS_TYPES
 
 #:set NRANK = 3

From cdebc2041771fad6fc97dea549941388280797cb Mon Sep 17 00:00:00 2001
From: arteevraina <arteevraina@gmail.com>
Date: Sun, 11 Sep 2022 01:33:34 +0530
Subject: [PATCH 15/17] fix: fyflags by appending include directory

---
 ci/fpm-deployment.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ci/fpm-deployment.sh b/ci/fpm-deployment.sh
index 1e0f6c65d..a89ac41a4 100755
--- a/ci/fpm-deployment.sh
+++ b/ci/fpm-deployment.sh
@@ -34,7 +34,7 @@ prune=(
 major=$(cut -d. -f1 VERSION)
 minor=$(cut -d. -f2 VERSION)
 patch=$(cut -d. -f3 VERSION)
-fyflags="${fyflags} -DPROJECT_VERSION_MAJOR=${major} -DPROJECT_VERSION_MINOR=${minor} -DPROJECT_VERSION_PATCH=${patch}"
+fyflags="${fyflags} -DPROJECT_VERSION_MAJOR=${major} -DPROJECT_VERSION_MINOR=${minor} -DPROJECT_VERSION_PATCH=${patch} -I include"
 
 mkdir -p "$destdir/src" "$destdir/test" "$destdir/example"
 

From 2b63915d69d31398b9331665c84132417ed348ed Mon Sep 17 00:00:00 2001
From: arteevraina <arteevraina@gmail.com>
Date: Sat, 24 Sep 2022 11:03:06 +0530
Subject: [PATCH 16/17] docs: added include directory in documentation markdown

---
 API-doc-FORD-file.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/API-doc-FORD-file.md b/API-doc-FORD-file.md
index 0db3e0a21..8aa447b3a 100644
--- a/API-doc-FORD-file.md
+++ b/API-doc-FORD-file.md
@@ -3,6 +3,7 @@ project: Fortran-lang/stdlib
 summary: A community driven standard library for (modern) Fortran
 src_dir: src
 include: src
+         include
 exclude_dir: src/tests
 output_dir: API-doc
 page_dir: doc

From 7c99e70ad51a80876a28a6dd21035d6cbc413abe Mon Sep 17 00:00:00 2001
From: arteevraina <arteevraina@gmail.com>
Date: Sat, 24 Sep 2022 11:37:41 +0530
Subject: [PATCH 17/17] docs: added documentation regarding building with fypp
 script

---
 README.md | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/README.md b/README.md
index a70d9f18f..46c04fff9 100644
--- a/README.md
+++ b/README.md
@@ -199,6 +199,21 @@ To use `stdlib` within your `fpm` project, add the following lines to your `fpm.
 stdlib = { git="https://github.com/fortran-lang/stdlib", branch="stdlib-fpm" }
 ```
 
+### Build with [fypp-script](https://github.com/fortran-lang/fpm/pull/729)
+
+Fortran Package Manager has a compiler wrapper `fypp-script` that can be used to compile stdlib without 
+switching to `stdlib-fpm` branch.
+
+```sh
+git clone https://github.com/fortran-lang/fpm.git
+```
+
+```
+fpm run -- build --compiler "$PWD/fypp-gfortran.py" -C stdlib
+```
+
+**Note** : At this stage, building using `stdlib-fpm` branch should be the preferred way of using `stdlib` with `fpm`.
+
 ## Using stdlib in your project
 
 The stdlib project exports CMake package files and pkg-config files to make stdlib usable for other projects.