diff --git a/Makefile b/Makefile index 7e9bbc6..c69277d 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ ALR_BUILD = alr build --development --profiles="*=development" build: cd json && $(ALR_BUILD) + cd tools && $(ALR_BUILD) clean: -gnatprove --clean -P json/json.gpr diff --git a/json/alire.toml b/json/alire.toml index f97ce4f..c169061 100644 --- a/json/alire.toml +++ b/json/alire.toml @@ -5,9 +5,6 @@ website = "https://github.com/onox/json-ada" licenses = "Apache-2.0" tags = ["json"] -#executables = ["pretty_print"] -#project-files = ["json.gpr", "json_pretty_print.gpr"] - project-files = ["json.gpr"] authors = ["onox"] diff --git a/json/json_pretty_print.gpr b/json/json_pretty_print.gpr deleted file mode 100644 index 203acc2..0000000 --- a/json/json_pretty_print.gpr +++ /dev/null @@ -1,19 +0,0 @@ -with "json"; -with "config/json_config"; - -project JSON_Pretty_Print is - - for Create_Missing_Dirs use "True"; - - for Source_Dirs use ("src/tools"); - for Object_Dir use "build/tools/obj/" & Json_Config.Build_Profile; - for Library_Dir use "build/tools/lib"; - - for Exec_Dir use "build/bin"; - - for Main use ("pretty_print.adb"); - - package Compiler renames JSON.Compiler; - package Binder renames JSON.Binder; - -end JSON_Pretty_Print; diff --git a/tools/alire.toml b/tools/alire.toml new file mode 100644 index 0000000..248f3f3 --- /dev/null +++ b/tools/alire.toml @@ -0,0 +1,23 @@ +name = "json_tools" +description = "Tools for json-ada" +version = "5.0.3" +website = "https://github.com/onox/json-ada" +licenses = "Apache-2.0" +tags = ["json"] + +executables = ["pretty_print"] +project-files = ["json_tools.gpr"] + +authors = ["onox"] +maintainers = ["onox "] +maintainers-logins = ["onox"] + +[[depends-on]] +json = "^5.0.3" + +[[pins]] +json = { path = "../json" } + +[build-switches] +validation.compile_checks = "warnings" +"*".style_checks = ["-gnatygAOM120-Is"] diff --git a/tools/gnat.adc b/tools/gnat.adc new file mode 100644 index 0000000..c20bff2 --- /dev/null +++ b/tools/gnat.adc @@ -0,0 +1,2 @@ +pragma Restrictions (No_Obsolescent_Features); +pragma Profile (No_Implementation_Extensions); diff --git a/tools/json_tools.gpr b/tools/json_tools.gpr new file mode 100644 index 0000000..1de9eb3 --- /dev/null +++ b/tools/json_tools.gpr @@ -0,0 +1,34 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- +-- Copyright (c) 2016 onox +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + +with "json"; +with "config/json_tools_config"; + +project JSON_Tools is + + for Create_Missing_Dirs use "True"; + + for Source_Dirs use ("src"); + for Object_Dir use "build/obj/" & JSON_Tools_Config.Build_Profile; + + for Exec_Dir use "build/bin"; + + for Main use ("pretty_print.adb"); + + package Compiler renames JSON.Compiler; + package Binder renames JSON.Binder; + +end JSON_Tools; diff --git a/json/src/tools/pretty_print.adb b/tools/src/pretty_print.adb similarity index 100% rename from json/src/tools/pretty_print.adb rename to tools/src/pretty_print.adb