@@ -181,44 +181,41 @@ network_generator_sources = files('''
181181 generator/network-generator.h
182182''' .split())
183183
184- network_include_dir = [includes, include_directories ([' .' , ' netdev' , ' tc' ])]
184+ sources += custom_target (
185+ ' networkd-gperf.c' ,
186+ input : ' networkd-gperf.gperf' ,
187+ output : ' networkd-gperf.c' ,
188+ command : [gperf, ' @INPUT@' , ' --output-file' , ' @OUTPUT@' ])
185189
186- if conf.get(' ENABLE_NETWORKD' ) == 1
187- if get_option (' link-networkd-shared' )
188- networkd_link_with = [libshared]
189- else
190- networkd_link_with = [libsystemd_static,
191- libshared_static,
192- libbasic_gcrypt]
193- endif
190+ sources += custom_target (
191+ ' networkd-network-gperf.c' ,
192+ input : ' networkd-network-gperf.gperf' ,
193+ output : ' networkd-network-gperf.c' ,
194+ command : [gperf, ' @INPUT@' , ' --output-file' , ' @OUTPUT@' ])
194195
195- networkd_gperf_c = custom_target (
196- ' networkd -gperf.c' ,
197- input : ' networkd -gperf.gperf' ,
198- output : ' networkd -gperf.c' ,
199- command : [gperf, ' @INPUT@' , ' --output-file' , ' @OUTPUT@' ])
196+ sources + = custom_target (
197+ ' netdev -gperf.c' ,
198+ input : ' netdev/netdev -gperf.gperf' ,
199+ output : ' netdev -gperf.c' ,
200+ command : [gperf, ' @INPUT@' , ' --output-file' , ' @OUTPUT@' ])
200201
201- networkd_network_gperf_c = custom_target (
202- ' networkd-network-gperf.c' ,
203- input : ' networkd-network-gperf.gperf' ,
204- output : ' networkd-network-gperf.c' ,
205- command : [gperf, ' @INPUT@' , ' --output-file' , ' @OUTPUT@' ])
202+ if get_option (' link-networkd-shared' )
203+ networkd_link_with = [libshared]
204+ else
205+ networkd_link_with = [libsystemd_static,
206+ libshared_static,
207+ libbasic_gcrypt]
208+ endif
206209
207- netdev_gperf_c = custom_target (
208- ' netdev-gperf.c' ,
209- input : ' netdev/netdev-gperf.gperf' ,
210- output : ' netdev-gperf.c' ,
211- command : [gperf, ' @INPUT@' , ' --output-file' , ' @OUTPUT@' ])
210+ network_include_dir = [includes, include_directories ([' .' , ' netdev' , ' tc' ])]
212211
213- libnetworkd_core = static_library (
214- ' networkd-core' ,
215- sources,
216- networkd_gperf_c,
217- networkd_network_gperf_c,
218- netdev_gperf_c,
219- include_directories : network_include_dir,
220- link_with : [networkd_link_with])
212+ libnetworkd_core = static_library (
213+ ' networkd-core' ,
214+ sources,
215+ include_directories : network_include_dir,
216+ link_with : [networkd_link_with])
221217
218+ if conf.get(' ENABLE_NETWORKD' ) == 1
222219 install_data (' org.freedesktop.network1.conf' ,
223220 install_dir : dbuspolicydir)
224221 install_data (' org.freedesktop.network1.service' ,
@@ -238,49 +235,44 @@ if conf.get('ENABLE_NETWORKD') == 1
238235 install_data (' networkd.conf' ,
239236 install_dir : pkgsysconfdir)
240237 endif
238+ endif
241239
242- fuzzers += [
243- [[' src/network/fuzz-netdev-parser.c' ,
244- ' src/fuzz/fuzz.h' ],
245- [libnetworkd_core,
246- libsystemd_network,
247- networkd_link_with],
248- [threads],
249- network_include_dir],
240+ fuzzers += [
241+ [[' src/network/fuzz-netdev-parser.c' ],
242+ [libnetworkd_core,
243+ libsystemd_network,
244+ networkd_link_with],
245+ [threads],
246+ network_include_dir],
250247
251- [[' src/network/fuzz-network-parser.c' ,
252- ' src/fuzz/fuzz.h' ],
253- [libnetworkd_core,
254- libsystemd_network,
255- networkd_link_with],
256- [threads],
257- network_include_dir],
258- ]
248+ [[' src/network/fuzz-network-parser.c' ],
249+ [libnetworkd_core,
250+ libsystemd_network,
251+ networkd_link_with],
252+ [threads],
253+ network_include_dir],
254+ ]
259255
260- tests += [
261- [[' src/network/test-networkd-conf.c' ],
262- [libnetworkd_core,
263- libsystemd_network],
264- [],
265- network_include_dir],
256+ tests += [
257+ [[' src/network/test-networkd-conf.c' ],
258+ [libnetworkd_core,
259+ libsystemd_network],
260+ [],
261+ network_include_dir],
266262
267- [[' src/network/test-network.c' ],
268- [libnetworkd_core,
269- libsystemd_network,
270- networkd_link_with],
271- [threads],
272- network_include_dir],
263+ [[' src/network/test-network.c' ],
264+ [libnetworkd_core,
265+ libsystemd_network],
266+ [threads],
267+ network_include_dir],
273268
274- [[' src/network/test-network-tables.c' ,
275- test_tables_h],
276- [libnetworkd_core,
277- libsystemd_network,
278- networkd_link_with],
279- [threads],
280- network_include_dir],
269+ [[' src/network/test-network-tables.c' ],
270+ [libnetworkd_core,
271+ libsystemd_network],
272+ [threads],
273+ network_include_dir],
281274
282- [[' src/network/generator/test-network-generator.c' ,
283- ' src/network/generator/network-generator.c' ,
284- ' src/network/generator/network-generator.h' ]],
285- ]
286- endif
275+ [[' src/network/generator/test-network-generator.c' ,
276+ ' src/network/generator/network-generator.c' ,
277+ ' src/network/generator/network-generator.h' ]],
278+ ]
0 commit comments