File: function.defs

package info (click to toggle)
handbrake 1.6.1%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 26,924 kB
  • sloc: ansic: 111,120; sh: 3,024; python: 2,354; ruby: 1,635; makefile: 588; xml: 186; sed: 16; csh: 15
file content (24 lines) | stat: -rw-r--r-- 923 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
fn.ERROR1 = ERROR: $(1)
fn.ERROR2 = ERROR: $(1): $(2)

fn.HEADER = @echo "$(1): $(2)"
fn.DIVIDER = @echo "======================================================================"

fn.ABSOLUTE = $(if $(filter /%,$(1)),$(1),$(subst /./,/,$(CURDIR)/$(1)))

fn.ARGS = $(strip $(foreach a,$(2), \
    $($(1).$(patsubst !%,%,$(filter !%,$(a)))) \
    $(foreach x,$(patsubst ?%,%,$(filter ?%,$(a))),$(if $(filter 1,$($(1).$(x))),$($(1).args.$(x)))) \
    $(foreach x,$(patsubst .%,%,$(filter .%,$(a))),$($(1).args.$(x).$($(1).$(x)))) \
    $(foreach x,$(patsubst @%,%,$(filter @%,$(a))),$(if $($(1).$(x)),$(call $(1).args.$(x),$($(1).$(x))))) \
    $(foreach x,$(patsubst *%,%,$(filter *%,$(a))),$(foreach i,$($(1).$(x)),$(call $(1).args.$(x),$(i)))) \
    ))

fn.VARS = $(foreach v,$($(1).vars),$(v)="$($(1).vars.$(v))")

fn.TARGET = $(TARGET.$(2).prefix)$(1)$(TARGET.$(2).suffix)$(TARGET.$(2).ext)

define fn.PRINTLN
$(1)

endef