1 MAKEFLAGS
:= --no-builtin-rules
4 PATH_TO_AWK
:= /usr
/bin
/awk
7 bin
/khatus_actuate_alert_to_notify_send \
8 bin
/khatus_actuate_device_add_to_automount \
9 bin
/khatus_actuate_status_bar_to_xsetroot_name \
10 bin
/khatus_gen_bar_make_status \
11 bin
/khatus_monitor_devices \
12 bin
/khatus_monitor_energy \
13 bin
/khatus_monitor_errors \
14 bin
/khatus_parse_bluetoothctl_show \
15 bin
/khatus_parse_df_pcent \
16 bin
/khatus_parse_fan_file \
17 bin
/khatus_parse_free \
18 bin
/khatus_parse_ip_addr \
19 bin
/khatus_parse_iwconfig \
20 bin
/khatus_parse_loadavg_file \
21 bin
/khatus_parse_noaa_api \
22 bin
/khatus_parse_mpd_status_currentsong \
23 bin
/khatus_parse_pactl_list_sinks \
25 bin
/khatus_parse_sys_block_stat \
26 bin
/khatus_parse_udevadm_monitor_block \
27 bin
/khatus_parse_upower
28 BASH_EXECUTABLE_NAMES
:= \
30 khatus_sensor_bluetooth \
31 khatus_sensor_bluetooth_power \
32 khatus_sensor_datetime \
33 khatus_sensor_devices \
34 khatus_sensor_disk_io \
35 khatus_sensor_disk_space \
36 khatus_sensor_energy \
38 khatus_sensor_loadavg \
39 khatus_sensor_memory \
41 khatus_sensor_net_addr_io \
42 khatus_sensor_net_carrier \
43 khatus_sensor_net_wifi_status \
45 khatus_sensor_screen_brightness \
46 khatus_sensor_temperature \
47 khatus_sensor_volume \
49 BASH_EXECUTABLES
:= $(foreach exe
,$(BASH_EXECUTABLE_NAMES
),bin
/$(exe
))
50 EXECUTABLES
:= $(AWK_EXECUTABLES
) $(BASH_EXECUTABLES
)
53 echo
'#! $(PATH_TO_AWK) -f' > $@
&& \
54 echo
'BEGIN {Node = Node ? Node : "$(shell hostname)"}' >> $@
&& \
55 echo
'BEGIN {Module = "$(notdir $@)"}' >> $@
&& \
65 define GEN_BASH_EXE_RULE
66 bin
/$(1) : src
/bash
/exe
/$(1).sh
82 @
$(foreach filename
,$(wildcard bin
/*),cp
-p
"$(filename)" "$(PREFIX)/$(filename)"; )
85 @
$(foreach filename
,$(wildcard $(PREFIX
)/bin
/khatus
*),rm "$(filename)"; )
101 #-----------------------------------------------------------------------------
103 #-----------------------------------------------------------------------------
104 $(foreach exe
,$(BASH_EXECUTABLE_NAMES
),$(eval
$(call GEN_BASH_EXE_RULE
,$(exe
))))
106 #-----------------------------------------------------------------------------
108 #-----------------------------------------------------------------------------
110 src
/awk
/exe
/bar.awk \
111 src
/awk
/lib
/cache.awk \
112 src
/awk
/lib
/str.awk \
113 src
/awk
/lib
/msg.awk \
117 bin
/khatus_actuate_alert_to_notify_send
: \
118 src
/awk
/exe
/actuate_alert_to_notify_send.awk \
119 src
/awk
/lib
/str.awk \
123 bin
/khatus_actuate_device_add_to_automount
: \
124 src
/awk
/exe
/actuate_device_add_to_automount.awk \
125 src
/awk
/lib
/str.awk \
129 bin
/khatus_actuate_status_bar_to_xsetroot_name
: \
130 src
/awk
/exe
/actuate_status_bar_to_xsetroot_name.awk \
131 src
/awk
/lib
/str.awk \
135 bin
/khatus_gen_bar_make_status
: \
136 src
/awk
/exe
/gen_bar_make_status.awk
139 bin
/khatus_monitor_devices
: \
140 src
/awk
/exe
/monitor_devices.awk \
141 src
/awk
/lib
/str.awk \
145 bin
/khatus_monitor_energy
: \
146 src
/awk
/exe
/monitor_energy.awk \
147 src
/awk
/lib
/str.awk \
148 src
/awk
/lib
/msg.awk \
152 bin
/khatus_monitor_errors
: \
153 src
/awk
/exe
/monitor_errors.awk \
154 src
/awk
/lib
/str.awk \
158 bin
/khatus_parse_bluetoothctl_show
: \
159 src
/awk
/exe
/parse_bluetoothctl_show.awk \
163 bin
/khatus_parse_df_pcent
: \
164 src
/awk
/exe
/parse_df_pcent.awk \
168 bin
/khatus_parse_fan_file
: \
169 src
/awk
/exe
/parse_fan_file.awk \
173 bin
/khatus_parse_free
: \
174 src
/awk
/exe
/parse_free.awk \
178 bin
/khatus_parse_ip_addr
: \
179 src
/awk
/exe
/parse_ip_addr.awk \
183 bin
/khatus_parse_iwconfig
: \
184 src
/awk
/exe
/parse_iwconfig.awk \
188 bin
/khatus_parse_loadavg_file
: \
189 src
/awk
/exe
/parse_loadavg_file.awk \
193 # Order of dependencies is important for khatus_parse_noaa_api!
194 # parse_hxpipe MUST appear before parse_noaa_api, because the order in
195 # which they match lines matters!
196 bin
/khatus_parse_noaa_api
: \
197 src
/awk
/lib
/parse_hxpipe.awk \
198 src
/awk
/exe
/parse_noaa_api.awk \
199 src
/awk
/lib
/msg.awk \
203 bin
/khatus_parse_mpd_status_currentsong
: \
204 src
/awk
/exe
/parse_mpd_status_currentsong.awk \
208 bin
/khatus_parse_pactl_list_sinks
: \
209 src
/awk
/exe
/parse_pactl_list_sinks.awk \
213 bin
/khatus_parse_ps
: \
214 src
/awk
/exe
/parse_ps.awk \
218 bin
/khatus_parse_sys_block_stat
: \
219 src
/awk
/exe
/parse_sys_block_stat.awk \
223 bin
/khatus_parse_udevadm_monitor_block
: \
224 src
/awk
/exe
/parse_udevadm_monitor_block.awk \
228 bin
/khatus_parse_upower
: \
229 src
/awk
/exe
/parse_upower.awk \