[PR #4024] [MERGED] Makefile improvements #4999

Closed
opened 2026-05-05 10:30:28 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netblue30/firejail/pull/4024
Author: @kmk3
Created: 3/1/2021
Status: Merged
Merged: 3/1/2021
Merged by: @reinerh

Base: masterHead: improve-makefiles


📝 Commits (3)

  • 0043776 makefiles: fix whitespace
  • 7e3888c makefiles: fix misc blank line consistency
  • 2465f92 makefiles: make all, clean and distclean PHONY

📊 Changes

23 files changed (+70 additions, -5 deletions)

View changed files

📝 Makefile.in (+4 -2)
📝 src/bash_completion/Makefile.in (+3 -0)
📝 src/fbuilder/Makefile.in (+3 -0)
📝 src/fcopy/Makefile.in (+3 -0)
📝 src/firecfg/Makefile.in (+3 -0)
📝 src/firejail/Makefile.in (+3 -0)
📝 src/firemon/Makefile.in (+3 -0)
📝 src/fldd/Makefile.in (+3 -0)
📝 src/fnet/Makefile.in (+3 -0)
📝 src/fnetfilter/Makefile.in (+3 -0)
📝 src/fsec-optimize/Makefile.in (+3 -0)
📝 src/fsec-print/Makefile.in (+3 -0)
📝 src/fseccomp/Makefile.in (+3 -0)
📝 src/ftee/Makefile.in (+3 -0)
📝 src/jailtest/Makefile.in (+3 -0)
📝 src/lib/Makefile.in (+3 -0)
📝 src/libpostexecseccomp/Makefile.in (+3 -0)
📝 src/libtrace/Makefile.in (+3 -1)
📝 src/libtracelog/Makefile.in (+3 -1)
📝 src/man/Makefile.in (+4 -0)

...and 3 more files

📄 Description

$ git log --reverse --pretty='* %s' master..
* makefiles: fix whitespace
* makefiles: fix misc blank line consistency
* makefiles: make all, clean and distclean PHONY

Some minor cleanup and improvements before adding new stuff.


@Fred-Barclay From the amount of whitespace-fixing commits, I think you'll like
the commands from commit 00437760d ("makefiles: fix whitespace"):

$ git ls-files -z -- '*Makefile*' |
  xargs -0 -I '{}' sh -c \
  "test -s '{}' && printf '%s\n' \"\`git stripspace <'{}'\`\" >'{}'"

I don't know if you've used something like that before, but to me it has been
very handy on many occasions. From git-stripspace(1):

Read text, such as commit messages, notes, tags and branch descriptions, from
the standard input and clean it in the manner used by Git.

With no arguments, this will:

  • remove trailing whitespace from all lines

  • collapse multiple consecutive empty lines into one empty line

  • remove empty lines from the beginning and end of the input

  • add a missing \n to the last line if necessary.

In the case where the input consists entirely of whitespace characters, no
output will be produced.

NOTE: This is intended for cleaning metadata, prefer the --whitespace=fix
mode of git-apply(1) for correcting whitespace of patches or files in the
repository.

Though if there any plans to do a mass cleaning, it would be nice to have
something like that on a pre-commit hook/ci check beforehand, to catch errors
before they go to master and thus avoid the need for periodic clean-ups.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netblue30/firejail/pull/4024 **Author:** [@kmk3](https://github.com/kmk3) **Created:** 3/1/2021 **Status:** ✅ Merged **Merged:** 3/1/2021 **Merged by:** [@reinerh](https://github.com/reinerh) **Base:** `master` ← **Head:** `improve-makefiles` --- ### 📝 Commits (3) - [`0043776`](https://github.com/netblue30/firejail/commit/00437760d9e71c42e16bda3b116a51481126ecaf) makefiles: fix whitespace - [`7e3888c`](https://github.com/netblue30/firejail/commit/7e3888c7ff425c6043064c290962dcc9b8c3249e) makefiles: fix misc blank line consistency - [`2465f92`](https://github.com/netblue30/firejail/commit/2465f9248e1e2737479fad5065d8310a860ce415) makefiles: make all, clean and distclean PHONY ### 📊 Changes **23 files changed** (+70 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `Makefile.in` (+4 -2) 📝 `src/bash_completion/Makefile.in` (+3 -0) 📝 `src/fbuilder/Makefile.in` (+3 -0) 📝 `src/fcopy/Makefile.in` (+3 -0) 📝 `src/firecfg/Makefile.in` (+3 -0) 📝 `src/firejail/Makefile.in` (+3 -0) 📝 `src/firemon/Makefile.in` (+3 -0) 📝 `src/fldd/Makefile.in` (+3 -0) 📝 `src/fnet/Makefile.in` (+3 -0) 📝 `src/fnetfilter/Makefile.in` (+3 -0) 📝 `src/fsec-optimize/Makefile.in` (+3 -0) 📝 `src/fsec-print/Makefile.in` (+3 -0) 📝 `src/fseccomp/Makefile.in` (+3 -0) 📝 `src/ftee/Makefile.in` (+3 -0) 📝 `src/jailtest/Makefile.in` (+3 -0) 📝 `src/lib/Makefile.in` (+3 -0) 📝 `src/libpostexecseccomp/Makefile.in` (+3 -0) 📝 `src/libtrace/Makefile.in` (+3 -1) 📝 `src/libtracelog/Makefile.in` (+3 -1) 📝 `src/man/Makefile.in` (+4 -0) _...and 3 more files_ </details> ### 📄 Description ```console $ git log --reverse --pretty='* %s' master.. * makefiles: fix whitespace * makefiles: fix misc blank line consistency * makefiles: make all, clean and distclean PHONY ``` Some minor cleanup and improvements before adding new stuff. ----- @Fred-Barclay From the amount of whitespace-fixing commits, I think you'll like the commands from commit 00437760d ("makefiles: fix whitespace"): $ git ls-files -z -- '*Makefile*' | xargs -0 -I '{}' sh -c \ "test -s '{}' && printf '%s\n' \"\`git stripspace <'{}'\`\" >'{}'" I don't know if you've used something like that before, but to me it has been very handy on many occasions. From git-stripspace(1): > Read text, such as commit messages, notes, tags and branch descriptions, from > the standard input and clean it in the manner used by Git. > > With no arguments, this will: > > * remove trailing whitespace from all lines > > * collapse multiple consecutive empty lines into one empty line > > * remove empty lines from the beginning and end of the input > > * add a missing \n to the last line if necessary. > > In the case where the input consists entirely of whitespace characters, no > output will be produced. > > **NOTE**: This is intended for cleaning metadata, prefer the --whitespace=fix > mode of git-apply(1) for correcting whitespace of patches or files in the > repository. Though if there any plans to do a mass cleaning, it would be nice to have something like that on a pre-commit hook/ci check beforehand, to catch errors before they go to master and thus avoid the need for periodic clean-ups. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 10:30:28 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#4999
No description provided.