build-sys: pylibmount, mount context is Linux only

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
This commit is contained in:
Ruediger Meier 2016-03-21 14:04:42 +01:00 committed by Karel Zak
parent 2eb6a7486e
commit a5b3be92c6
3 changed files with 10 additions and 2 deletions

View File

@ -12,8 +12,10 @@ pylibmount_la_SOURCES = \
libmount/python/pylibmount.c \
libmount/python/pylibmount.h \
libmount/python/fs.c \
libmount/python/tab.c \
libmount/python/context.c
libmount/python/tab.c
if LINUX
pylibmount_la_SOURCES += libmount/python/context.c
endif
pylibmount_la_LIBADD = libmount.la $(PYTHON_LIBS)

View File

@ -229,7 +229,9 @@ PyMODINIT_FUNC initpylibmount(void)
FS_AddModuleObject(m);
Table_AddModuleObject(m);
#ifdef __linux__
Context_AddModuleObject(m);
#endif
/*
* mount(8) userspace options masks (MNT_MAP_USERSPACE map)

View File

@ -94,6 +94,8 @@ extern void Table_AddModuleObject(PyObject *mod);
extern int pymnt_table_parser_errcb(struct libmnt_table *tb, const char *filename, int line);
#ifdef __linux__
/*
* context.c
*/
@ -108,6 +110,8 @@ typedef struct {
extern PyTypeObject ContextType;
extern void Context_AddModuleObject(PyObject *mod);
#endif /* __linux__ */
/*
* misc
*/