Skip to content

Commit

Permalink
gnulib: import fnmatch module from gnulib
Browse files Browse the repository at this point in the history
  • Loading branch information
hirooih committed Jul 29, 2021
1 parent 60c299b commit a939078
Show file tree
Hide file tree
Showing 38 changed files with 5,220 additions and 0 deletions.
287 changes: 287 additions & 0 deletions gnulib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
# --no-libtool \
# --macro-prefix=gl \
# --no-vc-files \
# fnmatch \
# regex

AUTOMAKE_OPTIONS = 1.11 gnits subdir-objects
Expand Down Expand Up @@ -70,6 +71,29 @@ HAVE_INCLUDE_NEXT = (__GNUC__ || __clang__ || 60000000 <= __DECC_VER)

## end gnulib module absolute-header

## begin gnulib module alloca-opt

BUILT_SOURCES += $(ALLOCA_H)

# We need the following in order to create <alloca.h> when the system
# doesn't have one that works with the given compiler.
if GL_GENERATE_ALLOCA_H
alloca.h: alloca.in.h $(top_builddir)/config.status
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''HAVE_ALLOCA_H''@|$(HAVE_ALLOCA_H)|g' < $(srcdir)/alloca.in.h; \
} > $@-t && \
mv -f $@-t $@
else
alloca.h: $(top_builddir)/config.status
rm -f $@
endif
MOSTLYCLEANFILES += alloca.h alloca.h-t

EXTRA_DIST += alloca.in.h

## end gnulib module alloca-opt

## begin gnulib module attribute


Expand All @@ -86,6 +110,33 @@ EXTRA_libgnu_a_SOURCES += btowc.c

## end gnulib module btowc

## begin gnulib module ctype

BUILT_SOURCES += ctype.h

# We need the following in order to create <ctype.h> when the system
# doesn't have one that works with the given compiler.
ctype.h: ctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|GL|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_CTYPE_H''@|$(NEXT_CTYPE_H)|g' \
-e 's/@''GNULIB_ISBLANK''@/$(GL_GNULIB_ISBLANK)/g' \
-e 's/@''HAVE_ISBLANK''@/$(HAVE_ISBLANK)/g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
< $(srcdir)/ctype.in.h; \
} > $@-t && \
mv $@-t $@
MOSTLYCLEANFILES += ctype.h ctype.h-t

EXTRA_DIST += ctype.in.h

## end gnulib module ctype

## begin gnulib module dynarray

BUILT_SOURCES += malloc/dynarray.gl.h malloc/dynarray-skeleton.gl.h
Expand Down Expand Up @@ -122,6 +173,56 @@ EXTRA_libgnu_a_SOURCES += malloc/dynarray-skeleton.c

## end gnulib module dynarray

## begin gnulib module flexmember


EXTRA_DIST += flexmember.h

## end gnulib module flexmember

## begin gnulib module fnmatch


EXTRA_DIST += fnmatch.c fnmatch_loop.c

EXTRA_libgnu_a_SOURCES += fnmatch.c fnmatch_loop.c

## end gnulib module fnmatch

## begin gnulib module fnmatch-h

BUILT_SOURCES += $(FNMATCH_H)

# We need the following in order to create <fnmatch.h>.
if GL_GENERATE_FNMATCH_H
fnmatch.h: fnmatch.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''GUARD_PREFIX''@|GL|g' \
-e 's|@''HAVE_FNMATCH_H''@|$(HAVE_FNMATCH_H)|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_FNMATCH_H''@|$(NEXT_FNMATCH_H)|g' \
-e 's/@''GNULIB_FNMATCH''@/$(GL_GNULIB_FNMATCH)/g' \
-e 's|@''HAVE_FNMATCH''@|$(HAVE_FNMATCH)|g' \
-e 's|@''REPLACE_FNMATCH''@|$(REPLACE_FNMATCH)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
< $(srcdir)/fnmatch.in.h; \
} > $@-t && \
mv $@-t $@
else
fnmatch.h: $(top_builddir)/config.status
rm -f $@
endif
MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t

EXTRA_DIST += fnmatch.in.h

## end gnulib module fnmatch-h

## begin gnulib module hard-locale

libgnu_a_SOURCES += hard-locale.c
Expand All @@ -130,6 +231,12 @@ EXTRA_DIST += hard-locale.h

## end gnulib module hard-locale

## begin gnulib module idx

libgnu_a_SOURCES += idx.h

## end gnulib module idx

## begin gnulib module intprops


Expand Down Expand Up @@ -180,6 +287,15 @@ EXTRA_DIST += inttypes.in.h

## end gnulib module inttypes-incomplete

## begin gnulib module isblank


EXTRA_DIST += isblank.c

EXTRA_libgnu_a_SOURCES += isblank.c

## end gnulib module isblank

## begin gnulib module langinfo

BUILT_SOURCES += langinfo.h
Expand Down Expand Up @@ -332,6 +448,15 @@ EXTRA_libgnu_a_SOURCES += mbsinit.c

## end gnulib module mbsinit

## begin gnulib module mbsrtowcs


EXTRA_DIST += mbsrtowcs-impl.h mbsrtowcs-state.c mbsrtowcs.c

EXTRA_libgnu_a_SOURCES += mbsrtowcs-state.c mbsrtowcs.c

## end gnulib module mbsrtowcs

## begin gnulib module mbtowc


Expand All @@ -341,6 +466,24 @@ EXTRA_libgnu_a_SOURCES += mbtowc.c

## end gnulib module mbtowc

## begin gnulib module memchr


EXTRA_DIST += memchr.c memchr.valgrind

EXTRA_libgnu_a_SOURCES += memchr.c

## end gnulib module memchr

## begin gnulib module mempcpy


EXTRA_DIST += mempcpy.c

EXTRA_libgnu_a_SOURCES += mempcpy.c

## end gnulib module mempcpy

## begin gnulib module nl_langinfo


Expand Down Expand Up @@ -672,6 +815,132 @@ EXTRA_DIST += streq.h

## end gnulib module streq

## begin gnulib module string

BUILT_SOURCES += string.h

# We need the following in order to create <string.h> when the system
# doesn't have one that works with the given compiler.
string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''GUARD_PREFIX''@|GL|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
-e 's/@''GNULIB_EXPLICIT_BZERO''@/$(GL_GNULIB_EXPLICIT_BZERO)/g' \
-e 's/@''GNULIB_FFSL''@/$(GL_GNULIB_FFSL)/g' \
-e 's/@''GNULIB_FFSLL''@/$(GL_GNULIB_FFSLL)/g' \
-e 's/@''GNULIB_MBSLEN''@/$(GL_GNULIB_MBSLEN)/g' \
-e 's/@''GNULIB_MBSNLEN''@/$(GL_GNULIB_MBSNLEN)/g' \
-e 's/@''GNULIB_MBSCHR''@/$(GL_GNULIB_MBSCHR)/g' \
-e 's/@''GNULIB_MBSRCHR''@/$(GL_GNULIB_MBSRCHR)/g' \
-e 's/@''GNULIB_MBSSTR''@/$(GL_GNULIB_MBSSTR)/g' \
-e 's/@''GNULIB_MBSCASECMP''@/$(GL_GNULIB_MBSCASECMP)/g' \
-e 's/@''GNULIB_MBSNCASECMP''@/$(GL_GNULIB_MBSNCASECMP)/g' \
-e 's/@''GNULIB_MBSPCASECMP''@/$(GL_GNULIB_MBSPCASECMP)/g' \
-e 's/@''GNULIB_MBSCASESTR''@/$(GL_GNULIB_MBSCASESTR)/g' \
-e 's/@''GNULIB_MBSCSPN''@/$(GL_GNULIB_MBSCSPN)/g' \
-e 's/@''GNULIB_MBSPBRK''@/$(GL_GNULIB_MBSPBRK)/g' \
-e 's/@''GNULIB_MBSSPN''@/$(GL_GNULIB_MBSSPN)/g' \
-e 's/@''GNULIB_MBSSEP''@/$(GL_GNULIB_MBSSEP)/g' \
-e 's/@''GNULIB_MBSTOK_R''@/$(GL_GNULIB_MBSTOK_R)/g' \
-e 's/@''GNULIB_MEMCHR''@/$(GL_GNULIB_MEMCHR)/g' \
-e 's/@''GNULIB_MEMMEM''@/$(GL_GNULIB_MEMMEM)/g' \
-e 's/@''GNULIB_MEMPCPY''@/$(GL_GNULIB_MEMPCPY)/g' \
-e 's/@''GNULIB_MEMRCHR''@/$(GL_GNULIB_MEMRCHR)/g' \
-e 's/@''GNULIB_RAWMEMCHR''@/$(GL_GNULIB_RAWMEMCHR)/g' \
-e 's/@''GNULIB_STPCPY''@/$(GL_GNULIB_STPCPY)/g' \
-e 's/@''GNULIB_STPNCPY''@/$(GL_GNULIB_STPNCPY)/g' \
-e 's/@''GNULIB_STRCHRNUL''@/$(GL_GNULIB_STRCHRNUL)/g' \
-e 's/@''GNULIB_STRDUP''@/$(GL_GNULIB_STRDUP)/g' \
-e 's/@''GNULIB_STRNCAT''@/$(GL_GNULIB_STRNCAT)/g' \
-e 's/@''GNULIB_STRNDUP''@/$(GL_GNULIB_STRNDUP)/g' \
-e 's/@''GNULIB_STRNLEN''@/$(GL_GNULIB_STRNLEN)/g' \
-e 's/@''GNULIB_STRPBRK''@/$(GL_GNULIB_STRPBRK)/g' \
-e 's/@''GNULIB_STRSEP''@/$(GL_GNULIB_STRSEP)/g' \
-e 's/@''GNULIB_STRSTR''@/$(GL_GNULIB_STRSTR)/g' \
-e 's/@''GNULIB_STRCASESTR''@/$(GL_GNULIB_STRCASESTR)/g' \
-e 's/@''GNULIB_STRTOK_R''@/$(GL_GNULIB_STRTOK_R)/g' \
-e 's/@''GNULIB_STRERROR''@/$(GL_GNULIB_STRERROR)/g' \
-e 's/@''GNULIB_STRERROR_R''@/$(GL_GNULIB_STRERROR_R)/g' \
-e 's/@''GNULIB_STRERRORNAME_NP''@/$(GL_GNULIB_STRERRORNAME_NP)/g' \
-e 's/@''GNULIB_SIGABBREV_NP''@/$(GL_GNULIB_SIGABBREV_NP)/g' \
-e 's/@''GNULIB_SIGDESCR_NP''@/$(GL_GNULIB_SIGDESCR_NP)/g' \
-e 's/@''GNULIB_STRSIGNAL''@/$(GL_GNULIB_STRSIGNAL)/g' \
-e 's/@''GNULIB_STRVERSCMP''@/$(GL_GNULIB_STRVERSCMP)/g' \
-e 's/@''GNULIB_MDA_MEMCCPY''@/$(GL_GNULIB_MDA_MEMCCPY)/g' \
-e 's/@''GNULIB_MDA_STRDUP''@/$(GL_GNULIB_MDA_STRDUP)/g' \
< $(srcdir)/string.in.h | \
sed -e 's|@''HAVE_EXPLICIT_BZERO''@|$(HAVE_EXPLICIT_BZERO)|g' \
-e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
-e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
-e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
-e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
-e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
-e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
-e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \
-e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \
-e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
-e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \
-e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \
-e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \
-e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \
-e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \
-e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \
-e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
-e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
-e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \
-e 's|@''HAVE_STRERRORNAME_NP''@|$(HAVE_STRERRORNAME_NP)|g' \
-e 's|@''HAVE_SIGABBREV_NP''@|$(HAVE_SIGABBREV_NP)|g' \
-e 's|@''HAVE_SIGDESCR_NP''@|$(HAVE_SIGDESCR_NP)|g' \
-e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
-e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \
-e 's|@''REPLACE_FFSLL''@|$(REPLACE_FFSLL)|g' \
-e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
-e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
-e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
-e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \
-e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
-e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \
-e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \
-e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \
-e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
-e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \
-e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
-e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
-e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \
-e 's|@''REPLACE_STRERRORNAME_NP''@|$(REPLACE_STRERRORNAME_NP)|g' \
-e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
-e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
< $(srcdir)/string.in.h; \
} > $@-t && \
mv $@-t $@
MOSTLYCLEANFILES += string.h string.h-t

EXTRA_DIST += string.in.h

## end gnulib module string

## begin gnulib module strnlen


EXTRA_DIST += strnlen.c

EXTRA_libgnu_a_SOURCES += strnlen.c

## end gnulib module strnlen

## begin gnulib module strnlen1

libgnu_a_SOURCES += strnlen1.h strnlen1.c

## end gnulib module strnlen1

## begin gnulib module sys_types

BUILT_SOURCES += sys/types.h
Expand Down Expand Up @@ -1138,6 +1407,24 @@ EXTRA_libgnu_a_SOURCES += windows-rwlock.c

## end gnulib module windows-rwlock

## begin gnulib module wmemchr


EXTRA_DIST += wmemchr-impl.h wmemchr.c

EXTRA_libgnu_a_SOURCES += wmemchr.c

## end gnulib module wmemchr

## begin gnulib module wmempcpy


EXTRA_DIST += wmempcpy.c

EXTRA_libgnu_a_SOURCES += wmempcpy.c

## end gnulib module wmempcpy


mostlyclean-local: mostlyclean-generic
@for dir in '' $(MOSTLYCLEANDIRS); do \
Expand Down
Loading

0 comments on commit a939078

Please sign in to comment.