[x264-devel] [PATCH 6/9] build: Reorganize 'install-lib-shared'

Diego Biurrun diego at biurrun.de
Sun Apr 27 20:39:42 CEST 2014


On Sat, Apr 26, 2014 at 05:45:20PM -0400, Stephen Hutchinson wrote:
> --- a/Makefile
> +++ b/Makefile
> @@ -267,14 +267,20 @@ install-static: $(LIBX264)
>  
> -install-lib-shared: lib-shared install-lib-dev
> +install-lib-shared: install-lib-dev install-shared install-implib
> +
> +install-shared: $(SONAME)
>  ifneq ($(IMPLIBNAME),)
>  	$(INSTALL) -d $(DESTDIR)$(bindir)
> -	$(INSTALL) -m 755 $(SONAME) $(DESTDIR)$(bindir)
> -	$(INSTALL) -m 644 $(IMPLIBNAME) $(DESTDIR)$(libdir)
> +	$(INSTALL) -m 755 $< $(DESTDIR)$(bindir)
>  else ifneq ($(SONAME),)
> -	ln -f -s $(SONAME) $(DESTDIR)$(libdir)/libx264.$(SOSUFFIX)
> -	$(INSTALL) -m 755 $(SONAME) $(DESTDIR)$(libdir)
> +	ln -f -s $< $(DESTDIR)$(libdir)/libx264.$(SOSUFFIX)
> +	$(INSTALL) -m 755 $< $(DESTDIR)$(libdir)
> +endif
> +
> +install-implib: $(IMPLIBNAME)
> +ifneq ($(IMPLIBNAME),)
> +	$(INSTALL) -m 644 $< $(DESTDIR)$(libdir)
>  endif

This adds an if, so it's uglier than before.

Instead, you could make the dependencies conditional; then you
can have recipes without conditionals.

Diego


More information about the x264-devel mailing list