diff options
author | Paul Moore <pmoore@redhat.com> | 2013-01-28 16:11:30 -0500 |
---|---|---|
committer | Paul Moore <pmoore@redhat.com> | 2013-01-28 16:11:30 -0500 |
commit | 6e1c0839056e853f5503625d50b65a75294e6d25 (patch) | |
tree | 9f8810f0d1aee53d7a424dddc4addb14a5e373ee /include | |
parent | e6e6a278be9a922945e916df640665e7269e0269 (diff) | |
download | libseccomp-6e1c0839056e853f5503625d50b65a75294e6d25.tar.gz |
api: add an API to query version information
Signed-off-by: Paul Moore <pmoore@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/.gitignore | 1 | ||||
-rw-r--r-- | include/Makefile | 20 | ||||
-rw-r--r-- | include/seccomp.h.in (renamed from include/seccomp.h) | 8 |
3 files changed, 24 insertions, 5 deletions
diff --git a/include/.gitignore b/include/.gitignore new file mode 100644 index 0000000..57ec972 --- /dev/null +++ b/include/.gitignore @@ -0,0 +1 @@ +seccomp.h diff --git a/include/Makefile b/include/Makefile index 2cd0e56..aba3f71 100644 --- a/include/Makefile +++ b/include/Makefile @@ -33,15 +33,25 @@ include $(TOPDIR)/version_info.mk include $(TOPDIR)/configure.mk include $(TOPDIR)/install.mk +HDR_BUILD = seccomp.h + # # targets # -.PHONY: all install install_hdr - -all: +.PHONY: all install clean -install: install_hdr +all: $(HDR_BUILD) -install_hdr: seccomp.h +install: $(HDR_BUILD) $(INSTALL_INC_MACRO) + +seccomp.h: seccomp.h.in + @$(ECHO) " GEN $@" + $(CAT) $< | \ + $(SED) -e 's/%%VERSION_MAJOR%%/$(VERSION_MAJOR)/g' | \ + $(SED) -e 's/%%VERSION_MINOR%%/$(VERSION_MINOR)/g' | \ + $(SED) -e 's/%%VERSION_MICRO%%/$(VERSION_MICRO)/g' > $@ + +clean: + @$(RM) $(HDR_BUILD) diff --git a/include/seccomp.h b/include/seccomp.h.in index 8a70a72..b21205c 100644 --- a/include/seccomp.h +++ b/include/seccomp.h.in @@ -31,6 +31,14 @@ extern "C" { #endif /* + * version information + */ + +#define SCMP_VER_MAJOR %%VERSION_MAJOR%% +#define SCMP_VER_MINOR %%VERSION_MINOR%% +#define SCMP_VER_MICRO %%VERSION_MICRO%% + +/* * types */ |