- Split cmd_bar into 2 functions, improving errors and reducing strcmps
- Only update barconfig when something has changed
- Only update barconfig for the specific bar that has changed
Fixes#3958
The previous fix when using _DEPENDENCIES was wrong because that
dependency is only created for the final executable. However, the build
fails when building the object file. The manual explicitly mentions that
using _DEPENDENCIES is wrong for source files:
> In rare cases you may need to add other kinds of files such as linker
> scripts, but listing a source file in _DEPENDENCIES is wrong. If some
> source file needs to be built before all the components of a program
> are built, consider using the BUILT_SOURCES variable instead (see
> Sources).
https://www.gnu.org/software/automake/manual/automake.html#Linking
Instead, using BUILT_SOURCES works, as mentioned in the manual.
https://www.gnu.org/software/automake/manual/automake.html#Sources
I have also removed the dependencies from i3_SOURCES since AFAIK
dependencies to header files don't do anything. I have verified that
modifying the header correctly re-triggers the build for i3 &
i3-config-wizard.
> Header files listed in a _SOURCES definition will be included in the
> distribution but otherwise ignored. In case it isn’t obvious, you
> should not include the header file generated by configure in a
> _SOURCES variable; this file should not be distributed. Lex (.l) and
> Yacc (.y) files can also be listed; see Yacc and Lex.
https://www.gnu.org/software/automake/manual/automake.html#Program-Sources
An alternative instead of BUILT_SOURCES that should also work in our
case is found in this section:
https://www.gnu.org/software/automake/manual/automake.html#Built-Sources-Example
see "Recording Dependencies manually". The syntax would be:
foo.$(OBJEXT): $(config_parser_SOURCES) $(command_parser_SOURCES)
The benefit of this over BUILT_SOURCES is that it will work for targets
other than 'all', 'check' and 'install'. However, since we don't really
have such targets we don't need to do this right now.
Tested extensively using this script:
#!/bin/bash
set -x
autoreconf -fi
while mkdir build && cd build && ../configure && make -j; do
cd ..
rm -rf build
done
Fixes#3670
* Add RELEASE-NOTES template for next
The placeholder items are useful instead of having to find the •
character for every new release.
Closes#4040
* Remove leftover bugfix release notes from tree