X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=modules%2Fselinux-h;h=e074e673f341bd3852c283d12dce4f911fc459d6;hb=533101a268dc5015a140ff4695d8eeb04fbe57b6;hp=b7b8d82b2995ff26f7721f08d547ea1419ea8d02;hpb=d62671f288e52669bb9de34f4ad4e5e694ab9bd3;p=gnulib.git diff --git a/modules/selinux-h b/modules/selinux-h index b7b8d82b2..e074e673f 100644 --- a/modules/selinux-h +++ b/modules/selinux-h @@ -2,44 +2,67 @@ Description: SELinux-related headers for systems that lack them. Files: +lib/getfilecon.c lib/se-context.in.h lib/se-selinux.in.h +lib/se-context.c +lib/se-selinux.c m4/selinux-context-h.m4 m4/selinux-selinux-h.m4 Depends-on: errno +extern-inline +snippet/unused-parameter configure.ac: gl_HEADERS_SELINUX_SELINUX_H gl_HEADERS_SELINUX_CONTEXT_H -AC_REQUIRE([AC_C_INLINE]) +if test "$with_selinux" != no && test "$ac_cv_header_selinux_selinux_h" = yes; then + AC_LIBOBJ([getfilecon]) +fi Makefile.am: -lib_SOURCES += se-context.in.h se-selinux.in.h - -BUILT_SOURCES += $(SELINUX_SELINUX_H) -selinux/selinux.h: se-selinux.in.h - rm -f $@-t $@ - $(MKDIR_P) selinux - cp $(srcdir)/se-selinux.in.h $@-t - chmod a-x $@-t +lib_SOURCES += se-context.in.h se-selinux.in.h se-context.c se-selinux.c + +BUILT_SOURCES += selinux/selinux.h +selinux/selinux.h: se-selinux.in.h $(top_builddir)/config.status $(UNUSED_PARAMETER_H) + $(AM_V_at)$(MKDIR_P) selinux + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|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_SELINUX_SELINUX_H''@|$(NEXT_SELINUX_SELINUX_H)|g' \ + -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \ + < $(srcdir)/se-selinux.in.h; \ + } > $@-t && \ + chmod a-x $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += selinux/selinux.h selinux/selinux.h-t BUILT_SOURCES += $(SELINUX_CONTEXT_H) -selinux/context.h: se-context.in.h - rm -f $@-t $@ - $(MKDIR_P) selinux - cp $(srcdir)/se-context.in.h $@-t - chmod a-x $@-t +if GL_GENERATE_SELINUX_CONTEXT_H +selinux/context.h: se-context.in.h $(top_builddir)/config.status $(UNUSED_PARAMETER_H) + $(AM_V_at)$(MKDIR_P) selinux + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \ + < $(srcdir)/se-context.in.h; \ + } > $@-t && \ + chmod a-x $@-t && \ mv $@-t $@ +else +selinux/context.h: $(top_builddir)/config.status + rm -f $@ +endif MOSTLYCLEANFILES += selinux/context.h selinux/context.h-t MOSTLYCLEANDIRS += selinux Include: -#include -#include + + Link: $(LIB_SELINUX)