* PATCH: Sense if git should be used (for tarball) and if typeof needs, to be __typeof__
@ 2015-11-19 18:38 Richard PALO
0 siblings, 0 replies; 3+ messages in thread
From: Richard PALO @ 2015-11-19 18:38 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Attachment #1: Type: text/plain, Size: 580 bytes --]
I'd like to submit the attached patch to configure.ac fixing two issues:
1. Packaging systems such as pkgsrc use source tarballs not git, so configure
could try to see if it's really in a git repository else use ChangeLog
to determine the driver date to use.
NB 'git log' should probably already be 'git log -1'
2. When using strict ISO C compilers, such as if using -std=c99 instead of
for example -std=gnu99, typeof is not a valid keyword and __typeof__ should
be used. Use AC_C_TYPEOF to automatically define a macro if necessary.
cheers
--
Richard PALO
[-- Attachment #2: 0001-Sense-if-git-should-be-used-for-tarball-and-if-typeo.patch --]
[-- Type: text/x-patch, Size: 1440 bytes --]
From e52880d8175fafac61bb45ff0274d47d39715f50 Mon Sep 17 00:00:00 2001
From: Richard PALO <richard-qavaossjCcEdnm+yROfE0A@public.gmane.org>
Date: Thu, 19 Nov 2015 19:17:38 +0100
Subject: [PATCH] Sense if git should be used (for tarball) and if typeof needs
to be __typeof__
Use `git log` only if not in a source tarball where ChangeLog is already
generated and git may not be present.
Check to see if __typeof__ needs to be used instead of typeof, which is
the case if strict ISO c is used (such as -std=c99)
Signed-off-by: Richard PALO <richard-qavaossjCcEdnm+yROfE0A@public.gmane.org>
---
configure.ac | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 9c77f94..71482ec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,7 +36,7 @@ AC_DEFINE_UNQUOTED([NV_PATCHLEVEL],
[$(echo $PACKAGE_VERSION | sed -e 's/^[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)/\1/')],
[Patch version])
AC_DEFINE_UNQUOTED([NV_DRIVER_DATE],
- [$(echo -n \";git log |head -3|tail -1|tr -d '\n';echo -n \")],
+ [$(printf \"; if test -d .git; then git log; else cat ChangeLog; fi |head -3|tail -1|tr -d '\n'; printf \")],
[Driver date])
AC_CONFIG_SRCDIR([Makefile.am])
@@ -105,6 +105,7 @@ AC_SUBST([LIBUDEV_LIBS])
# Checks for header files.
AC_HEADER_STDC
+AC_C_TYPEOF
# Use -Wall all the time
CFLAGS="$CFLAGS -Wall"
--
2.6.3
[-- Attachment #3: Type: text/plain, Size: 153 bytes --]
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply related [flat|nested] 3+ messages in thread
* PATCH: Sense if git should be used (for tarball) and if typeof needs to be __typeof__
@ 2015-11-19 20:57 Richard PALO
0 siblings, 0 replies; 3+ messages in thread
From: Richard PALO @ 2015-11-19 20:57 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Attachment #1: Type: text/plain, Size: 581 bytes --]
I'd like to submit the attached patch to configure.ac fixing two issues:
1. Packaging systems such as pkgsrc use source tarballs not git, so configure
could try to see if it's really in a git repository else use ChangeLog
to determine the driver date to use.
NB 'git log' should probably already be 'git log -1'
2. When using strict ISO C compilers, such as if using -std=c99 instead of
for example -std=gnu99, typeof is not a valid keyword and __typeof__ should
be used. Use AC_C_TYPEOF to automatically define a macro if necessary.
cheers
--
Richard PALO
[-- Attachment #2: 0001-Sense-if-git-should-be-used-for-tarball-and-if-typeo.patch --]
[-- Type: text/x-patch, Size: 1441 bytes --]
From e52880d8175fafac61bb45ff0274d47d39715f50 Mon Sep 17 00:00:00 2001
From: Richard PALO <richard-qavaossjCcEdnm+yROfE0A@public.gmane.org>
Date: Thu, 19 Nov 2015 19:17:38 +0100
Subject: [PATCH] Sense if git should be used (for tarball) and if typeof needs
to be __typeof__
Use `git log` only if not in a source tarball where ChangeLog is already
generated and git may not be present.
Check to see if __typeof__ needs to be used instead of typeof, which is
the case if strict ISO c is used (such as -std=c99)
Signed-off-by: Richard PALO <richard-qavaossjCcEdnm+yROfE0A@public.gmane.org>
---
configure.ac | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 9c77f94..71482ec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,7 +36,7 @@ AC_DEFINE_UNQUOTED([NV_PATCHLEVEL],
[$(echo $PACKAGE_VERSION | sed -e 's/^[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)/\1/')],
[Patch version])
AC_DEFINE_UNQUOTED([NV_DRIVER_DATE],
- [$(echo -n \";git log |head -3|tail -1|tr -d '\n';echo -n \")],
+ [$(printf \"; if test -d .git; then git log; else cat ChangeLog; fi |head -3|tail -1|tr -d '\n'; printf \")],
[Driver date])
AC_CONFIG_SRCDIR([Makefile.am])
@@ -105,6 +105,7 @@ AC_SUBST([LIBUDEV_LIBS])
# Checks for header files.
AC_HEADER_STDC
+AC_C_TYPEOF
# Use -Wall all the time
CFLAGS="$CFLAGS -Wall"
--
2.6.3
[-- Attachment #3: Type: text/plain, Size: 153 bytes --]
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply related [flat|nested] 3+ messages in thread
* PATCH: Sense if git should be used (for tarball) and if typeof needs to be __typeof__
@ 2015-11-19 20:58 Richard PALO
0 siblings, 0 replies; 3+ messages in thread
From: Richard PALO @ 2015-11-19 20:58 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Attachment #1: Type: text/plain, Size: 580 bytes --]
I'd like to submit the attached patch to configure.ac fixing two issues:
1. Packaging systems such as pkgsrc use source tarballs not git, so configure
could try to see if it's really in a git repository else use ChangeLog
to determine the driver date to use.
NB 'git log' should probably already be 'git log -1'
2. When using strict ISO C compilers, such as if using -std=c99 instead of
for example -std=gnu99, typeof is not a valid keyword and __typeof__ should
be used. Use AC_C_TYPEOF to automatically define a macro if necessary.
cheers
--
Richard PALO
[-- Attachment #2: 0001-Sense-if-git-should-be-used-for-tarball-and-if-typeo.patch --]
[-- Type: text/x-patch, Size: 1442 bytes --]
From e52880d8175fafac61bb45ff0274d47d39715f50 Mon Sep 17 00:00:00 2001
From: Richard PALO <richard-qavaossjCcEdnm+yROfE0A@public.gmane.org>
Date: Thu, 19 Nov 2015 19:17:38 +0100
Subject: [PATCH] Sense if git should be used (for tarball) and if typeof needs
to be __typeof__
Use `git log` only if not in a source tarball where ChangeLog is already
generated and git may not be present.
Check to see if __typeof__ needs to be used instead of typeof, which is
the case if strict ISO c is used (such as -std=c99)
Signed-off-by: Richard PALO <richard-qavaossjCcEdnm+yROfE0A@public.gmane.org>
---
configure.ac | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 9c77f94..71482ec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,7 +36,7 @@ AC_DEFINE_UNQUOTED([NV_PATCHLEVEL],
[$(echo $PACKAGE_VERSION | sed -e 's/^[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)/\1/')],
[Patch version])
AC_DEFINE_UNQUOTED([NV_DRIVER_DATE],
- [$(echo -n \";git log |head -3|tail -1|tr -d '\n';echo -n \")],
+ [$(printf \"; if test -d .git; then git log; else cat ChangeLog; fi |head -3|tail -1|tr -d '\n'; printf \")],
[Driver date])
AC_CONFIG_SRCDIR([Makefile.am])
@@ -105,6 +105,7 @@ AC_SUBST([LIBUDEV_LIBS])
# Checks for header files.
AC_HEADER_STDC
+AC_C_TYPEOF
# Use -Wall all the time
CFLAGS="$CFLAGS -Wall"
--
2.6.3
[-- Attachment #3: Type: text/plain, Size: 153 bytes --]
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-11-19 20:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-19 20:57 PATCH: Sense if git should be used (for tarball) and if typeof needs to be __typeof__ Richard PALO
-- strict thread matches above, loose matches on Subject: below --
2015-11-19 20:58 Richard PALO
2015-11-19 18:38 PATCH: Sense if git should be used (for tarball) and if typeof needs, " Richard PALO
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.