New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile, gitignore, and initramfs hook improvements #16

Merged
merged 2 commits into from Jan 14, 2019

Conversation

Projects
None yet
2 participants
@modelrockettier
Copy link

modelrockettier commented Jan 14, 2019

A bunch of small tweaks to the top-level Makefile along with a small change to the top-level .gitignore and to the initramfs hook.

.gitignore

  • Don't ignore other .gitignore files that are added

hooks/initramfs

  • Added a comment about the bcachefs utility to the initramfs hook
  • To give a better idea of what the installed hook looks like when you're just looking at the source file
  • make install was updated to remove the last 2 commented out lines, so the installed file will end up similar to before this commit:
# Add the bcachefs utility to the initramfs
copy_exec /usr/local/sbin/bcachefs /sbin/bcachefs

Makefile

  • Replaced mkdir -p in favor of install -D in the install target
  • Don't use delayed expansion for the pkg-config output so that pkg-config only gets called twice total instead of once per compile or link command, also changed the command to $(shell pkg-config ...) instead of `pkg-config ...` to accomplish this.
  • Added EXTRA_LDFLAGS and EXTRA_LDLIBS vars
  • Removed tabs in the middle of commands to make it easier to manually re-run
    commands manually (e.g. if a compilation fails), so that the shell you're pasting into won't attempt tab completion
  • Replaced `cd dir; git command` in favor of $(shell git -C dir command)
  • Minor version format change: dirty trees just append "+" instead of "-dirty"
    and if git describe fails, it now sets the version to "v0.1-nogit"

modelrockettier added some commits Jan 13, 2019

Only run pkg-config once in Makefile, added EXTRA linker vars
* Only run the pkg-config --cflags command once (instead of every .c file)
* Added EXTRA_LDFLAGS and EXTRA_LDLIBS vars
* Removed tabs in the middle of commands to make it easier to manually re-run
  commands manually (e.g. if a compilation fails)
* Replaced `cd dir; git command` in favor of $(shell git -C dir command)
* Minor version format change: dirty trees just append "+" instead of "-dirty"
  and if git describe fails, it now sets the version to "v0.1-nogit"

Also, don't ignore .gitignore files.
Replaced mkdir -p with install -D in make install
Also added a comment about the bcachefs utility to the initramfs hook

@koverstreet koverstreet merged commit d3b9fb6 into koverstreet:master Jan 14, 2019

@modelrockettier modelrockettier deleted the modelrockettier:makefile-tweaks branch Jan 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment