From bb05d66329f94a18a936cbf7fbf2adab8c3dc33c Mon Sep 17 00:00:00 2001 From: Abou Al Montacir Date: Tue, 9 May 2023 20:45:48 +0200 Subject: [PATCH] Renamed executable from gir2pascal to gir2pas. --- tools/gir2pascal/.gitignore | 2 +- tools/gir2pascal/Makefile | 31 +++++++++++++++++++++++++------ tools/gir2pascal/README.md | 12 +++++------- tools/gir2pascal/gir2pascal.lpi | 2 +- 4 files changed, 32 insertions(+), 15 deletions(-) diff --git a/tools/gir2pascal/.gitignore b/tools/gir2pascal/.gitignore index d422b6f1c2..f1256ad73d 100644 --- a/tools/gir2pascal/.gitignore +++ b/tools/gir2pascal/.gitignore @@ -1 +1 @@ -/gir2pascal +/gir2pas diff --git a/tools/gir2pascal/Makefile b/tools/gir2pascal/Makefile index bc86bfe82d..385fbd1a51 100644 --- a/tools/gir2pascal/Makefile +++ b/tools/gir2pascal/Makefile @@ -1,9 +1,28 @@ -SOURCES := $(wildcard *.pas) -OPTIONS := -O2 -OBJ := *.o *.or *.ppu *.rsj +SOURCES=$(wildcard *.pas) +TARGET_CPU=$(shell fpc -iTP) +TARGET_OS=$(shell fpc -iTO) +UNITS_DIR=lib/tools/gir2pascal/${TARGET_CPU}-${TARGET_OS} +OPTIONS=\ + -MObjFPC\ + -Scghi\ + -Cg\ + -O1\ + -gw2\ + -godwarfsets\ + -gl\ + -l\ + -vewnhibq\ + -Fi${UNITS_DIR}\ + -Fu${UNITS_DIR}\ + -FU${UNITS_DIR}\ + -FE.\ -gir2pascal: gir2pascal.lpr $(SOURCES) - fpc $(OPTIONS) $< +OBJ=*.o *.or *.ppu *.rsj + +gir2pas:gir2pascal.lpr $(SOURCES) + fpc $(OPTIONS) $< -o$@ clean: - rm -f gir2pascal $(OBJ) + ${RM} gir2pas ${UNITS_DIR} $(OBJ) + +.PHONY: clean diff --git a/tools/gir2pascal/README.md b/tools/gir2pascal/README.md index 642ee01e97..beae07e98f 100644 --- a/tools/gir2pascal/README.md +++ b/tools/gir2pascal/README.md @@ -1,17 +1,15 @@ -gir2pascal -========== +# gir2pas -This is the [gir2pascal][] utility, a program to convert the +The [gir2pas][] utility is a program to convert the GIR metadata format (= XML files) used by [GObject introspection][] into usable Pascal source code, suitable for generating corresponding language bindings. -The original is part of the Lazarus Code and Component Repository ([lazarus-ccr][], +It was originaly named [gir2pascal] maintained as part of the Lazarus Code and Component Repository ([lazarus-ccr][], [wiki article][wiki-ccr]), see `applications/gobject-introspection/`. Later it has received some maintenance by [n1tehawk][] and finally was imported from his repository into Lazarus source tree. -License -------- +# License This project builds upon the original Lazarus CCR version and is thus intended to follow the same licensing principles. For the `gobject-introspection` folder @@ -22,4 +20,4 @@ this seems to be [GPL v2](LICENSE.md), as referenced in a number of file headers [GObject introspection]: https://gi.readthedocs.io/ [lazarus-ccr]: https://sourceforge.net/projects/lazarus-ccr/ [wiki-ccr]: https://wiki.lazarus.freepascal.org/Lazarus-ccr_SourceForge_repository -[n1tehawk]: https://github.com/n1tehawk/gir2pascal \ No newline at end of file +[n1tehawk]: https://github.com/n1tehawk/gir2pascal diff --git a/tools/gir2pascal/gir2pascal.lpi b/tools/gir2pascal/gir2pascal.lpi index 9da34d667a..30f4f0ccd5 100644 --- a/tools/gir2pascal/gir2pascal.lpi +++ b/tools/gir2pascal/gir2pascal.lpi @@ -85,7 +85,7 @@ - +