update_gitrevision.sh should be run before building on Mac or Linux.
--- /dev/null
+#!/bin/bash
+#
+# Clear the Git commit SHA in the include file.
+# This should be run before checking in code to Git.
+#
+revision_filename=src/common/pa_gitrevision.h
+
+# Update the include file with the current GIT revision.
+echo "#define PA_GIT_REVISION unknown" > ${revision_filename}
+
+echo ${revision_filename} now contains
+cat ${revision_filename}
+++ /dev/null
-#!/bin/bash
-#
-# Clear the SVN revision in the include file.
-# This should be run before checking in code to SVN.
-#
-revision_filename=src/common/pa_svnrevision.h
-
-# Update the include file with the current SVN revision.
-echo "#define PA_SVN_REVISION unknown" > ${revision_filename}
-
-echo ${revision_filename} now contains
-cat ${revision_filename}
paTestData data;
int i;
-
+
printf("PortAudio Test: output sine wave. SR = %d, BufSize = %d\n", SAMPLE_RATE, FRAMES_PER_BUFFER);
+ printf("%s\n", Pa_GetVersionText());
/* initialise sinusoidal wavetable */
for( i=0; i<TABLE_SIZE; i++ )
#include "pa_trace.h" /* still usefull?*/
#include "pa_debugprint.h"
-#ifndef PA_SVN_REVISION
-#include "pa_svnrevision.h"
+#ifndef PA_GIT_REVISION
+#include "pa_gitrevision.h"
#endif
/**
#define TOSTRING(x) STRINGIFY(x)
#define PA_VERSION_STRING_ TOSTRING(paVersionMajor) "." TOSTRING(paVersionMinor) "." TOSTRING(paVersionSubMinor)
-#define PA_VERSION_TEXT_ "PortAudio V" PA_VERSION_STRING_ "-devel, revision " TOSTRING(PA_SVN_REVISION)
+#define PA_VERSION_TEXT_ "PortAudio V" PA_VERSION_STRING_ "-devel, revision " TOSTRING(PA_GIT_REVISION)
int Pa_GetVersion( void )
{
/*.versionMajor =*/ paVersionMajor,
/*.versionMinor =*/ paVersionMinor,
/*.versionSubMinor =*/ paVersionSubMinor,
- /*.versionControlRevision =*/ TOSTRING(PA_SVN_REVISION),
+ /*.versionControlRevision =*/ TOSTRING(PA_GIT_REVISION),
/*.versionText =*/ PA_VERSION_TEXT_
};
--- /dev/null
+#define PA_GIT_REVISION unknown
+++ /dev/null
-#define PA_SVN_REVISION unknown
--- /dev/null
+#!/bin/bash
+#
+# Write the Git commit SHA to an include file.
+# This should be run before compiling code on Linux or Macintosh.
+#
+revision_filename=src/common/pa_gitrevision.h
+
+# Run git first to make sure it is installed before corrupting the
+# include file.
+git rev-parse HEAD
+
+# Update the include file with the current Git revision.
+echo -n "#define PA_GIT_REVISION " > ${revision_filename}
+git rev-parse HEAD >> ${revision_filename}
+
+echo ${revision_filename} now contains
+cat ${revision_filename}
+++ /dev/null
-#!/bin/bash
-#
-# Write the SVN revision to an include file.
-# This should be run before compiling code on Linux or Macintosh.
-#
-revision_filename=src/common/pa_svnrevision.h
-
-# Run svnversion first to make sure it is installed before corrupting the
-# include file.
-svnversion .
-
-# Update the include file with the current SVN revision.
-echo -n "#define PA_SVN_REVISION " > ${revision_filename}
-svnversion . >> ${revision_filename}
-
-echo ${revision_filename} now contains
-cat ${revision_filename}