cake
/
libg1m
Archived
1
0
Fork 0

Modified gestion of project variables

This commit is contained in:
Thomas Touhey 2016-12-31 11:37:13 +01:00
parent 63c5f29818
commit 446e256606
6 changed files with 20 additions and 30 deletions

View File

@ -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")

View File

@ -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

9
configure vendored
View File

@ -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 <<EOF
${name} configure script v${version}
Hand-written by ${author_name}.
Hand-written by Thomas "Cakeisalie5" Touhey.
This configure script is free software.
There is NO warranty; not even for MERCHANTABILITY or

View File

@ -33,7 +33,7 @@
*/
static const char version_message[] =
"libg1m v" QUOTE(VERSION) " (licensed under " QUOTE(LICENSE) ")\n"
"libg1m v" QUOTE(VERSION) " (licensed under GPLv2)\n"
"Made by " QUOTE(AUTHOR) " <" QUOTE(AUTHOR_MAIL) ">.\n"
"\n"
"Compiled with the '" LLS "' loglevel.\n"

View File

@ -3,12 +3,11 @@
# Defaults #
#******************************************************************************#
# Project variables
name="libg1m"
name="useless"
version="<unknown version>"
# Author
author_name="Unknown name"
author_mail="unknown@mail"
# Maintainer
maintainer="Unknown <mail@world>"
# 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 <<EOF
Usage: \$cfgtool [--help] [--version] [--cflags] [--libs]
Report bugs to ${author_name} <${author_mail}>.
Report bugs to ${maintainer}.
EOF
exit 0
}
@ -49,7 +47,7 @@ exit 0
version() {
cat <<EOF
${name} configuration tool v${version}
Written by ${author_name}.
Written by Thomas "Cakeisalie5" Touhey.
This configuration tool is public domain.
EOF

View File

@ -3,7 +3,7 @@
# Defaults #
#******************************************************************************#
# Project variables
name="name"
name="useless"
description="my description"
version="<unknown version>"