From 1a1e1574a67cd21782b7e5676da5b0d03c6162b3 Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 30 Dec 2018 18:20:11 -0500 Subject: build system: major overhaul: removed sysinfo, integrated ccenv. --- sysinfo/compiler/any-compiler.mk | 29 ----------- sysinfo/compiler/clang.mk | 31 ------------ sysinfo/compiler/cparser.mk | 31 ------------ sysinfo/compiler/gcc.mk | 24 --------- sysinfo/host/any-host.mk | 7 --- sysinfo/host/i686-nt32-midipix.mk | 5 -- sysinfo/host/i686-w64-mingw32.mk | 5 -- sysinfo/host/native.mk | 45 ----------------- sysinfo/host/x86_64-nt64-midipix.mk | 5 -- sysinfo/host/x86_64-w64-mingw32.mk | 5 -- sysinfo/os/any-os.mk | 16 ------ sysinfo/os/cygwin.mk | 17 ------- sysinfo/os/elf.mk | 6 --- sysinfo/os/midipix.mk | 15 ------ sysinfo/os/mingw.mk | 18 ------- sysinfo/os/mingw32.mk | 1 - sysinfo/os/mingw64.mk | 1 - sysinfo/os/msys.mk | 18 ------- sysinfo/os/pe.mk | 99 ------------------------------------- sysinfo/toolchain/binutils.mk | 22 --------- sysinfo/toolchain/llvm.mk | 22 --------- sysinfo/version.sh | 72 --------------------------- 22 files changed, 494 deletions(-) delete mode 100644 sysinfo/compiler/any-compiler.mk delete mode 100644 sysinfo/compiler/clang.mk delete mode 100644 sysinfo/compiler/cparser.mk delete mode 100644 sysinfo/compiler/gcc.mk delete mode 100644 sysinfo/host/any-host.mk delete mode 100644 sysinfo/host/i686-nt32-midipix.mk delete mode 100644 sysinfo/host/i686-w64-mingw32.mk delete mode 100644 sysinfo/host/native.mk delete mode 100644 sysinfo/host/x86_64-nt64-midipix.mk delete mode 100644 sysinfo/host/x86_64-w64-mingw32.mk delete mode 100644 sysinfo/os/any-os.mk delete mode 100644 sysinfo/os/cygwin.mk delete mode 100644 sysinfo/os/elf.mk delete mode 100644 sysinfo/os/midipix.mk delete mode 100644 sysinfo/os/mingw.mk delete mode 100644 sysinfo/os/mingw32.mk delete mode 100644 sysinfo/os/mingw64.mk delete mode 100644 sysinfo/os/msys.mk delete mode 100644 sysinfo/os/pe.mk delete mode 100644 sysinfo/toolchain/binutils.mk delete mode 100644 sysinfo/toolchain/llvm.mk delete mode 100755 sysinfo/version.sh (limited to 'sysinfo') diff --git a/sysinfo/compiler/any-compiler.mk b/sysinfo/compiler/any-compiler.mk deleted file mode 100644 index 4c98621..0000000 --- a/sysinfo/compiler/any-compiler.mk +++ /dev/null @@ -1,29 +0,0 @@ -ifeq ($(CROSS_COMPILE)x,x) - CROSS_HOST = - CROSS_HOST_SPEC = -else - CROSS_HOST = - CROSS_HOST_SPEC = -endif - - -ifeq ($(USER_CC)x,x) - CC = $(NATIVE_CC) $(CROSS_HOST_SPEC) -else - CC = $(USER_CC) $(CROSS_HOST_SPEC) -endif - -ifeq ($(USER_CPP)x,x) - CPP = $(NATIVE_CC) $(CROSS_HOST_SPEC) -E -else - CPP = $(USER_CPP) $(CROSS_HOST_SPEC) -E -endif - -ifeq ($(USER_CXX)x,x) - CXX = $(NATIVE_CC) $(CROSS_HOST_SPEC) -std=c++ -else - CXX = $(USER_CXX) $(CROSS_HOST_SPEC) -std=c++ -endif - - -CFLAGS_PIC = -fPIC diff --git a/sysinfo/compiler/clang.mk b/sysinfo/compiler/clang.mk deleted file mode 100644 index 77b4b86..0000000 --- a/sysinfo/compiler/clang.mk +++ /dev/null @@ -1,31 +0,0 @@ -ifeq ($(CROSS_COMPILE)x,x) - CROSS_HOST = - CROSS_HOST_SPEC = -else ifeq ($(CROSS_HOST)x,x) - CROSS_HOST = $(HOST) - CROSS_HOST_SPEC = --target=$(HOST) -else - CROSS_HOST_SPEC = --target=$(CROSS_HOST) -endif - - -ifeq ($(USER_CC)x,x) - CC = $(NATIVE_CC) $(CROSS_HOST_SPEC) -else - CC = $(USER_CC) $(CROSS_HOST_SPEC) -endif - -ifeq ($(USER_CPP)x,x) - CPP = $(NATIVE_CC) $(CROSS_HOST_SPEC) -E -else - CPP = $(USER_CPP) $(CROSS_HOST_SPEC) -E -endif - -ifeq ($(USER_CXX)x,x) - CXX = $(NATIVE_CC)++ $(CROSS_HOST_SPEC) -else - CXX = $(USER_CXX) $(CROSS_HOST_SPEC) -endif - - -CFLAGS_PIC = -fPIC diff --git a/sysinfo/compiler/cparser.mk b/sysinfo/compiler/cparser.mk deleted file mode 100644 index 6c4dc8e..0000000 --- a/sysinfo/compiler/cparser.mk +++ /dev/null @@ -1,31 +0,0 @@ -ifeq ($(CROSS_COMPILE)x,x) - CROSS_HOST = - CROSS_HOST_SPEC = -else ifeq ($(CROSS_HOST)x,x) - CROSS_HOST = $(HOST) - CROSS_HOST_SPEC = --target=$(HOST) -else - CROSS_HOST_SPEC = --target=$(CROSS_HOST) -endif - - -ifeq ($(USER_CC)x,x) - CC = $(NATIVE_CC) $(CROSS_HOST_SPEC) -Wno-experimental -integrated-cpp -else - CC = $(USER_CC) $(CROSS_HOST_SPEC) -Wno-experimental -integrated-cpp -endif - -ifeq ($(USER_CPP)x,x) - CPP = $(NATIVE_CC) $(CROSS_HOST_SPEC) -Wno-experimental -integrated-cpp -E -else - CPP = $(USER_CPP) $(CROSS_HOST_SPEC) -Wno-experimental -integrated-cpp -E -endif - -ifeq ($(USER_CXX)x,x) - CXX = $(NATIVE_CC) $(CROSS_HOST_SPEC) -Wno-experimental -integrated-cpp -std=c++ -else - CXX = $(USER_CXX) $(CROSS_HOST_SPEC) -Wno-experimental -integrated-cpp -std=c++ -endif - - -CFLAGS_PIC = -fPIC diff --git a/sysinfo/compiler/gcc.mk b/sysinfo/compiler/gcc.mk deleted file mode 100644 index d14d8dc..0000000 --- a/sysinfo/compiler/gcc.mk +++ /dev/null @@ -1,24 +0,0 @@ -ifeq ($(USER_CC)x,x) - ifeq ($(CROSS_COMPILE)x,x) - CC = $(CROSS_COMPILE)$(NATIVE_CC) - else - CC = $(CROSS_COMPILE)gcc - endif -else - CC = $(USER_CC) -endif - -ifeq ($(USER_CPP)x,x) - CPP = $(CROSS_COMPILE)cpp -else - CPP = $(USER_CPP) -endif - -ifeq ($(USER_CXX)x,x) - CXX = $(CROSS_COMPILE)c++ -else - CXX = $(USER_CXX) -endif - - -CFLAGS_PIC = -fPIC diff --git a/sysinfo/host/any-host.mk b/sysinfo/host/any-host.mk deleted file mode 100644 index acb606a..0000000 --- a/sysinfo/host/any-host.mk +++ /dev/null @@ -1,7 +0,0 @@ -include $(PROJECT_DIR)/sysinfo/os/any-os.mk - -ARCH = -HOST_BITS = -HOST_UNDERSCORE = - -CROSS_HOST = $(TARGET) diff --git a/sysinfo/host/i686-nt32-midipix.mk b/sysinfo/host/i686-nt32-midipix.mk deleted file mode 100644 index fd4b8f8..0000000 --- a/sysinfo/host/i686-nt32-midipix.mk +++ /dev/null @@ -1,5 +0,0 @@ -include $(PROJECT_DIR)/sysinfo/os/midipix.mk - -ARCH = nt32 -HOST_BITS = 32 -HOST_UNDERSCORE = '_' diff --git a/sysinfo/host/i686-w64-mingw32.mk b/sysinfo/host/i686-w64-mingw32.mk deleted file mode 100644 index b18e2e3..0000000 --- a/sysinfo/host/i686-w64-mingw32.mk +++ /dev/null @@ -1,5 +0,0 @@ -include $(PROJECT_DIR)/sysinfo/os/mingw.mk - -ARCH = w32 -HOST_BITS = 32 -HOST_UNDERSCORE = '_' diff --git a/sysinfo/host/native.mk b/sysinfo/host/native.mk deleted file mode 100644 index f0cf720..0000000 --- a/sysinfo/host/native.mk +++ /dev/null @@ -1,45 +0,0 @@ -include $(PROJECT_DIR)/sysinfo/os/$(NATIVE_OS).mk - -OS = $(NATIVE_OS) -HOST_BITS = $(NATIVE_OS_BITS) -HOST_UNDERSCORE = $(NATIVE_OS_UNDERSCORE) - -ifeq ($(OS),linux) - ifeq ($(HOST_BITS),32) - ARCH = i386 - else ifeq ($(HOST_BITS),64) - ARCH = x86_64 - endif -endif - -ifeq ($(OS),midipix) - ifeq ($(HOST_BITS),32) - ARCH = nt32 - else ifeq ($(HOST_BITS),64) - ARCH = nt64 - endif -endif - -ifeq ($(OS),mingw) - ifeq ($(HOST_BITS),32) - ARCH = w32 - else ifeq ($(HOST_BITS),64) - ARCH = w64 - endif -endif - -ifeq ($(OS),bsd) - ifeq ($(HOST_BITS),32) - ARCH = bsd32 - else ifeq ($(HOST_BITS),64) - ARCH = bsd64 - endif -endif - -ifeq ($(OS),darwin) - ifeq ($(HOST_BITS),32) - ARCH = dw32 - else ifeq ($(HOST_BITS),64) - ARCH = dw64 - endif -endif diff --git a/sysinfo/host/x86_64-nt64-midipix.mk b/sysinfo/host/x86_64-nt64-midipix.mk deleted file mode 100644 index d0e1d52..0000000 --- a/sysinfo/host/x86_64-nt64-midipix.mk +++ /dev/null @@ -1,5 +0,0 @@ -include $(PROJECT_DIR)/sysinfo/os/midipix.mk - -ARCH = nt64 -HOST_BITS = 64 -HOST_UNDERSCORE = '' diff --git a/sysinfo/host/x86_64-w64-mingw32.mk b/sysinfo/host/x86_64-w64-mingw32.mk deleted file mode 100644 index a86f9b0..0000000 --- a/sysinfo/host/x86_64-w64-mingw32.mk +++ /dev/null @@ -1,5 +0,0 @@ -include $(PROJECT_DIR)/sysinfo/os/mingw.mk - -ARCH = w64 -HOST_BITS = 64 -HOST_UNDERSCORE = '' diff --git a/sysinfo/os/any-os.mk b/sysinfo/os/any-os.mk deleted file mode 100644 index 6c5a2af..0000000 --- a/sysinfo/os/any-os.mk +++ /dev/null @@ -1,16 +0,0 @@ -OS = any-os -OS_APP_PREFIX = -OS_APP_SUFFIX = -OS_LIB_PREFIX = lib -OS_LIB_SUFFIX = .so -OS_IMPLIB_EXT = .invalid -OS_LIBDEF_EXT = .invalid -OS_ARCHIVE_EXT = .a -OS_SONAME = symlink -OS_BINFMT = ELF - -.PHONY: $(IMPLIB_DEF) $(IMPLIB_VER) $(IMPLIB_SONAME) $(IMPLIB_SOLINK) - -# dso suffix notation -OS_LIB_PREFIXED_SUFFIX = $(OS_LIB_SUFFIX) -OS_LIB_SUFFIXED_SUFFIX = diff --git a/sysinfo/os/cygwin.mk b/sysinfo/os/cygwin.mk deleted file mode 100644 index 290aa0d..0000000 --- a/sysinfo/os/cygwin.mk +++ /dev/null @@ -1,17 +0,0 @@ -OS = cygwin -OS_APP_PREFIX = -OS_APP_SUFFIX = .exe -OS_LIB_PREFIX = lib -OS_LIB_SUFFIX = .dll -OS_IMPLIB_EXT = .dll.a -OS_LIBDEF_EXT = .def -OS_ARCHIVE_EXT = .a -OS_SONAME = copy -OS_BINFMT = PE -OS_IMPLIB_TOOL = dlltool - -CFLAGS_PIC = - -# dso suffix notation -OS_LIB_PREFIXED_SUFFIX = $(OS_LIB_SUFFIX) -OS_LIB_SUFFIXED_SUFFIX = diff --git a/sysinfo/os/elf.mk b/sysinfo/os/elf.mk deleted file mode 100644 index 6878c6a..0000000 --- a/sysinfo/os/elf.mk +++ /dev/null @@ -1,6 +0,0 @@ -DSO_REF_VER = $(SHARED_LIB) -DSO_REF_SONAME = $(SHARED_SONAME) -DSO_REF_SOLINK = $(SHARED_SOLINK) - -LDFLAGS_SHARED += -Wl,-soname -LDFLAGS_SHARED += -Wl,$(DSO_SONAME) diff --git a/sysinfo/os/midipix.mk b/sysinfo/os/midipix.mk deleted file mode 100644 index d23d387..0000000 --- a/sysinfo/os/midipix.mk +++ /dev/null @@ -1,15 +0,0 @@ -OS = midipix -OS_APP_PREFIX = -OS_APP_SUFFIX = -OS_LIB_PREFIX = lib -OS_LIB_SUFFIX = .so -OS_IMPLIB_EXT = .lib.a -OS_LIBDEF_EXT = .so.def -OS_ARCHIVE_EXT = .a -OS_SONAME = symlink -OS_BINFMT = PE -OS_IMPLIB_TOOL = mdso - -# dso suffix notation -OS_LIB_PREFIXED_SUFFIX = $(OS_LIB_SUFFIX) -OS_LIB_SUFFIXED_SUFFIX = diff --git a/sysinfo/os/mingw.mk b/sysinfo/os/mingw.mk deleted file mode 100644 index 1a352ba..0000000 --- a/sysinfo/os/mingw.mk +++ /dev/null @@ -1,18 +0,0 @@ -OS = mingw -OS_APP_PREFIX = -OS_APP_SUFFIX = .exe -OS_LIB_PREFIX = lib -OS_LIB_SUFFIX = .dll -OS_IMPLIB_EXT = .dll.a -OS_LIBDEF_EXT = .def -OS_ARCHIVE_EXT = .a -OS_SONAME = copy -OS_BINFMT = PE -OS_IMPLIB_TOOL = dlltool - -CFLAGS_PIC = -CFLAGS_OS += -U__STRICT_ANSI__ - -# dso suffix notation -OS_LIB_PREFIXED_SUFFIX = $(OS_LIB_SUFFIX) -OS_LIB_SUFFIXED_SUFFIX = diff --git a/sysinfo/os/mingw32.mk b/sysinfo/os/mingw32.mk deleted file mode 100644 index 542b6a9..0000000 --- a/sysinfo/os/mingw32.mk +++ /dev/null @@ -1 +0,0 @@ -include $(PROJECT_DIR)/sysinfo/os/mingw.mk diff --git a/sysinfo/os/mingw64.mk b/sysinfo/os/mingw64.mk deleted file mode 100644 index 542b6a9..0000000 --- a/sysinfo/os/mingw64.mk +++ /dev/null @@ -1 +0,0 @@ -include $(PROJECT_DIR)/sysinfo/os/mingw.mk diff --git a/sysinfo/os/msys.mk b/sysinfo/os/msys.mk deleted file mode 100644 index 70fcd68..0000000 --- a/sysinfo/os/msys.mk +++ /dev/null @@ -1,18 +0,0 @@ -OS = msys -OS_APP_PREFIX = -OS_APP_SUFFIX = .exe -OS_LIB_PREFIX = lib -OS_LIB_SUFFIX = .dll -OS_IMPLIB_EXT = .dll.a -OS_LIBDEF_EXT = .def -OS_ARCHIVE_EXT = .a -OS_SONAME = copy -OS_BINFMT = PE -OS_IMPLIB_TOOL = dlltool - -CFLAGS_PIC = -CFLAGS_OS += -U__STRICT_ANSI__ - -# dso suffix notation -OS_LIB_PREFIXED_SUFFIX = $(OS_LIB_SUFFIX) -OS_LIB_SUFFIXED_SUFFIX = diff --git a/sysinfo/os/pe.mk b/sysinfo/os/pe.mk deleted file mode 100644 index 6f9e8ef..0000000 --- a/sysinfo/os/pe.mk +++ /dev/null @@ -1,99 +0,0 @@ -DSO_REF_VER = $(IMPLIB_VER) -DSO_REF_SONAME = $(IMPLIB_SONAME) -DSO_REF_SOLINK = $(IMPLIB_SOLINK) - -LDFLAGS_IMPLIB += -Wl,--output-def -LDFLAGS_IMPLIB += -Wl,$(IMPLIB_DEF) - -LDFLAGS_SONAME += -Wl,-soname -LDFLAGS_SONAME += -Wl,$(DSO_SONAME) -LDFLAGS_SHARED += $(LDFLAGS_SONAME) - -DSO_LIBPATH ?= loader -PE_SUBSYSTEM ?= windows -LDFLAGS_COMMON += -Wl,--subsystem=$(PE_SUBSYSTEM) - -implib: implib-ver package-implib-soname package-implib-solink - -implib-ver: shared-lib $(IMPLIB_VER) - -implib-soname: shared-lib $(IMPLIB_SONAME) - -implib-solink: shared-lib $(IMPLIB_SOLINK) - -$(IMPLIB_DEF): shared-lib - -install-implib: install-implib-ver \ - package-install-implib-soname \ - package-install-implib-solink - -install-implib-ver: implib-ver - mkdir -p $(DESTDIR)$(LIBDIR) - cp $(IMPLIB_VER) $(DESTDIR)$(LIBDIR) - -clean-implib: - rm -f $(SHARED_LIB) - rm -f $(IMPLIB_DEF) - rm -f $(IMPLIB_VER) - rm -f $(IMPLIB_SONAME) - rm -f $(IMPLIB_SOLINK) - - -ifeq ($(OS_IMPLIB_TOOL),mdso) - -$(IMPLIB_VER): $(IMPLIB_DEF) - $(MDSO) -m $(HOST_BITS) -i $(IMPLIB_VER) -n $(DSO_VER) -l $(DSO_LIBPATH) $< - -else ifeq ($(OS_IMPLIB_TOOL),dlltool) - -$(IMPLIB_VER): $(IMPLIB_DEF) - $(DLLTOOL) -l $(IMPLIB_VER) -d $(IMPLIB_DEF) -D $(DSO_VER) - -endif - - - -ifeq ($(AVOID_VERSION),yes) - -package-implib-soname: -package-implib-solink: -package-install-implib-soname: -package-install-implib-solink: - -else - -package-implib-soname: implib-soname -package-implib-solink: implib-solink -package-install-implib-soname: install-implib-soname -package-install-implib-solink: install-implib-solink - - -ifeq ($(OS_IMPLIB_TOOL),mdso) - -$(IMPLIB_SONAME): $(IMPLIB_DEF) - $(MDSO) -m $(HOST_BITS) -i $(IMPLIB_SONAME) -n $(DSO_SONAME) $(IMPLIB_DEF) - -else ifeq ($(OS_IMPLIB_TOOL),dlltool) - -$(IMPLIB_SONAME): $(IMPLIB_DEF) - $(DLLTOOL) -l $(IMPLIB_SONAME) -d $(IMPLIB_DEF) -D $(DSO_SONAME) - -endif - - -$(IMPLIB_SOLINK): $(IMPLIB_SONAME) - rm -f $(IMPLIB_SOLINK).tmp - ln -s $(IMP_SONAME) $(IMPLIB_SOLINK).tmp - mv $(IMPLIB_SOLINK).tmp $(IMPLIB_SOLINK) - -install-implib-soname: implib-soname - mkdir -p $(DESTDIR)$(LIBDIR) - cp $(IMPLIB_SONAME) $(DESTDIR)$(LIBDIR) - -install-implib-solink: implib-soname - mkdir -p $(DESTDIR)$(LIBDIR) - rm -f $(IMPLIB_SOLINK).tmp - ln -s $(IMP_SONAME) $(IMPLIB_SOLINK).tmp - mv $(IMPLIB_SOLINK).tmp $(DESTDIR)$(LIBDIR)/$(IMP_SOLINK) - -endif diff --git a/sysinfo/toolchain/binutils.mk b/sysinfo/toolchain/binutils.mk deleted file mode 100644 index 9cb532a..0000000 --- a/sysinfo/toolchain/binutils.mk +++ /dev/null @@ -1,22 +0,0 @@ -AS = $(CROSS_COMPILE)as -AR = $(CROSS_COMPILE)ar -LD = $(CROSS_COMPILE)ld -NM = $(CROSS_COMPILE)nm -OBJDUMP = $(CROSS_COMPILE)objdump -RANLIB = $(CROSS_COMPILE)ranlib -SIZE = $(CROSS_COMPILE)size -STRIP = $(CROSS_COMPILE)strip -STRINGS = $(CROSS_COMPILE)strings - - -ADDR2LINE = $(CROSS_COMPILE)addr2line -COV = $(CROSS_COMPILE)gcov -CXXFILT = $(CROSS_COMPILE)c++filt -ELFEDIT = $(CROSS_COMPILE)elfedit -OBJCOPY = $(CROSS_COMPILE)objcopy -READELF = $(CROSS_COMPILE)readelf -DLLTOOL = $(CROSS_COMPILE)dlltool -MDSO = $(CROSS_COMPILE)mdso -PERK = $(CROSS_COMPILE)perk -MC = $(CROSS_COMPILE)windmc -RC = $(CROSS_COMPILE)windres diff --git a/sysinfo/toolchain/llvm.mk b/sysinfo/toolchain/llvm.mk deleted file mode 100644 index 8082c0a..0000000 --- a/sysinfo/toolchain/llvm.mk +++ /dev/null @@ -1,22 +0,0 @@ -AS = llvm-mc -filetype=obj -AR = llvm-ar -LD = lld -NM = llvm-nm -OBJDUMP = llvm-objdump -RANLIB = llvm-ranlib -SIZE = llvm-size -STRIP = $(CROSS_COMPILE)strip -STRINGS = $(CROSS_COMPILE)strings - - -ADDR2LINE = $(CROSS_COMPILE)addr2line -COV = $(CROSS_COMPILE)gcov -CXXFILT = $(CROSS_COMPILE)c++filt -ELFEDIT = $(CROSS_COMPILE)elfedit -OBJCOPY = $(CROSS_COMPILE)objcopy -READELF = $(CROSS_COMPILE)readelf -DLLTOOL = $(CROSS_COMPILE)dlltool -MDSO = $(CROSS_COMPILE)mdso -PERK = $(CROSS_COMPILE)perk -MC = $(CROSS_COMPILE)windmc -RC = $(CROSS_COMPILE)windres diff --git a/sysinfo/version.sh b/sysinfo/version.sh deleted file mode 100755 index f510a32..0000000 --- a/sysinfo/version.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/sh - -set -eu - -usage() -{ -cat << EOF >&2 - -Usage: - -h show this HELP message - -s SRCDIR set source directory - -o OUTPUT set output header - -p PREFIX set macro prefix - -EOF -exit 1 -} - - -# one -workdir=$(pwd) -srcdir= -output= -prefix= - - -while getopts "hs:o:p:" opt; do - case $opt in - h) - usage - ;; - s) - srcdir="$OPTARG" - ;; - o) - output="$OPTARG" - ;; - p) - prefix="$OPTARG" - ;; - \?) - printf "Invalid option: -%s" "$OPTARG" >&2 - usage - ;; - esac -done - - -# two -if [ -z "$srcdir" ] || [ -z "$output" ] || [ -z "$prefix" ]; then - usage -fi - -cd "$srcdir" - -gitver=$(git rev-parse --verify HEAD 2>/dev/null) || gitver="unknown" -cvdate=$(git show -s --format=%ci $gitver 2>/dev/null) || cvdate=$(date) - -vmacro=$(printf '%s' "$prefix"'_GIT_VERSION' | tr '[:lower:]' '[:upper:]') -dmacro=$(printf '%s' "$prefix"'_GIT_DATE ' | tr '[:lower:]' '[:upper:]') - -cd "$workdir" - - -# three -printf '#define %s "%s"\n#define %s "%s"\n' \ - "$vmacro" "$gitver" \ - "$dmacro" "$cvdate" \ - > "$output" - -# all done -exit 0 -- cgit v1.2.3