File: Makefile.am

package info (click to toggle)
dateutils 0.4.3-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,924 kB
  • sloc: ansic: 22,097; makefile: 1,666; yacc: 198; sh: 168; lex: 108
file content (210 lines) | stat: -rw-r--r-- 5,948 bytes parent folder | download | duplicates (2)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
### Makefile.am
include $(top_builddir)/version.mk

AM_CFLAGS = $(EXTRA_CFLAGS)
AM_CPPFLAGS = -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
AM_LDFLAGS =

noinst_PROGRAMS =
noinst_HEADERS =
noinst_LIBRARIES =
pkgdata_DATA =
lib_LIBRARIES =
BUILT_SOURCES =
CLEANFILES =
DISTCLEANFILES =
EXTRA_DIST = $(BUILT_SOURCES)
SUFFIXES =

ANALYZE = clang
ANALYZE_FLAGS = "--analyze"
# Based on COMPILE target
ANALYZE_COMMAND = $(ANALYZE) \
	$(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) \
	$(ANALYZE_FLAGS)

if BUILD_LTRCC
noinst_PROGRAMS += ltrcc
ltrcc_CPPFLAGS = -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -D_BSD_SOURCE
ltrcc_CPPFLAGS += -DDECLF=extern
ltrcc_CPPFLAGS += -DSKIP_LEAP_ARITH
ltrcc_SOURCES = ltrcc.c ltrcc.yuck
ltrcc_SOURCES += token.c token.h
ltrcc_SOURCES += strops.c strops.h
ltrcc_SOURCES += date-core.c date-core.h
ltrcc_SOURCES += time-core.c time-core.h
ltrcc_SOURCES += dt-core.c dt-core.h
ltrcc_SOURCES += dt-locale.c dt-locale.h
EXTRA_ltrcc_SOURCES =
EXTRA_ltrcc_SOURCES += fmt-special.gperf
endif  ## BUILD_LTRCC
BUILT_SOURCES += ltrcc.yucc

noinst_LIBRARIES += libdut.a
libdut_a_CPPFLAGS = $(AM_CPPFLAGS)
libdut_a_CPPFLAGS += -DDECLF=extern
libdut_a_CPPFLAGS += -DLIBDUT
libdut_a_CPPFLAGS += -I$(builddir)
libdut_a_CPPFLAGS += -DLOCALE_FILE='"$(pkgdatadir)/locale"'
libdut_a_SOURCES =
libdut_a_SOURCES += version.c version.h version.c.in
libdut_a_SOURCES += date-core.c date-core.h date-core-private.h
libdut_a_SOURCES += date-core-strpf.h
libdut_a_SOURCES += time-core.c time-core.h time-core-private.h
libdut_a_SOURCES += time-core-strpf.h
libdut_a_SOURCES += dt-core.c dt-core.h dt-core-private.h
libdut_a_SOURCES += dt-core-strpf.h
libdut_a_SOURCES += strops.h strops.c
libdut_a_SOURCES += token.h token.c
libdut_a_SOURCES += tzraw.h tzraw.c
libdut_a_SOURCES += tzmap.h tzmap.c
libdut_a_SOURCES += leaps.h leaps.c
libdut_a_SOURCES += dt-locale.h dt-locale.c
libdut_a_SOURCES += boops.h
libdut_a_SOURCES += nifty.h
libdut_a_SOURCES += gmtime.h
libdut_a_SOURCES += generics.h
libdut_a_SOURCES += dt-core-tz-glue.h dt-core-tz-glue.c
libdut_a_SOURCES += leapseconds.def leapseconds.h
EXTRA_libdut_a_SOURCES =
EXTRA_libdut_a_SOURCES += dt-core-strpf.c
EXTRA_libdut_a_SOURCES += dt-core-tz-glue.c
EXTRA_libdut_a_SOURCES += date-core-strpf.c
EXTRA_libdut_a_SOURCES += time-core-strpf.c
EXTRA_libdut_a_SOURCES += yd.c
EXTRA_libdut_a_SOURCES += ymd.c
EXTRA_libdut_a_SOURCES += ymcw.c
EXTRA_libdut_a_SOURCES += ywd.c
EXTRA_libdut_a_SOURCES += bizda.c
EXTRA_libdut_a_SOURCES += daisy.c
EXTRA_libdut_a_SOURCES += fmt-special.gperf
EXTRA_libdut_a_SOURCES += leapseconds
BUILT_SOURCES += version.c
BUILT_SOURCES += fmt-special.c
BUILT_SOURCES += leapseconds.def

noinst_PROGRAMS += tzmap
tzmap_SOURCES = tzmap.c tzmap.h tzmap.yuck
tzmap_CPPFLAGS = -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -D_BSD_SOURCE
tzmap_CPPFLAGS += -DSTANDALONE
BUILT_SOURCES += tzmap.yucc

## some tzmaps we'd like to support
tzminfo_FILES =
tzminfo_FILES += iata.tzminfo
tzminfo_FILES += icao.tzminfo
tzminfo_FILES += mic.tzminfo
EXTRA_DIST += $(tzminfo_FILES)

tzmap_FILES =
tzmcc_FILES =

if FETCH_TZMAPS
tzmap_FILES += iata.tzmap
tzmap_FILES += icao.tzmap
tzmap_FILES += mic.tzmap
BUILT_SOURCES += $(tzmap_FILES)
DISTCLEANFILES += $(tzmap_FILES)

tzmcc_FILES += iata.tzmcc
tzmcc_FILES += icao.tzmcc
tzmcc_FILES += mic.tzmcc
pkgdata_DATA += $(tzmcc_FILES)
CLEANFILES += $(tzmcc_FILES)
DISTCLEANFILES += $(tzmcc_FILES)
endif  FETCH_TZMAPS

if HAVE_TZMAPS
## same thing as with the fetching
tzmcc_FILES += iata.tzmcc
tzmcc_FILES += icao.tzmcc
tzmcc_FILES += mic.tzmcc
pkgdata_DATA += $(tzmcc_FILES)
CLEANFILES += $(tzmcc_FILES)
DISTCLEANFILES += $(tzmcc_FILES)
endif  HAVE_TZMAPS


AM_V_LTRCC = $(am__v_LTRCC_$(V))
am__v_LTRCC_ = $(am__v_LTRCC_$(AM_DEFAULT_VERBOSITY))
am__v_LTRCC_0 = @echo "  LTRCC   " $@;

AM_V_DL = $(am__v_DL_$(V))
am__v_DL_ = $(am__v_DL_$(AM_DEFAULT_VERBOSITY))
am__v_DL_0 = @echo "  D/L'ING " $@;

leapseconds.def: leapseconds
	$(MAKE) $(AM_MAKEFLAGS) ltrcc$(EXEEXT)
	$(AM_V_LTRCC)$(builddir)/ltrcc$(EXEEXT) -C $< > $@ || rm -f $@

## version rules
version.c: version.c.in $(top_builddir)/.version
	$(AM_V_GEN) PATH="$(top_builddir)/build-aux:$${PATH}" \
		yuck$(EXEEXT) scmver --ignore-noscm --force -o $@ \
			--use-reference --reference $(top_builddir)/.version $<

## yuck rule
SUFFIXES += .yuck
SUFFIXES += .yucc
.yuck.yucc:
	$(AM_V_GEN) PATH="$(top_builddir)/build-aux:$${PATH}" \
		yuck$(EXEEXT) gen -o $@ $<

## gperf rule
SUFFIXES += .gperf
.gperf.c:
	$(AM_V_GEN) $(GPERF) -L ANSI-C $< --output-file $@

## tzmap rules
SUFFIXES += .tzminfo
SUFFIXES += .tzmap
SUFFIXES += .tzmcc

TZMAP_URL := https://raw.github.com/hroptatyr/dateutils/tzmaps
.tzminfo.tzmap:
	-$(AM_V_DL) curl -qgskfLO -D "$*.hdr" "$(TZMAP_URL)/$@" \
		|| { echo "Cannot download latest tzmaps:" >&2; \
			cat "$*.hdr" >&2; \
			echo -e "\n\
You can download them from  https://github.com/hroptatyr/dateutils/tree/tzmaps\n\
or if you happen to use the git repository copy them rom the tzmaps branch\n\
and put them into $(abs_builddir).\n\
\n" >&2; }
	-@$(RM) -- "$*.hdr"

.tzmap.tzmcc:
	-$(AM_V_GEN) $(builddir)/tzmap cc -e -o $@ $<

## make sure installing the tzmaps isn't fatal either
.IGNORE: install-pkgdataDATA

## for dist or distcheck we need libdut.a
dist-hook: $(noinst_LIBRARIES)

# 
# Help the developers get nice post-processed source files

## Create preprocessor output (debugging purposes only)
.c.i:
	$(COMPILE) -E -o $@ $<

## Create assembler output (debugging purposes only)
.c.s:
	$(COMPILE) -S -c $(AM_CFLAGS) $<

## Run Clang static analyzer over sources.
anal: $(SOURCES)
	@list='$(SOURCES)'; \
	result=0; \
	for file in $$list; do \
		if echo $$file | grep '\.c$$' >/dev/null 2>&1; then \
			echo "Analyzing $$file"; \
			$(ANALYZE_COMMAND) $(srcdir)/$$file; \
			status=$$?; \
			if test $$status != 0; then \
				result=1; \
			fi; \
		fi; \
	done; \
	set -e; exit $$result