blob: 9083a759704416c0bfa3be085f5871a9d4129123 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
--- w-tzdata-2021e-1.orig/Makefile 2021-09-25 16:47:39.000000000 +0200
+++ w-tzdata-2021e-1/Makefile 2022-01-09 06:05:17.958089388 +0100
@@ -370,7 +370,7 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fn
# January's first Monday when a "%V" format is used and January 1
# falls on a Friday, Saturday, or Sunday.
-CFLAGS=
+CFLAGS?=
# Linker flags. Default to $(LFLAGS) for backwards compatibility
# to release 2012h and earlier.
@@ -385,7 +385,7 @@ LEAPSECONDS=
# The zic command and its arguments.
zic= ./zic
-ZIC= $(zic) $(ZFLAGS)
+ZIC= ./zic_for_build $(ZFLAGS)
# To shrink the size of installed TZif files,
# append "-r @N" to omit data before N-seconds-after-the-Epoch.
@@ -562,7 +562,7 @@ SHELL= /bin/sh
all: tzselect zic zdump libtz.a $(TABDATA) \
vanguard.zi main.zi rearguard.zi
-ALL: all date $(ENCHILADA)
+ALL: zic_for_build date $(ENCHILADA)
install: all $(DATA) $(REDO) $(MANS)
mkdir -p '$(DESTDIR)$(BINDIR)' \
@@ -637,6 +637,12 @@ zdump: $(TZDOBJS)
zic: $(TZCOBJS)
$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZCOBJS) $(LDLIBS)
+zic_for_build: version.h
+ $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) zic.c -o zic_build.o
+ $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) localtime.c -o localtime_build.o
+ $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) asctime.c -o asctime_build.o
+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o $@ zic_build.o localtime_build.o asctime_build.o
+
leapseconds: $(LEAP_DEPS)
$(AWK) -v EXPIRES_LINE=$(EXPIRES_LINE) \
-f leapseconds.awk leap-seconds.list >$@.out
|