2 An <assert.h> and static_assert that are like C23.
15 gl_CONDITIONAL_HEADER([assert.h])
19 BUILT_SOURCES += $(ASSERT_H)
21 # We need the following in order to create <assert.h> when the system
22 # doesn't have one that works with the given compiler.
23 if GL_GENERATE_ASSERT_H
24 assert.h: assert.in.h verify.h $(top_builddir)/config.status
25 @NMD@ $(AM_V_GEN)$(MKDIR_P) '%reldir%'
26 $(gl_V_at){ $(SED_HEADER_STDOUT) \
27 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
28 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
29 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
30 -e 's|@''NEXT_ASSERT_H''@|$(NEXT_ASSERT_H)|g' \
31 < $(srcdir)/assert.in.h && \
32 sed -e '/@assert.h omit start@/,/@assert.h omit end@/d' \
33 -e 's|_gl_verify|_gl_static_assert|g' \
34 -e 's|_GL_VERIFY|_GL_STATIC_ASSERT|g' \
35 -e 's|_GL\(_STATIC_ASSERT_H\)|_${gl_include_guard_prefix}\1|g' \
36 < $(srcdir)/verify.h; \
40 assert.h: $(top_builddir)/config.status
43 MOSTLYCLEANFILES += assert.h assert.h-t