Robertdebrus / ANLEra

ANLEra add-on for Battle for Wesnoth
GNU General Public License v2.0
2 stars 2 forks source link

Don't redefine macros #38

Closed sevu closed 4 years ago

sevu commented 6 years ago

There is the ANL era, and the ANL modification, both in the same add-on. Both source the same files.

The only thing which comes to mind is wrapping each macro into an #ifndef Or is there another way?

20180811 01:56:25 warning preprocessor: Redefining macro AUTO_STUDYING without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_auto_working.cfg:7
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_auto_working.cfg:7
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro AUTO_FARMING without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_auto_working.cfg:106
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_auto_working.cfg:106
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro AUTO_MINING without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_auto_working.cfg:267
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_auto_working.cfg:267
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro ANL_AI_FACTION without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_extra_ai_units.cfg:3
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_extra_ai_units.cfg:3
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro ANL_ALLIANCE without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_extra_ai_units.cfg:21
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_extra_ai_units.cfg:21
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro ANL_AI_FACTION_EVENTS without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_extra_ai_units.cfg:43
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_extra_ai_units.cfg:43
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro AI_UNITS without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_extra_ai_units.cfg:74
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_extra_ai_units.cfg:74
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro ANL_CAPTURE_VILLAGE without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_general_macros.cfg:3
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_general_macros.cfg:3
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro OPEN_CHEST without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_general_macros.cfg:11
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_general_macros.cfg:11
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro MOVEMENT_RESTRICTION without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_general_macros.cfg:47
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_general_macros.cfg:47
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro ANL_RETURN_TO_MENU without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_help.cfg:3
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_help.cfg:3
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro ANL_HELP_PEASANTS without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_help.cfg:13
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_help.cfg:13
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro ANL_HELP_MAGES without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_help.cfg:25
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_help.cfg:25
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro ANL_HELP_FARMS without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_help.cfg:35
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_help.cfg:35
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro ANL_HELP_VILLAGES without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_help.cfg:46
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_help.cfg:46
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro ANL_HELP_MINES without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_help.cfg:56
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_help.cfg:56
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro ANL_HELP_UNIVERSITIES without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_help.cfg:66
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_help.cfg:66
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro ANL_HELP_DIPLOMACY without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_help.cfg:76
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_help.cfg:76
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro ANL_HELP without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_help.cfg:86
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_help.cfg:86
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro CHECK_FACTION without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_leader_options.cfg:3
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_leader_options.cfg:3
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro SHARE_COMMAND_COMMON without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_leader_options.cfg:201
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_leader_options.cfg:201
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro DONATE_FUNDS_OPTION without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_leader_options.cfg:224
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_leader_options.cfg:224
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro SHARE_FARMING_KNOWLEDGE_OPTION without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_leader_options.cfg:270
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_leader_options.cfg:270
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro SHARE_MINING_KNOWLEDGE_OPTION without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_leader_options.cfg:309
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_leader_options.cfg:309
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro SHARE_WARFARE_KNOWLEDGE_OPTION without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_leader_options.cfg:348
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_leader_options.cfg:348
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro LEADER_OPTIONS without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_leader_options.cfg:394
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_leader_options.cfg:394
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro ABILITY_INSPIRE_LEVEL_1 without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_other.cfg:133
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_other.cfg:133
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro ABILITY_INSPIRE_LEVEL_2 without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_other.cfg:136
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_other.cfg:136
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro ABILITY_INSPIRE_LEVEL_3 without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_other.cfg:139
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_other.cfg:139
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro TERRAIN without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_other.cfg:145
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_other.cfg:145
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro RANDOM_ANLEra without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_other.cfg:149
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_other.cfg:149
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro ANL_UNIVERSITIES without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_research_options.cfg:3
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_research_options.cfg:3
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro TARGET_RESEARCH_COMMAND without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_research_options.cfg:7
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_research_options.cfg:7
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro RESEARCH_OPTIONS without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_research_options.cfg:32
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_research_options.cfg:32
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro FARMING_RESEARCH_COMPLETE without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_research_options.cfg:560
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_research_options.cfg:560
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro MINING_RESEARCH_COMPLETE without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_research_options.cfg:592
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_research_options.cfg:592
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro WARFARE_RESEARCH_COMPLETE without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_research_options.cfg:624
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_research_options.cfg:624
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro COMPLETE_ACTION without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_special_macros.cfg:3
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_special_macros.cfg:3
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro ANL_SHOW_IF without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_special_macros.cfg:28
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_special_macros.cfg:28
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro SET_NAMES without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_special_macros.cfg:41
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_special_macros.cfg:41
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro SET_SIDE_VARIABLES without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_special_macros.cfg:68
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_special_macros.cfg:68
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro PICK_RECRUIT_OPTION without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_special_macros.cfg:212
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_special_macros.cfg:212
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro ADDING_TO_CURRENT_RESEARCH_FIELD without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_special_macros.cfg:241
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_special_macros.cfg:241
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro ANL_RESCUE_TRAPPED_UNIT without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_special_macros.cfg:271
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_special_macros.cfg:271
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro ANL_PLACE_UNIT without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_special_macros.cfg:315
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_special_macros.cfg:315
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro ANL_PLACE_GUARDIAN without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_special_macros.cfg:327
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_special_macros.cfg:327
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro ANL_PLACE_WOUNDED_UNIT without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_special_macros.cfg:355
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_special_macros.cfg:355
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro ANL_PLACE_TRAPPED_UNIT without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_special_macros.cfg:368
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_special_macros.cfg:368
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro BUILD_SOUND_1 without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_special_macros.cfg:381
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_special_macros.cfg:381
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro BUILD_SOUND_2 without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_special_macros.cfg:405
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_special_macros.cfg:405
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro BUILD_SOUND_3 without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_special_macros.cfg:423
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_special_macros.cfg:423
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro MODIFY_TERRAIN_OVERLAY without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_worker_options.cfg:3
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_worker_options.cfg:3
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro ANL_TERRAFORM without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_worker_options.cfg:16
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_worker_options.cfg:16
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro ANL_BUILD_VILLAGE without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_worker_options.cfg:41
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_worker_options.cfg:41
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro ANL_HARVEST without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_worker_options.cfg:49
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_worker_options.cfg:49
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro WORKER_OPTIONS without explicit #undef at ~add-ons/ANLEra/utils/ANLEra_worker_options.cfg:71
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/ANLEra_worker_options.cfg:71
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro SPECIAL_NOTES_INSPIRE without explicit #undef at ~add-ons/ANLEra/utils/abilities.cfg:3
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/abilities.cfg:3
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro ABILITY_INSPIRE without explicit #undef at ~add-ons/ANLEra/utils/abilities.cfg:6
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/abilities.cfg:6
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro SPECIAL_NOTES_STUN without explicit #undef at ~add-ons/ANLEra/utils/abilities.cfg:27
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/abilities.cfg:27
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro WEAPON_SPECIAL_STUN without explicit #undef at ~add-ons/ANLEra/utils/abilities.cfg:30
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/abilities.cfg:30
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro ANLEra_WORK without explicit #undef at ~add-ons/ANLEra/utils/abilities.cfg:40
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/abilities.cfg:40
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro TEG_MISSILE_FRAME_BOLAS without explicit #undef at ~add-ons/ANLEra/utils/animation.cfg:3
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/animation.cfg:3
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro TEG_DEFENSE_ANIMATION_FILTERED without explicit #undef at ~add-ons/ANLEra/utils/animation.cfg:31
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/animation.cfg:31
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro TEG_DEFENSE_ANIMATION without explicit #undef at ~add-ons/ANLEra/utils/animation.cfg:90
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/animation.cfg:90
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro TEG_LEADING_ANIMATION without explicit #undef at ~add-ons/ANLEra/utils/animation.cfg:148
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/animation.cfg:148
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro TEG_ATTACK_ANIMATION_NAME without explicit #undef at ~add-ons/ANLEra/utils/animation.cfg:174
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/animation.cfg:174
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro TEG_DEFENSE_ANIMATION_SHIPS without explicit #undef at ~add-ons/ANLEra/utils/animation.cfg:227
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/animation.cfg:227
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro TEG_ATTACK_ANIMATION_CANNON without explicit #undef at ~add-ons/ANLEra/utils/animation.cfg:255
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/animation.cfg:255
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro TEG_ATTACK_ANIMATION_GRAPPLING_HOOK without explicit #undef at ~add-ons/ANLEra/utils/animation.cfg:283
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/animation.cfg:283
    included from ~add-ons/ANLEra/_main.cfg:13
20180811 01:56:25 warning preprocessor: Redefining macro TEG_ATTACK_ANIMATION_FIGHTING_CREW without explicit #undef at ~add-ons/ANLEra/utils/animation.cfg:321
    included from ~add-ons/ANLEra/_main.cfg:57
previously defined at ~add-ons/ANLEra/utils/animation.cfg:321
    included from ~add-ons/ANLEra/_main.cfg:13
sevu commented 6 years ago

Another thing came to mind, instead of wrapping each marco in an #ifndef macro-name, eventually the [ressource] tag would cause the macros to be preprocessed just once – one could make the common things an ressource. https://wiki.wesnoth.org/ModificationWML#The_.5Bresource.5D_toplevel_tag That's just an guess and has not been tested

Either way, both – [loadressource] or #ifndef_ – assume that the macro definitions are for equals when used by the [modification] or [era] ( -> #18)

Robertdebrus commented 6 years ago

I believe that this is fixed now as of the latest update to ANLEra_worker_options_sp.cfg

sevu commented 6 years ago

No, these still exist when going into MP.

The reason are lines 13 and 58 in _main.cfg. Is line 58 needed?

sevu commented 6 years ago

The idea [resource] can be forgotten right away, macros and tags such as [resource] have nothing in common, as WML tags come into effect after the preprocessing is done. (At least if we want the macros somewhere else, one could otherwise import the [event] tag used for building with [load_resource].)

For the preprocessor it does not matter if the macro is defined in the [era] or [modification]s tag either, only the #ifdef MULTIPLAYER has relevance.

The order matters too, macros must be known before being used, otherwise an error is yield. (Or, it's also possible to use not-yet-defined macros inside macros, in this case preprocessing them is delayed.)

So… currently the macros for SP and MP have the same names, and do different things. Possible ways to get rid of the warning:

[In case it's relevant, to #undef an non-existant macro yields no warning]