mirror of
https://github.com/envmodules/modules.git
synced 2026-06-14 00:42:43 +08:00
Add an utility library that supersedes the getgroups function from libc. The getgroups function from this added library always returns a list with 3 elements that all correspond to user's primary group. It is used for coverage test of the getgroups call made within the Envmodules_InitStateUsergroupsObjCmd function of the Tcl extension library.
59 lines
1.5 KiB
Makefile
59 lines
1.5 KiB
Makefile
.PHONY: clean distclean
|
|
|
|
CFLAGS_DEFAULT=@CFLAGS_DEFAULT@ @TCL_SHLIB_CFLAGS@
|
|
CFLAGS_WARNING=@CFLAGS_WARNING@
|
|
|
|
CC=@TCL_CC@
|
|
CFLAGS=@CFLAGS@ @TCL_INCLUDE_SPEC@
|
|
LDFLAGS=@LDFLAGS@
|
|
LD=@TCL_SHLIB_LD@ ${CFLAGS}
|
|
|
|
# apply specific flags to libtclenvmodules build if code coverage asked
|
|
ifeq ($(COVERAGE),y)
|
|
CFLAGS_COVERAGE=-coverage -O0
|
|
endif
|
|
|
|
libtclenvmodules@TCL_SHLIB_SUFFIX@: envmodules.c
|
|
$(LD) ${CFLAGS_COVERAGE} $< -o $@ @TCL_STUB_LIB_SPEC@
|
|
|
|
libtestutil-closedir@SHLIB_SUFFIX@: testutil-closedir.c
|
|
$(LD) $< -o $@
|
|
|
|
libtestutil-getpwuid@SHLIB_SUFFIX@: testutil-getpwuid.c
|
|
$(LD) $< -o $@
|
|
|
|
libtestutil-getgroups@SHLIB_SUFFIX@: testutil-getgroups.c
|
|
$(LD) $< -o $@
|
|
|
|
libtestutil-0getgroups@SHLIB_SUFFIX@: testutil-0getgroups.c
|
|
$(LD) $< -o $@
|
|
|
|
libtestutil-dupgetgroups@SHLIB_SUFFIX@: testutil-dupgetgroups.c
|
|
$(LD) $< -o $@
|
|
|
|
libtestutil-getgrgid@SHLIB_SUFFIX@: testutil-getgrgid.c
|
|
$(LD) $< -o $@
|
|
|
|
clean:
|
|
rm -f libtclenvmodules@TCL_SHLIB_SUFFIX@
|
|
rm -f libtestutil-closedir@SHLIB_SUFFIX@
|
|
rm -f libtestutil-getpwuid@SHLIB_SUFFIX@
|
|
rm -f libtestutil-getgroups@SHLIB_SUFFIX@
|
|
rm -f libtestutil-0getgroups@SHLIB_SUFFIX@
|
|
rm -f libtestutil-dupgetgroups@SHLIB_SUFFIX@
|
|
rm -f libtestutil-getgrgid@SHLIB_SUFFIX@
|
|
rm -f envmodules.c.gcov envmodules.gcda envmodules.gcno
|
|
|
|
distclean: clean
|
|
rm -f config.log config.status
|
|
rm -f config.h config.h.in~
|
|
rm -f Makefile
|
|
ifeq ($(wildcard ../.git),../.git)
|
|
rm configure
|
|
rm config.h.in
|
|
ifeq ($(wildcard autom4te.cache),autom4te.cache)
|
|
rm -f autom4te.cache/*
|
|
rmdir autom4te.cache
|
|
endif
|
|
endif
|