From 5abed3da66eb1aebcdf6850e07ae1a2d250fde39 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Thu, 16 Feb 2023 22:09:03 +0200 Subject: [PATCH 31/31] Prefer _gen.h files from the build directory Include _gen.h files from the build directory, when available. Thus meson based build gets the files it has generated to the build directory, instead of possibly outdated ones from the source directory. See osdn #46495 Signed-off-by: Marko Lindqvist --- client/connectdlg_common.c | 2 +- client/options.c | 2 +- client/packhand.h | 17 +++++++++-------- client/repodlgs_common.c | 2 +- server/cityhand.h | 10 ++++++---- server/diplhand.h | 4 ++-- server/edithand.c | 2 +- server/infrapts.c | 2 +- server/maphand.h | 5 +++-- server/spacerace.h | 4 ++-- server/unithand.h | 5 +++-- server/voting.c | 2 +- 12 files changed, 31 insertions(+), 26 deletions(-) diff --git a/client/connectdlg_common.c b/client/connectdlg_common.c index 6c7eec70ec..08357e90dc 100644 --- a/client/connectdlg_common.c +++ b/client/connectdlg_common.c @@ -59,7 +59,7 @@ #include "client_main.h" #include "climisc.h" #include "clinet.h" /* connect_to_server() */ -#include "packhand_gen.h" +#include /* <> so looked from the build directory first. */ #include "chatline_common.h" #include "connectdlg_g.h" diff --git a/client/options.c b/client/options.c index bb82e09fe1..9c22adf756 100644 --- a/client/options.c +++ b/client/options.c @@ -58,7 +58,7 @@ #include "mapview_common.h" #include "music.h" #include "overview_common.h" -#include "packhand_gen.h" +#include /* <> so looked from the build directory first. */ #include "plrdlg_common.h" #include "repodlgs_common.h" #include "servers.h" diff --git a/client/packhand.h b/client/packhand.h index ecfb9ee99a..2abd0cff5a 100644 --- a/client/packhand.h +++ b/client/packhand.h @@ -1,4 +1,4 @@ -/********************************************************************** +/*********************************************************************** Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,20 +17,21 @@ extern "C" { #endif /* __cplusplus */ -#include "fc_types.h" /* struct connection, struct government */ - -#include "events.h" /* enum event_type */ +/* common */ +#include "events.h" /* enum event_type */ +#include "fc_types.h" /* struct connection, struct government */ #include "map.h" -#include "packhand_gen.h" +/* client */ +#include /* <> so looked from the build directory first. */ void packhand_free(void); void notify_about_incoming_packet(struct connection *pc, - int packet_type, int size); + int packet_type, int size); void notify_about_outgoing_packet(struct connection *pc, - int packet_type, int size, - int request_id); + int packet_type, int size, + int request_id); void set_reports_thaw_request(int request_id); void play_sound_for_event(enum event_type type); diff --git a/client/repodlgs_common.c b/client/repodlgs_common.c index 11ca865b98..4393182f8b 100644 --- a/client/repodlgs_common.c +++ b/client/repodlgs_common.c @@ -34,7 +34,7 @@ #include "connectdlg_common.h" /* is_server_running() */ #include "control.h" #include "options.h" -#include "packhand_gen.h" +#include /* <> so looked from the build directory first. */ #include "repodlgs_common.h" diff --git a/server/cityhand.h b/server/cityhand.h index 5d0fe390aa..8d0bc510e2 100644 --- a/server/cityhand.h +++ b/server/cityhand.h @@ -1,4 +1,4 @@ -/********************************************************************** +/*********************************************************************** Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -13,15 +13,17 @@ #ifndef FC__CITYHAND_H #define FC__CITYHAND_H +/* common */ #include "fc_types.h" -#include "hand_gen.h" +/* server */ +#include /* <> so looked from the build directory first. */ struct connection; struct conn_list; void really_handle_city_sell(struct player *pplayer, struct city *pcity, - struct impr_type *pimprove); + struct impr_type *pimprove); void really_handle_city_buy(struct player *pplayer, struct city *pcity); -#endif /* FC__CITYHAND_H */ +#endif /* FC__CITYHAND_H */ diff --git a/server/diplhand.h b/server/diplhand.h index 2876df9b2b..1983b989b3 100644 --- a/server/diplhand.h +++ b/server/diplhand.h @@ -17,7 +17,7 @@ #include "fc_types.h" /* server */ -#include "hand_gen.h" +#include /* <> so looked from the build directory first. */ struct Treaty; struct packet_diplomacy_info; @@ -35,4 +35,4 @@ void set_diplstate_type(struct player_diplstate *state1, enum diplstate_type valid_dst_closest(struct player_diplstate *dst); -#endif /* FC__DIPLHAND_H */ +#endif /* FC__DIPLHAND_H */ diff --git a/server/edithand.c b/server/edithand.c index fb61400822..e7a87cdf6c 100644 --- a/server/edithand.c +++ b/server/edithand.c @@ -41,7 +41,7 @@ #include "cityturn.h" #include "connecthand.h" #include "gamehand.h" -#include "hand_gen.h" +#include /* <> so looked from the build directory first. */ #include "maphand.h" #include "plrhand.h" #include "notify.h" diff --git a/server/infrapts.c b/server/infrapts.c index a16c402743..7df237d131 100644 --- a/server/infrapts.c +++ b/server/infrapts.c @@ -18,7 +18,7 @@ #include "map.h" /* server */ -#include "hand_gen.h" +#include /* <> so looked from the build directory first. */ #include "maphand.h" #include "notify.h" #include "plrhand.h" diff --git a/server/maphand.h b/server/maphand.h index 4faa3bc5f1..3cd088afa4 100644 --- a/server/maphand.h +++ b/server/maphand.h @@ -13,14 +13,15 @@ #ifndef FC__MAPHAND_H #define FC__MAPHAND_H +/* common */ #include "fc_types.h" - #include "map.h" #include "packets.h" #include "terrain.h" #include "vision.h" -#include "hand_gen.h" +/* server */ +#include /* <> so looked from the build directory first. */ struct section_file; struct conn_list; diff --git a/server/spacerace.h b/server/spacerace.h index 3f24f14c86..d86c21cb62 100644 --- a/server/spacerace.h +++ b/server/spacerace.h @@ -1,4 +1,4 @@ -/********************************************************************** +/*********************************************************************** Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,7 +18,7 @@ #include "packets.h" /* server */ -#include "hand_gen.h" +#include /* <> so looked from the build directory first. */ struct player_spaceship; struct conn_list; diff --git a/server/unithand.h b/server/unithand.h index 7bbe300736..26e786f831 100644 --- a/server/unithand.h +++ b/server/unithand.h @@ -17,7 +17,8 @@ #include "explanation.h" #include "unit.h" -#include "hand_gen.h" +/* server */ +#include /* <> so looked from the build directory first. */ bool unit_activity_handling(struct unit *punit, enum unit_activity new_activity); @@ -63,4 +64,4 @@ bool unit_server_side_agent_set(struct player *pplayer, struct unit *punit, enum server_side_agent agent); -#endif /* FC__UNITHAND_H */ +#endif /* FC__UNITHAND_H */ diff --git a/server/voting.c b/server/voting.c index 0631c29d60..e2dcb09e8c 100644 --- a/server/voting.c +++ b/server/voting.c @@ -31,7 +31,7 @@ /* server */ #include "commands.h" #include "console.h" -#include "hand_gen.h" +#include /* <> so looked from the build directory first. */ #include "notify.h" #include "settings.h" #include "stdinhand.h" -- 2.39.1