Re: [FFmpeg-devel] [PATCH v2] build: add install targets for the examples

2017-10-05 Thread James Almer
On 10/5/2017 3:10 AM, Clément Bœsch wrote:
> On Thu, Oct 05, 2017 at 12:55:19AM -0300, James Almer wrote:
>> Split it off from install-data.
>>
>> Among other things, this prevents spamming triplicate log lines during 
>> install.
>>
>> Signed-off-by: James Almer 
>> ---
>> Updated to apply after a recent merge.
>>
>>  Makefile  |  6 ++
>>  doc/examples/Makefile | 14 +-
>>  2 files changed, 15 insertions(+), 5 deletions(-)
>>
>> diff --git a/Makefile b/Makefile
>> index 3007da50f7..4a1253a052 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -120,11 +120,9 @@ install: install-libs install-headers
>>  
>>  install-libs: install-libs-yes
>>  
>> -install-data: $(DATA_FILES) $(EXAMPLES_FILES) $(EXAMPLE_MAKEFILE)
>> -$(Q)mkdir -p "$(DATADIR)/examples"
>> +install-data: $(DATA_FILES)
>> +$(Q)mkdir -p "$(DATADIR)"
>>  $(INSTALL) -m 644 $(DATA_FILES) "$(DATADIR)"
>> -$(INSTALL) -m 644 $(EXAMPLES_FILES) "$(DATADIR)/examples"
>> -$(INSTALL) -m 644 $(EXAMPLE_MAKEFILE:%=%.example) 
>> "$(DATADIR)/examples/Makefile"
>>  
>>  uninstall: uninstall-libs uninstall-headers uninstall-data
>>  
>> diff --git a/doc/examples/Makefile b/doc/examples/Makefile
>> index af000d9ddb..58afd71b85 100644
>> --- a/doc/examples/Makefile
>> +++ b/doc/examples/Makefile
>> @@ -26,8 +26,8 @@ ALL_EXAMPLES   := $(EXAMPLES) 
>> $(EXAMPLES-:%=doc/examples/%$(PROGSSUF)$(EXESUF))
>>  ALL_EXAMPLES_G := $(EXAMPLES_G) 
>> $(EXAMPLES-:%=doc/examples/%$(PROGSSUF)_g$(EXESUF))
>>  PROGS  += $(EXAMPLES)
>>  
>> -EXAMPLES_FILES := $(wildcard $(SRC_PATH)/doc/examples/*.c) 
>> $(SRC_PATH)/doc/examples/README
>>  EXAMPLE_MAKEFILE := $(SRC_PATH)/doc/examples/Makefile
>> +EXAMPLES_FILES := $(wildcard $(SRC_PATH)/doc/examples/*.c) 
>> $(SRC_PATH)/doc/examples/README $(EXAMPLE_MAKEFILE)
>>  
>>  $(foreach P,$(EXAMPLES),$(eval OBJS-$(P:%$(PROGSSUF)$(EXESUF)=%) = 
>> $(P:%$(PROGSSUF)$(EXESUF)=%).o))
>>  $(EXAMPLES_G): %$(PROGSSUF)_g$(EXESUF): %.o
>> @@ -39,6 +39,18 @@ OBJDIRS += doc/examples
>>  
>>  DOXY_INPUT += $(EXAMPLES:%$(PROGSSUF)$(EXESUF)=%.c)
>>  
>> +install: install-examples
>> +
>> +install-examples: $(EXAMPLES_FILES)
> 
>> +$(Q)mkdir -p "$(DATADIR)/examples"
> 
> I think you're supposed to use $(INSTALL) -d

We use "mkdir -p" on every other install target (including install-data
where this comes from), so I'd rather not change that here.

> 
> [...]
> 
> Rest should be fine

Pushed, thanks.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH v2] build: add install targets for the examples

2017-10-05 Thread Clément Bœsch
On Thu, Oct 05, 2017 at 12:55:19AM -0300, James Almer wrote:
> Split it off from install-data.
> 
> Among other things, this prevents spamming triplicate log lines during 
> install.
> 
> Signed-off-by: James Almer 
> ---
> Updated to apply after a recent merge.
> 
>  Makefile  |  6 ++
>  doc/examples/Makefile | 14 +-
>  2 files changed, 15 insertions(+), 5 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 3007da50f7..4a1253a052 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -120,11 +120,9 @@ install: install-libs install-headers
>  
>  install-libs: install-libs-yes
>  
> -install-data: $(DATA_FILES) $(EXAMPLES_FILES) $(EXAMPLE_MAKEFILE)
> - $(Q)mkdir -p "$(DATADIR)/examples"
> +install-data: $(DATA_FILES)
> + $(Q)mkdir -p "$(DATADIR)"
>   $(INSTALL) -m 644 $(DATA_FILES) "$(DATADIR)"
> - $(INSTALL) -m 644 $(EXAMPLES_FILES) "$(DATADIR)/examples"
> - $(INSTALL) -m 644 $(EXAMPLE_MAKEFILE:%=%.example) 
> "$(DATADIR)/examples/Makefile"
>  
>  uninstall: uninstall-libs uninstall-headers uninstall-data
>  
> diff --git a/doc/examples/Makefile b/doc/examples/Makefile
> index af000d9ddb..58afd71b85 100644
> --- a/doc/examples/Makefile
> +++ b/doc/examples/Makefile
> @@ -26,8 +26,8 @@ ALL_EXAMPLES   := $(EXAMPLES) 
> $(EXAMPLES-:%=doc/examples/%$(PROGSSUF)$(EXESUF))
>  ALL_EXAMPLES_G := $(EXAMPLES_G) 
> $(EXAMPLES-:%=doc/examples/%$(PROGSSUF)_g$(EXESUF))
>  PROGS  += $(EXAMPLES)
>  
> -EXAMPLES_FILES := $(wildcard $(SRC_PATH)/doc/examples/*.c) 
> $(SRC_PATH)/doc/examples/README
>  EXAMPLE_MAKEFILE := $(SRC_PATH)/doc/examples/Makefile
> +EXAMPLES_FILES := $(wildcard $(SRC_PATH)/doc/examples/*.c) 
> $(SRC_PATH)/doc/examples/README $(EXAMPLE_MAKEFILE)
>  
>  $(foreach P,$(EXAMPLES),$(eval OBJS-$(P:%$(PROGSSUF)$(EXESUF)=%) = 
> $(P:%$(PROGSSUF)$(EXESUF)=%).o))
>  $(EXAMPLES_G): %$(PROGSSUF)_g$(EXESUF): %.o
> @@ -39,6 +39,18 @@ OBJDIRS += doc/examples
>  
>  DOXY_INPUT += $(EXAMPLES:%$(PROGSSUF)$(EXESUF)=%.c)
>  
> +install: install-examples
> +
> +install-examples: $(EXAMPLES_FILES)

> + $(Q)mkdir -p "$(DATADIR)/examples"

I think you're supposed to use $(INSTALL) -d

[...]

Rest should be fine

-- 
Clément B.


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH v2] build: add install targets for the examples

2017-10-04 Thread James Almer
Split it off from install-data.

Among other things, this prevents spamming triplicate log lines during install.

Signed-off-by: James Almer 
---
Updated to apply after a recent merge.

 Makefile  |  6 ++
 doc/examples/Makefile | 14 +-
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index 3007da50f7..4a1253a052 100644
--- a/Makefile
+++ b/Makefile
@@ -120,11 +120,9 @@ install: install-libs install-headers
 
 install-libs: install-libs-yes
 
-install-data: $(DATA_FILES) $(EXAMPLES_FILES) $(EXAMPLE_MAKEFILE)
-   $(Q)mkdir -p "$(DATADIR)/examples"
+install-data: $(DATA_FILES)
+   $(Q)mkdir -p "$(DATADIR)"
$(INSTALL) -m 644 $(DATA_FILES) "$(DATADIR)"
-   $(INSTALL) -m 644 $(EXAMPLES_FILES) "$(DATADIR)/examples"
-   $(INSTALL) -m 644 $(EXAMPLE_MAKEFILE:%=%.example) 
"$(DATADIR)/examples/Makefile"
 
 uninstall: uninstall-libs uninstall-headers uninstall-data
 
diff --git a/doc/examples/Makefile b/doc/examples/Makefile
index af000d9ddb..58afd71b85 100644
--- a/doc/examples/Makefile
+++ b/doc/examples/Makefile
@@ -26,8 +26,8 @@ ALL_EXAMPLES   := $(EXAMPLES) 
$(EXAMPLES-:%=doc/examples/%$(PROGSSUF)$(EXESUF))
 ALL_EXAMPLES_G := $(EXAMPLES_G) 
$(EXAMPLES-:%=doc/examples/%$(PROGSSUF)_g$(EXESUF))
 PROGS  += $(EXAMPLES)
 
-EXAMPLES_FILES := $(wildcard $(SRC_PATH)/doc/examples/*.c) 
$(SRC_PATH)/doc/examples/README
 EXAMPLE_MAKEFILE := $(SRC_PATH)/doc/examples/Makefile
+EXAMPLES_FILES := $(wildcard $(SRC_PATH)/doc/examples/*.c) 
$(SRC_PATH)/doc/examples/README $(EXAMPLE_MAKEFILE)
 
 $(foreach P,$(EXAMPLES),$(eval OBJS-$(P:%$(PROGSSUF)$(EXESUF)=%) = 
$(P:%$(PROGSSUF)$(EXESUF)=%).o))
 $(EXAMPLES_G): %$(PROGSSUF)_g$(EXESUF): %.o
@@ -39,6 +39,18 @@ OBJDIRS += doc/examples
 
 DOXY_INPUT += $(EXAMPLES:%$(PROGSSUF)$(EXESUF)=%.c)
 
+install: install-examples
+
+install-examples: $(EXAMPLES_FILES)
+   $(Q)mkdir -p "$(DATADIR)/examples"
+   $(INSTALL) -m 644 $(EXAMPLES_FILES) "$(DATADIR)/examples"
+   $(INSTALL) -m 644 $(EXAMPLE_MAKEFILE:%=%.example) 
"$(DATADIR)/examples/Makefile"
+
+uninstall: uninstall-examples
+
+uninstall-examples:
+   $(RM) -r "$(DATADIR)/examples"
+
 examplesclean:
$(RM) $(ALL_EXAMPLES) $(ALL_EXAMPLES_G)
$(RM) $(CLEANSUFFIXES:%=doc/examples/%)
-- 
2.14.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel