Project

General

Profile

Feature #7384

Add scripts to manage Makefile-local .gitignore files containing clean/clobber-targeted derived files

Added by C Fraire almost 4 years ago. Updated almost 3 years ago.

Status:
New
Priority:
Normal
Assignee:
Category:
-
Start date:
2016-09-16
Due date:
% Done:

33%

Estimated time:
(Total: 0.00 h)
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

illumos-gate's /.gitignore is insufficient to filter derived files after a full build, and consequently a git-status does not show "working directory clean". After an illumos-gate build, nearly ten thousand files are shown as "untracked".

Joyent's manually-maintained, 9000+ line /.gitignore is also insufficient, as admitted by the caveat: "this does not try to ignore all files in a fully built workspace. Rather, you are expected to make clobber before running git status."

The solution is to have the build create transient, Makefile-local .gitignore files containing translated file-path names gleaned from clean/clobber-style targets.

This "part 1" contains the script, make_gitignore.pl, to be run from a Makefile; and a script, infer_make_gitignore.pl, to add (or update) a Makefile .DONE target to run make_gitignore.pl with the same objects that would be cleaned/clobbered.

This issue also contains Makefile revisions so that clean/clobber targets use only "simple" macro references—e.g., $(FOO) or $(FOO)* and not $(BAR:x=blah/%)—so that infer_make_gi@tignore.pl has a straightforward task of replicating the recipes of clean/clobber targets for use by a .DONE@ target calling make_gitignore.pl.

The "part 2" issue will be the actual revision of the five thousand illumos-gate Makefiles using:

find usr/ -name Makefile\* | xargs ./usr/src/tools/scripts/infer_make_gitignore.pl

This issue only affects Makefiles' clean/clobber targets and adds two scripts to be used in "part 2".

Testing shows that:
1) all objects and files are still created after a full-build;
2) make clobber still results in a clean working directory (even without the "part 2" .gitignore files);


Subtasks

Feature #7385: Revise existing Makefiles using infer_make_gitignore.plNew

Actions
Feature #8522: Simplify a "SUBDIRS" makefile, usr/src/cmd/boot/scripts/Makefile, where there are no sub-directoriesNew

Actions
Feature #8523: Fix "clobber" in a few MakefilesClosed

Actions

History

Also available in: Atom PDF