aboutsummaryrefslogtreecommitdiffstats
path: root/src/profstats
Commit message (Collapse)AuthorAge
* build: reduce autoconf input files from 32 to 2Libravatar Kelvin M. Klann2022-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Configure summary: autoconf essentially only parses configure.ac and generates the configure script (that is, the "./configure" shell script). The latter is what actually checks what is available on the system and internally sets the value of the output variables. It then, for every filename foo in AC_CONFIG_FILES (and for every output variable name BAR in AC_SUBST), reads foo.in, replaces every occurrence of `@BAR@` with the value of the shell variable `$BAR` and generates the file foo from the result. After this, configure is finished and `make` could be executed to start the build. Now that (as of #5140) all output variables are only defined on config.mk.in and on config.sh.in, there is no need to generate any makefile nor any other mkfile or shell script at configure time. So rename every "Makefile.in" to "Makefile", mkdeb.sh.in to mkdeb.sh, src/common.mk.in to src/common.mk and leave just config.mk and config.sh as the files to be generated at configure time. This allows editing and committing all makefiles directly, without potentially having to run ./configure in between. Commands used to rename the makefiles: $ git ls-files -z -- '*Makefile.in' | xargs -0 -I '{}' sh -c \ "git mv '{}' \"\$(dirname '{}')/Makefile\"" Additionally, from my (rudimentary) testing, this commit reduces the time it takes to run ./configure by about 20~25% compared to commit 72ece92ea ("Transmission fixes: drop private-lib (#5213)", 2022-06-22). Environment: dash 0.5.11.5-1, gcc 12.1.0-2, Artix Linux, ext4 on an HDD. Commands used for benchmarking each commit: $ : >time_configure && ./configure && make distclean && for i in $(seq 1 10); do { time -p ./configure; } 2>>time_configure; done $ grep real time_configure | awk '{ total += $2 } END { print total/NR }'
* makefiles: define root dir and include relative to itLibravatar Kelvin M. Klann2022-06-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A non-absolute path on an include command is always treated as being relative to the directory in which "make" was started in, rather than being relative to the makefile that contains the command. For example, given the following project structure and file contents: * Makefile: include src/foo.mk * src/foo.mk: include bar.mk * src/bar.mk: Running "make" on the root project directory (that is, where "Makefile" is) yields the following: src/foo.mk:1: bar.mk: No such file or directory As "bar.mk" in "include bar.mk" is relative to the current (process) directory (that is, "./bar.mk") and not to where foo.mk is located in ("./src/bar.mk"). So on every makefile that contains an include command, define the root project directory in the ROOT variable and always include relative to it, to later enable any included mkfiles to include other mkfiles without having to worry about the correct path. Commands used to search and replace: $ git grep -Flz 'include ../common.mk' -- src | xargs -0 -I '{}' sh -c \ "printf '%s\n' \"\`sed 's|include ../common.mk|ROOT = ../..\ninclude \$(ROOT)/src/common.mk|' '{}'\`\" >'{}'" Environment: GNU make 4.3-3.1 on Artix Linux
* 2022 copyright updateLibravatar netblue302022-01-07
|
* profstats fix (#4733)Libravatar netblue302021-12-10
|
* profstats: Fix whitespace on license noticeLibravatar Kelvin M. Klann2021-12-06
| | | | | | | | | | | | | | | | | | | | | | | This amends commit ebe4c93f2 ("profstats cleanup", 2021-12-01) / #4730. This is the second paragraph verbatim of one of the GPL license notices recommended by GNU[1]: This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. On all but one (external) file (and on src/profstats/main.c), the notice uses the same spacing: $ git grep -I -F 'FITNESS FOR A PARTICULAR PURPOSE. See' | wc -l 156 $ git grep -I -F 'FITNESS FOR A PARTICULAR PURPOSE. See' m4/ax_check_compile_flag.m4:# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General src/profstats/main.c: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the [1] https://www.gnu.org/licenses/gpl-howto.en.html
* profstats cleanupLibravatar glitsj162021-12-01
|
* more profstatsLibravatar netblue302021-11-30
|
* install profstats in /etc/firejail directory - undocumented, used only for ↵Libravatar netblue302021-11-30
| | | | development
* more --buildLibravatar netblue302021-05-12
|
* Update main.cLibravatar pholodniak2021-04-15
| | | profstats - correct variable for include global
* makefiles: make all, clean and distclean PHONYLibravatar Kelvin M. Klann2021-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid a stat() call for each affected target and also potentially speed up parallel builds. From the GNU make manual[1]: > Phony targets are also useful in conjunction with recursive > invocations of make (see Recursive Use of make). In this situation > the makefile will often contain a variable which lists a number of > sub-directories to be built. [...] > The implicit rule search (see Implicit Rules) is skipped for .PHONY > targets. This is why declaring a target as .PHONY is good for > performance, even if you are not worried about the actual file > existing. Commands used to search, replace and cleanup: $ find -type f -name '*Makefile.in' -exec sed -i.bak \ -e 's/^all:/.PHONY: all\nall:/' \ -e 's/^clean:/.PHONY: clean\nclean:/' \ -e 's/^distclean:/.PHONY: distclean\ndistclean:/' '{}' + $ find -type f -name '*Makefile.in.bak' -exec rm '{}' + [1]: https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html
* copyright updateLibravatar startx20172021-02-15
|
* fix #3914Libravatar netblue302021-01-24
|
* profstatsLibravatar netblue302021-01-24
|
* profstats - add count for whitelisted home dir, dbus-user noneLibravatar netblue302020-10-02
|
* profstats: track dbus-system noneLibravatar netblue302020-09-08
|
* minor makefile fixesLibravatar netblue302020-06-29
|
* small fixesLibravatar netblue302020-04-21
|
* cleanup, fixes, more profstatsLibravatar netblue302020-04-06
|
* fixing my previous commitLibravatar netblue302020-04-05
|
* profile fixesLibravatar netblue302020-04-04
|
* misc fixes & hardeningLibravatar rusty-snake2020-04-03
|
* profstatsLibravatar netblue302020-04-01
|
* fix profstats to print warning for nonexistent include filesLibravatar netblue302020-03-22
|
* profile statsLibravatar netblue302020-03-19