diff options
| -rw-r--r-- | Makefile.am | 2 | ||||
| -rw-r--r-- | dmstools.xcodeproj/project.pbxproj | 4 | ||||
| -rw-r--r-- | m4/dmstools_git.m4 | 67 |
3 files changed, 71 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index df529a9..caab36e 100644 --- a/Makefile.am +++ b/Makefile.am | |||
| @@ -148,6 +148,8 @@ EXTRA_DIST = build-aux/config.rpath \ | |||
| 148 | include/dmsversion.h.in \ | 148 | include/dmsversion.h.in \ |
| 149 | include/gettext.h \ | 149 | include/gettext.h \ |
| 150 | lib/libdms.sym \ | 150 | lib/libdms.sym \ |
| 151 | m4/dmstools_gcc.m4 \ | ||
| 152 | m4/dmstools_git.m4 \ | ||
| 151 | $(srcdir)/dmstools.tags \ | 153 | $(srcdir)/dmstools.tags \ |
| 152 | $(srcdir)/doc/Doxyfile \ | 154 | $(srcdir)/doc/Doxyfile \ |
| 153 | $(srcdir)/doc/codetagger.1.in \ | 155 | $(srcdir)/doc/codetagger.1.in \ |
diff --git a/dmstools.xcodeproj/project.pbxproj b/dmstools.xcodeproj/project.pbxproj index 399d5c3..da41810 100644 --- a/dmstools.xcodeproj/project.pbxproj +++ b/dmstools.xcodeproj/project.pbxproj | |||
| @@ -32,7 +32,6 @@ | |||
| 32 | A03242690E0E453700D5D5CA /* Makefile.am */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; indentWidth = 8; path = Makefile.am; sourceTree = "<group>"; tabWidth = 8; usesTabs = 1; }; | 32 | A03242690E0E453700D5D5CA /* Makefile.am */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; indentWidth = 8; path = Makefile.am; sourceTree = "<group>"; tabWidth = 8; usesTabs = 1; }; |
| 33 | A051283C10D987300013335E /* bitcopy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bitcopy.c; sourceTree = "<group>"; }; | 33 | A051283C10D987300013335E /* bitcopy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bitcopy.c; sourceTree = "<group>"; }; |
| 34 | A07BC6F10F0210CF00219629 /* bitops.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bitops.c; sourceTree = "<group>"; }; | 34 | A07BC6F10F0210CF00219629 /* bitops.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bitops.c; sourceTree = "<group>"; }; |
| 35 | A081550411054BF3006932F1 /* .gitignore */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = .gitignore; sourceTree = "<group>"; }; | ||
| 36 | A081550511054BF3006932F1 /* dmstools_gcc.m4 */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = dmstools_gcc.m4; sourceTree = "<group>"; }; | 35 | A081550511054BF3006932F1 /* dmstools_gcc.m4 */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = dmstools_gcc.m4; sourceTree = "<group>"; }; |
| 37 | A08B43A010FCD1580091D7C8 /* dms.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dms.h; sourceTree = "<group>"; }; | 36 | A08B43A010FCD1580091D7C8 /* dms.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dms.h; sourceTree = "<group>"; }; |
| 38 | A08B43A310FCD1670091D7C8 /* libdms.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = libdms.h; sourceTree = "<group>"; }; | 37 | A08B43A310FCD1670091D7C8 /* libdms.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = libdms.h; sourceTree = "<group>"; }; |
| @@ -41,6 +40,7 @@ | |||
| 41 | A08B43A810FCD1670091D7C8 /* libdms_version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = libdms_version.h; sourceTree = "<group>"; }; | 40 | A08B43A810FCD1670091D7C8 /* libdms_version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = libdms_version.h; sourceTree = "<group>"; }; |
| 42 | A08B43AD10FCD73F0091D7C8 /* dmsversion.h.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.c; fileEncoding = 4; path = dmsversion.h.in; sourceTree = "<group>"; }; | 41 | A08B43AD10FCD73F0091D7C8 /* dmsversion.h.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.c; fileEncoding = 4; path = dmsversion.h.in; sourceTree = "<group>"; }; |
| 43 | A08B43D110FD0B280091D7C8 /* dmsversion.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dmsversion.c; sourceTree = "<group>"; }; | 42 | A08B43D110FD0B280091D7C8 /* dmsversion.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dmsversion.c; sourceTree = "<group>"; }; |
| 43 | A09650C01187AD83000BB8AF /* dmstools_git.m4 */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = dmstools_git.m4; sourceTree = "<group>"; }; | ||
| 44 | A0AE375510EAAA3C006B1ADB /* typedef-info.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "typedef-info.c"; sourceTree = "<group>"; }; | 44 | A0AE375510EAAA3C006B1ADB /* typedef-info.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "typedef-info.c"; sourceTree = "<group>"; }; |
| 45 | A0AF031210F540EB00CBC28C /* bindump.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bindump.c; sourceTree = "<group>"; }; | 45 | A0AF031210F540EB00CBC28C /* bindump.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bindump.c; sourceTree = "<group>"; }; |
| 46 | A0B6D45D1033A3BA004E87EE /* numconvert.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = numconvert.c; sourceTree = "<group>"; }; | 46 | A0B6D45D1033A3BA004E87EE /* numconvert.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = numconvert.c; sourceTree = "<group>"; }; |
| @@ -117,7 +117,7 @@ | |||
| 117 | A081550311054BF3006932F1 /* m4 */ = { | 117 | A081550311054BF3006932F1 /* m4 */ = { |
| 118 | isa = PBXGroup; | 118 | isa = PBXGroup; |
| 119 | children = ( | 119 | children = ( |
| 120 | A081550411054BF3006932F1 /* .gitignore */, | 120 | A09650C01187AD83000BB8AF /* dmstools_git.m4 */, |
| 121 | A081550511054BF3006932F1 /* dmstools_gcc.m4 */, | 121 | A081550511054BF3006932F1 /* dmstools_gcc.m4 */, |
| 122 | ); | 122 | ); |
| 123 | path = m4; | 123 | path = m4; |
diff --git a/m4/dmstools_git.m4 b/m4/dmstools_git.m4 new file mode 100644 index 0000000..a48a0a3 --- /dev/null +++ b/m4/dmstools_git.m4 | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | # | ||
| 2 | # DMS Tools and Utilities | ||
| 3 | # Copyright (C) 2008 David M. Syzdek <david@syzdek.net> | ||
| 4 | # | ||
| 5 | # @SYZDEK_LICENSE_HEADER_START@ | ||
| 6 | # | ||
| 7 | # This program is free software; you can redistribute it and/or modify | ||
| 8 | # it under the terms of the GNU General Public License Version 2 as | ||
| 9 | # published by the Free Software Foundation. | ||
| 10 | # | ||
| 11 | # This program is distributed in the hope that it will be useful, | ||
| 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | # GNU General Public License for more details. | ||
| 15 | # | ||
| 16 | # You should have received a copy of the GNU General Public License | ||
| 17 | # along with this program; if not, write to the Free Software | ||
| 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 19 | # | ||
| 20 | # @SYZDEK_LICENSE_HEADER_END@ | ||
| 21 | # | ||
| 22 | # acinclude.m4 - custom m4 macros used by configure.ac | ||
| 23 | # | ||
| 24 | |||
| 25 | # AC_DMS_GIT_PACKAGE_VERSION() | ||
| 26 | # ----------------------------------- | ||
| 27 | AC_DEFUN([AC_DMS_GIT_PACKAGE_VERSION],[dnl | ||
| 28 | |||
| 29 | if test -f ${srcdir}/.git/config;then | ||
| 30 | GPV=$(git describe --abbrev=7 HEAD 2>/dev/null) | ||
| 31 | GPV=$(echo "$GPV" | sed -e 's/-/./g') | ||
| 32 | GPV=$(echo "$GPV" | sed -e 's/^v//g') | ||
| 33 | if test "x${GPV}" != "x";then | ||
| 34 | AC_MSG_NOTICE([using git package version ${GPV}]) | ||
| 35 | if test -d ${ac_aux_dir};then | ||
| 36 | echo ${GPV} > ${ac_aux_dir}/git-package-version | ||
| 37 | fi | ||
| 38 | fi | ||
| 39 | elif test -f ${ac_aux_dir}/git-package-version;then | ||
| 40 | GPV=$(cat ${ac_aux_dir}/git-package-version) | ||
| 41 | if test -d ${ac_aux_dir};then | ||
| 42 | AC_MSG_NOTICE([using cached git package version ${GPV}]) | ||
| 43 | fi | ||
| 44 | fi | ||
| 45 | |||
| 46 | if test "x${GPV}" = "x";then | ||
| 47 | AC_MSG_WARN([unable to determine package version from Git tags]) | ||
| 48 | else | ||
| 49 | # | ||
| 50 | # set internal variables | ||
| 51 | GIT_PACKAGE_VERSION=${GPV} | ||
| 52 | PACKAGE_VERSION=${GPV} | ||
| 53 | VERSION=${GPV} | ||
| 54 | # | ||
| 55 | # set substitution variables | ||
| 56 | AC_SUBST([GIT_PACKAGE_VERSION], [${GPV}]) | ||
| 57 | AC_SUBST([PACKAGE_VERSION], [${GPV}]) | ||
| 58 | AC_SUBST([VERSION], [${GPV}]) | ||
| 59 | # | ||
| 60 | # set C/C++/Objc preprocessor macros | ||
| 61 | AC_DEFINE_UNQUOTED([GIT_PACKAGE_VERSION], ["${GIT_PACKAGE_VERSION}"], [package version determined from git repository]) | ||
| 62 | AC_DEFINE_UNQUOTED([PACKAGE_VERSION], ["${GIT_PACKAGE_VERSION}"], [package version determined from git repository]) | ||
| 63 | AC_DEFINE_UNQUOTED([VERSION], ["${GIT_PACKAGE_VERSION}"], [package version determined from git repository]) | ||
| 64 | fi | ||
| 65 | ])dnl | ||
| 66 | |||
| 67 | # end of M4 file | ||
