From 446e256606c4133c810938b143d4973a9a18b572 Mon Sep 17 00:00:00 2001 From: "Thomas \"Cakeisalie5\" Touhey" Date: Sat, 31 Dec 2016 11:37:13 +0100 Subject: [PATCH] Modified gestion of project variables --- Makefile | 14 +++++--------- Makefile.vars | 9 +++------ configure | 9 ++++----- src/core/version.c | 2 +- tools/write-config | 14 ++++++-------- tools/write-pkg-config | 2 +- 6 files changed, 20 insertions(+), 30 deletions(-) diff --git a/Makefile b/Makefile index d76c01b..77cadd9 100755 --- a/Makefile +++ b/Makefile @@ -70,19 +70,15 @@ dist: mrproper getname: @echo lib$(NAME) -# Get the project author. - getauthor: - @echo $(AUTHOR) - -# Get the project author email. - getmail: - @echo $(AUTHOR_MAIL) +# Get the project maintainer. + getmaintainer: + @echo "$(MAINTAINER_NAME) <$(MAINTAINER_MAIL)>" # Get the project version. getversion: @echo $(VERSION) -.PHONY: getname getauthor getmail getversion +.PHONY: getname getmaintainer getversion #******************************************************************************# # Library-specific targets # #******************************************************************************# @@ -159,7 +155,7 @@ $(eval $(call make-moduleobj-rule,$(mod)))) $(call qcmd,$(INST) -m 755 -d "$(IBINDIR)") $(call qcmd,tools/write-config \ --name=lib$(NAME) --version=$(VERSION) \ - --author-name="$(AUTHOR)" --author-mail="$(AUTHOR_MAIL)" \ + --maintainer="$(MAINTAINER_NAME) <$(MAINTAINER_MAIL)>" \ --incdir="$(OIINCDIR)" --libdir="$(OILIBDIR)" \ >"$(IBINDIR)/lib$(NAME)-config" \ && chmod 755 "$(IBINDIR)/lib$(NAME)-config") diff --git a/Makefile.vars b/Makefile.vars index 9e4c41d..8f9e188 100755 --- a/Makefile.vars +++ b/Makefile.vars @@ -18,12 +18,9 @@ NAME := g1m DESCRIPTION := Library for reading and writing CASIO files -# Author information - AUTHOR := Thomas \"Cakeisalie5\" Touhey - AUTHOR_MAIL := thomas@touhey.fr - -# Project license - LICENSE := GPLv2 +# Maintainer information + MAINTAINER_NAME := Thomas \"Cakeisalie5\" Touhey + MAINTAINER_MAIL := thomas@touhey.fr # Project version MAJOR := 0 diff --git a/configure b/configure index b4125ad..72435e9 100755 --- a/configure +++ b/configure @@ -7,9 +7,8 @@ cd "$(dirname $0)" name="$(make -s getname)" version="$(make -s getversion)" -# Author -author_name="$(make -s getauthor)" -author="$author_name <$(make -s getmail)>" +# Maintainer +maintainer="$(make -s getmaintainer)" # Target target="" @@ -72,7 +71,7 @@ Fine tuning of the installation directories: --includedir=DIR include files for the compiler [$includedir] --mandir=DIR man root [$mandir] -Report bugs to ${author}. +Report bugs to ${maintainer}. EOF exit 0 } @@ -83,7 +82,7 @@ exit 0 version() { cat <.\n" "\n" "Compiled with the '" LLS "' loglevel.\n" diff --git a/tools/write-config b/tools/write-config index 108ed2f..ed75f2a 100755 --- a/tools/write-config +++ b/tools/write-config @@ -3,12 +3,11 @@ # Defaults # #******************************************************************************# # Project variables -name="libg1m" +name="useless" version="" -# Author -author_name="Unknown name" -author_mail="unknown@mail" +# Maintainer +maintainer="Unknown " # Directories libdir='' @@ -20,8 +19,7 @@ incdir='' for arg ; do case "$arg" in --name=*) name="${arg#*=}" ;; --version=*) version="${arg#*=}" ;; ---author-name=*) author_name="${arg#*=}" ;; ---author-mail=*) author_mail="${arg#*=}" ;; +--maintainer=*) maintainer="${arg#*=}" ;; --libdir=*) libdir="${arg#*=}" ;; --incdir=*) incdir="${arg#*=}" ;; esac; done @@ -38,7 +36,7 @@ cfgtool=\$(basename \$0) usage() { cat <. +Report bugs to ${maintainer}. EOF exit 0 } @@ -49,7 +47,7 @@ exit 0 version() { cat <