Skip to content

Commit 08e01d9

Browse files
committed
tools/ffmpeg-sg: Include show-graph wrapper script in build output
Signed-off-by: softworkz <[email protected]>
1 parent e7f6cd1 commit 08e01d9

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
/.config
3333
/.version
3434
/ffmpeg
35+
/ffmpeg-sg
3536
/ffplay
3637
/ffprobe
3738
/config.asm

fftools/Makefile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ AVPROGS-$(CONFIG_FFPROBE) += ffprobe
55
AVPROGS := $(AVPROGS-yes:%=%$(PROGSSUF)$(EXESUF))
66
PROGS += $(AVPROGS)
77

8+
FFMPEG_SG_SCRIPT = $(SRC_PATH)/tools/ffmpeg-sg$(if $(filter .exe,$(EXESUF)),.cmd)
9+
FFMPEG_SG_TARGET = ffmpeg-sg$(EXESUF)
10+
FFMPEG_SG_ENABLED = $(and $(filter $(CONFIG_FFMPEG),yes),$(or $(filter $(target_os),win32),$(if $(target_os),,yes)))
11+
FFMPEG_SG_FILES = $(if $(FFMPEG_SG_ENABLED),$(FFMPEG_SG_TARGET))
12+
813
AVBASENAMES = ffmpeg ffplay ffprobe
914
ALLAVPROGS = $(AVBASENAMES:%=%$(PROGSSUF)$(EXESUF))
1015
ALLAVPROGS_G = $(AVBASENAMES:%=%$(PROGSSUF)_g$(EXESUF))
@@ -67,7 +72,10 @@ endef
6772

6873
$(foreach P,$(AVPROGS-yes),$(eval $(call DOFFTOOL,$(P))))
6974

70-
all: $(AVPROGS)
75+
all: $(AVPROGS) $(FFMPEG_SG_FILES)
76+
77+
$(FFMPEG_SG_TARGET): $(FFMPEG_SG_SCRIPT)
78+
$(Q)$(CP) -p $(FFMPEG_SG_SCRIPT) $(FFMPEG_SG_TARGET)
7179

7280
fftools/ffprobe.o fftools/cmdutils.o: libavutil/ffversion.h | fftools
7381
OUTDIRS += fftools
@@ -85,11 +93,13 @@ install-progs-$(CONFIG_SHARED): install-libs
8593
install-progs: install-progs-yes $(AVPROGS)
8694
$(Q)mkdir -p "$(BINDIR)"
8795
$(INSTALL) -c -m 755 $(AVPROGS) "$(BINDIR)"
96+
$(if $(FFMPEG_SG_FILES),$(INSTALL) -c -m 755 $(FFMPEG_SG_FILES) "$(BINDIR)")
8897

8998
uninstall: uninstall-progs
9099

91100
uninstall-progs:
92101
$(RM) $(addprefix "$(BINDIR)/", $(ALLAVPROGS))
102+
$(if $(FFMPEG_SG_FILES),$(RM) "$(BINDIR)/$(FFMPEG_SG_FILES)")
93103

94104
clean::
95-
$(RM) $(ALLAVPROGS) $(ALLAVPROGS_G) $(CLEANSUFFIXES:%=fftools/%) $(CLEANSUFFIXES:%=fftools/graph/%) $(CLEANSUFFIXES:%=fftools/textformat/%)
105+
$(RM) $(ALLAVPROGS) $(ALLAVPROGS_G) $(CLEANSUFFIXES:%=fftools/%) $(CLEANSUFFIXES:%=fftools/graph/%) $(CLEANSUFFIXES:%=fftools/textformat/%) $(FFMPEG_SG_FILES)

0 commit comments

Comments
 (0)