Skip to content

Commit 870d333

Browse files
committed
more attempts to fix CI
1 parent dbf0676 commit 870d333

File tree

3 files changed

+28
-32
lines changed

3 files changed

+28
-32
lines changed

.github/workflows/actions.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ jobs:
140140
GIT_AUTHOR_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
141141
GIT_COMMITTER_NAME: github-actions[bot]
142142
GIT_COMMITTER_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
143-
MACOS_VER_NUM: 14
143+
MACOS_VER_NUM: 14.0
144144
CERT_IDENTITY: me
145145
LDLIBS: -lgetargv
146146
CXXFLAGS: -Iinclude

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ $(DMG): $(PRODUCT)
6969

7070
$(DISTRIBUTION): $(SRC_DIR)/dist.xml
7171
< $< > $@ sed \
72-
-e 's/OS_VERSION/$(MACOS_VER_NUM)/g' \
72+
-e 's/OS_VERSION/$(MACOSX_DEPLOYMENT_TARGET)/g' \
7373
-e 's/ARCH/$(ARCH)/g' \
7474
-e 's/VERSION/$(VERSION)/g' \
7575
-e 's/LIB_PKG_NAME/$(LIB_PKG:$(PKG_DIR)/%=%)/g' \

Makefile-variables

+26-30
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
PREFIX ?= /usr/local
2-
ifndef MACOS_VER_NUM
3-
MACOS_VER_NUM := $(shell vtool -show-build $(shell pkg-config --variable=libdir getargv)/libgetargv.dylib | awk '/minos/{print $$2}')
4-
endif
1+
PREFIX ?= /usr/local
2+
MACOS_VER_NUM ?= $(shell vtool -show-build $(shell pkg-config --variable=libdir getargv)/libgetargv.dylib | awk '/minos/{print $$2}')
53
MACOS_VER_MAJOR := $(shell echo $(MACOS_VER_NUM) | cut -f1 -d.)
64
MACOS_VER_MINOR := $(shell echo $(MACOS_VER_NUM) | cut -f2 -d.)
75
MACOS_LT_10_11 := $(shell [ $(MACOS_VER_MAJOR) -eq 10 -a $(MACOS_VER_MINOR) -lt 11 ] && echo true)
@@ -12,53 +10,51 @@ export MACOSX_DEPLOYMENT_TARGET := $(MACOS_VER_MAJOR).$(MACOS_VER_MINOR)
1210
# When changing version, also change: getargv++.pc, doxygen.conf, and README.md
1311
VERSION=0.9
1412
#
15-
COMPAT_VERSION := $(shell echo $(VERSION) | cut -f1 -d.).0
16-
ARCH := $(shell uname -m)
13+
COMPAT_VERSION := $(shell echo $(VERSION) | cut -f1 -d.).0
14+
ARCH := $(shell uname -m)
1715
CODESIGN_PREFIX := cam.narzt.
1816
KEYCHAIN := ~/Library/Keychains/login.keychain-db
19-
ifndef CERT_IDENTITY
20-
CERT_IDENTITY := $(shell security find-identity -v -p codesigning | sed -Ee 's/.*"([^"]+)".*/\1/g' | grep -Fve ' valid identit' -e ' CA')
21-
endif
17+
CERT_IDENTITY ?= $(shell security find-identity -v -p codesigning | sed -Ee 's/.*"([^"]+)".*/\1/g' | grep -Fve ' valid identit' -e ' CA')
2218

23-
SRC_DIR = src
24-
INCLUDE_DIR = include
25-
OBJ_DIR = obj
26-
LIB_DIR = lib
27-
PKG_DIR = pkg
28-
FAKE_ROOT = fakeroot
29-
CXX = clang++
30-
CPPFLAGS := -MMD -MP
19+
SRC_DIR := src
20+
INCLUDE_DIR := include
21+
OBJ_DIR := obj
22+
LIB_DIR := lib
23+
PKG_DIR := pkg
24+
FAKE_ROOT := fakeroot
25+
CXX := clang++
26+
CPPFLAGS := -MMD -MP
3127

3228
COMPILER_VERSION := $(shell $(CXX) --version | grep version | grep -o -m 1 "[0-9]\+\.[0-9]\+\.*[0-9]*" | head -n 1)
3329
COMPILER_VERSION_NUMBER := $(shell echo $(COMPILER_VERSION) | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/')
3430
CLANG_13_OR_MORE := $(shell expr $(COMPILER_VERSION_NUMBER) \>= 130106)
3531
ifneq ($(CLANG_13_OR_MORE),0)
3632
# supported: c++11, c++14, c++17, c++20
3733
# future: c++2b
38-
CXXFLAGS := --std=c++20 -O3 -Iinclude $(shell pkg-config --cflags getargv)
34+
CXXFLAGS ?= --std=c++20 -O3 -Iinclude $(shell pkg-config --cflags getargv)
3935
else
40-
CXXFLAGS := --std=c++17 -O3 -Iinclude $(shell pkg-config --cflags getargv)
36+
CXXFLAGS ?= --std=c++17 -O3 -Iinclude $(shell pkg-config --cflags getargv)
4137
endif
4238

4339
EXTRA_CXXFLAGS := -pedantic-errors -Weverything -Wno-c++98-compat -Wno-pre-c++20-compat-pedantic -Wno-poison-system-directories
44-
LDFLAGS := -Llib -fvisibility=default -fPIC
45-
LDLIBS := $(shell pkg-config --libs getargv)
40+
LDFLAGS := -Llib -fvisibility=default -fPIC
41+
LDLIBS ?= $(shell pkg-config --libs getargv)
4642

47-
LIB_SHORT_NAME = getargv++
48-
LIB_NAME = lib$(LIB_SHORT_NAME)
49-
DYLIB_FILENAME = $(LIB_NAME).$(VERSION).dylib
50-
DYLIB = lib/$(DYLIB_FILENAME)
51-
SOURCES = $(wildcard $(SRC_DIR)/*.cpp)
52-
HEADERS = $(wildcard $(INCLUDE_DIR)/*.hpp)
53-
OBJECTS = $(SOURCES:$(SRC_DIR)/%.cpp=$(OBJ_DIR)/%.o)
43+
LIB_SHORT_NAME := getargv++
44+
LIB_NAME := lib$(LIB_SHORT_NAME)
45+
DYLIB_FILENAME := $(LIB_NAME).$(VERSION).dylib
46+
DYLIB := lib/$(DYLIB_FILENAME)
47+
SOURCES := $(wildcard $(SRC_DIR)/*.cpp)
48+
HEADERS := $(wildcard $(INCLUDE_DIR)/*.hpp)
49+
OBJECTS := $(SOURCES:$(SRC_DIR)/%.cpp=$(OBJ_DIR)/%.o)
5450

5551
DMG_VOLUME_NAME := $(LIB_NAME) Installer
5652
DMG := $(PKG_DIR)/$(LIB_NAME).dmg
5753
PRODUCT_BUNDLE_PACKAGE_TYPE := APPL
5854
LIB_BUNDLE_IDENTIFIER := $(CODESIGN_PREFIX)$(LIB_NAME)
5955
PRODUCT_BUNDLE_IDENTIFIER := $(LIB_BUNDLE_IDENTIFIER)
60-
PRODUCT := $(PKG_DIR)/$(LIB_NAME)-$(VERSION)-macOS-$(MACOS_VER_NUM)-$(ARCH).pkg
61-
LIB_PKG := $(PKG_DIR)/$(LIB_NAME)-$(VERSION)-macOS-$(MACOS_VER_NUM)-$(ARCH)-package.pkg
56+
PRODUCT := $(PKG_DIR)/$(LIB_NAME)-$(VERSION)-macOS-$(MACOSX_DEPLOYMENT_TARGET)-$(ARCH).pkg
57+
LIB_PKG := $(PKG_DIR)/$(LIB_NAME)-$(VERSION)-macOS-$(MACOSX_DEPLOYMENT_TARGET)-$(ARCH)-package.pkg
6258
DISTRIBUTION := $(OBJ_DIR)/dist.xml
6359

6460
ifeq ($(MACOS_LT_10_11),true)

0 commit comments

Comments
 (0)