* Generating file lists from a script
@ 2025-08-31 2:59 Demi Marie Obenour
2025-08-31 10:51 ` Alyssa Ross
0 siblings, 1 reply; 3+ messages in thread
From: Demi Marie Obenour @ 2025-08-31 2:59 UTC (permalink / raw)
To: Spectrum OS Development
[-- Attachment #1.1.1: Type: text/plain, Size: 310 bytes --]
Maintaining the lists of files and directories in the makefiles
is error-prone. Would it make sense to use a script to generate
them from the git repository? The script would get it right
every time, whereas I tend to get it wrong more times than not.
--
Sincerely,
Demi Marie Obenour (she/her/hers)
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 7253 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Generating file lists from a script
2025-08-31 2:59 Generating file lists from a script Demi Marie Obenour
@ 2025-08-31 10:51 ` Alyssa Ross
2025-09-01 22:14 ` Demi Marie Obenour
0 siblings, 1 reply; 3+ messages in thread
From: Alyssa Ross @ 2025-08-31 10:51 UTC (permalink / raw)
To: Demi Marie Obenour, Spectrum OS Development
[-- Attachment #1: Type: text/plain, Size: 540 bytes --]
Demi Marie Obenour <demiobenour@gmail.com> writes:
> Maintaining the lists of files and directories in the makefiles
> is error-prone. Would it make sense to use a script to generate
> them from the git repository? The script would get it right
> every time, whereas I tend to get it wrong more times than not.
As long as we're still maintaining a list of files in the source tree,
rather than doing something like copying whole directories, and we don't
have to make the Makefiles less readable to accomodate the script, I
don't mind.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Generating file lists from a script
2025-08-31 10:51 ` Alyssa Ross
@ 2025-09-01 22:14 ` Demi Marie Obenour
0 siblings, 0 replies; 3+ messages in thread
From: Demi Marie Obenour @ 2025-09-01 22:14 UTC (permalink / raw)
To: Alyssa Ross, Spectrum OS Development
[-- Attachment #1.1.1: Type: text/plain, Size: 1404 bytes --]
On 8/31/25 06:51, Alyssa Ross wrote:
> Demi Marie Obenour <demiobenour@gmail.com> writes:
>
>> Maintaining the lists of files and directories in the makefiles
>> is error-prone. Would it make sense to use a script to generate
>> them from the git repository? The script would get it right
>> every time, whereas I tend to get it wrong more times than not.
>
> As long as we're still maintaining a list of files in the source tree,
> rather than doing something like copying whole directories, and we don't
> have to make the Makefiles less readable to accomodate the script, I
> don't mind.
Would this work?
1. Move all files meant to be included into the images into
a subdirectory, say `image`.
2. Move the lists of files and symlinks (but not FIFOs and
directories) into a separate file that is included by the
main Makefile.
3. Write a script that uses `git ls-files` to generate that
file.
I already wrote a script that is a bit over 100 lines of code.
Its only dependencies are awk, (bash OR zsh), sort, env, and
git. I only tested it with GNU awk, GNU bash, and GNU sort,
but I expect that it should work with any awk supporting -E,
any env implementing -S, and any shell supporting -euo pipefail.
If storing the permissions of FIFOs and directories is desired,
it would be trivial to add them.
--
Sincerely,
Demi Marie Obenour (she/her/hers)
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 7253 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-09-01 22:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-31 2:59 Generating file lists from a script Demi Marie Obenour
2025-08-31 10:51 ` Alyssa Ross
2025-09-01 22:14 ` Demi Marie Obenour
Code repositories for project(s) associated with this public inbox
https://spectrum-os.org/git/crosvm
https://spectrum-os.org/git/doc
https://spectrum-os.org/git/mktuntap
https://spectrum-os.org/git/nixpkgs
https://spectrum-os.org/git/spectrum
https://spectrum-os.org/git/ucspi-vsock
https://spectrum-os.org/git/www
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).