On Fri, Jul 27, 2012 at 1:05 PM, <tmpsan...@gmail.com> wrote:
> From: "Thiago Marcos P. Santos" <thiago.san...@intel.com>
>
> libseccomp should not assume the existence of the prefix and library
> directory since it can be an empty directory to be user for testing.
> The best we can do is check if the destination path is a file.
>
> We should also create the pkgconfig directory other "install" will
> install as file name pkgconfig and not inside the folder.
>
> Signed-off-by: Thiago Marcos P. Santos <thiago.san...@intel.com>
> ---
> Makefile | 1 +
> configure | 4 ++--
> macros.mk | 2 +-
> 3 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 8c414d4..b1292a0 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -85,6 +85,7 @@ tools: src
>
> install: $(SUBDIRS_BUILD)
> @$(ECHO) "INFO: installing in $(INSTALL_PREFIX) ..."
> + @$(MKDIR) $(INSTALL_LIB_DIR)/pkgconfig
> $(INSTALL_MACRO) libseccomp.pc $(INSTALL_LIB_DIR)/pkgconfig
> @for dir in $(SUBDIRS_INSTALL); do \
> $(ECHO) "INFO: installing from $$dir/"; \
> diff --git a/configure b/configure
> index 8ac0b75..d68fa47 100755
> --- a/configure
> +++ b/configure
> @@ -188,14 +188,14 @@ while [[ $# -gt 0 ]]; do
> done
>
> # validate the options
> -if [[ ! -d $opt_prefix ]]; then
> +if [[ -r $opt_prefix ]]; then
>
Ooops, it should be -f here.
> msg_error "install prefix ($opt_prefix) is not a directory"
> exit 1
> fi
> if [[ -z $opt_libdir ]]; then
> opt_libdir="$opt_prefix/lib"
> fi
> -if [[ ! -d $opt_libdir ]]; then
> +if [[ -r $opt_libdir ]]; then
>
Ditto.
> msg_error "libdir ($opt_libdir) is not a directory"
> exit 1
> fi
> diff --git a/macros.mk b/macros.mk
> index 5998010..5ecccca 100644
> --- a/macros.mk
> +++ b/macros.mk
> @@ -58,7 +58,7 @@ MV ?= mv
> CAT ?= cat
> ECHO ?= echo
> TAR ?= tar
> -MKDIR ?= mkdir
> +MKDIR ?= mkdir -p
>
> SED ?= sed
> AWK ?= awk
> --
> 1.7.9.5
>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
libseccomp-discuss mailing list
libseccomp-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libseccomp-discuss