1 # Makefile for gnuplot related targets
2 # (c) 2012 felix salfelder
11 # return {4..5}:{{1..3},5,{8..9}}:{3..3}
14 l
=""; rbr
=""; lbr
=""; \
15 IFS
=,; b
=$$rowi; a
=($$b); unset IFS
; \
16 for i in
$${a
[*]}; do \
17 IFS
=-; j
=($$i); unset IFS
;\
19 last
=`expr $${#j[*]} - 1`; \
20 S
=$$( seq
-s
, $${j
[0]} $${j
[$$last]} );\
21 S
={$${j
[0]}..
$${j
[$$last]}};\
23 rowlist_
=$$lbr$$l$$rbr; \
24 comma
=","; lbr
="{"; rbr
="}"; \
29 $(shell echo processing
$(1)>&2; \
31 pscols_tmp
=$$( echo
$(1) | sed
-r
's/[^.]*((\.[0-9,-]+)+).*/\1/'); \
32 echo cols_raw
$$pscols_tmp>&2; \
33 IFS
=.
; C
=($$pscols_tmp); unset IFS
;\
34 echo cols_raw
$${C
[*]}>&2; \
36 for rowi in
$${C
[*]}; do \
37 rowlist_
=; $(rowlist_sh
) \
38 ret
=$$ret$$colon$$rowlist_; \
43 sourcepattern
='s/\(\(^\.\)*\)\.[0-9]\+\(\.[0-9,-]\+\)\+/\1.out/'
47 %.ps
: $$(shell echo
% | sed
-e
$(sourcepattern
) )
49 head
-n1
$< | grep
'^[0-9\.Ee \t]*$$' >/dev
/null
; \
50 [[ $$?
= 0 ]] || CH
="set key autotitle columnhead;"; \
51 [[ $* =~
[^.
]*\.
[0-9]\.
[0-9]\.
[0-9] ]] && S
=s
; \
52 IFS
=,; spl
=$*; a
=($$spl); unset IFS
; \
54 pscols_
=$$(eval echo
"\'$<\'\ using\ $(call do_pscols2,$(notdir $*))\,"); \
55 pscols_
=$${pscols_
%,} ; \
56 echo
-e
"set style ${STYLE}; \n \
58 set datafile commentschars \"\" \n \
59 set terminal postscript ${ORIENT} enhanced ${COLOR} dashed lw ${LW} 'Helvetica' 14; \n \
60 ${ECMD} set output '$@'; \n \
61 $${S}plot $$pscols_" |
$(GNUPLOT
)