1
submitted 11 months ago by bahmanm@lemmy.ml to c/makefile@lemmy.ml

bmakelib is a collection of useful targets, recipes and variables you can use to augment your Makefiles.


I just released bmakelib v0.6.0 w/ the main highlight being the ability to define enums and validate variable values against them.


โžค Makefile:

define-enum : bmakelib.enum.define( DEPLOY-ENV/dev,staging,prod )
include define-enum

deploy : bmakelib.enum.error-unless-member( DEPLOY-ENV,ENV )
deploy :
	@echo ๐Ÿš€ Deploying to $(ENV)...

โžค Shell:

$ make ENV=local-laptop deploy
*** 'local-laptop' is not a member of enum 'DEPLOY-ENV'.  Stop.

$ make ENV=prod deploy
๐Ÿš€ Deploying to prod...
no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here
this post was submitted on 26 Nov 2023
1 points (100.0% liked)

makefile

25 readers
1 users here now

๐Ÿ“ข ย  All about Makefiles, Gnu Make, BSD Make & POSIX Make:

๐Ÿ˜Ž ย  Don't repeat yourself - Make Make make things happen for you!

๐Ÿ“– ย  Gnu Make manual is your friend.

๐Ÿ—จ ย  Join the chatter in #.mk:matrix.org.


โš  ย  Knowing/Mastering Make is nothing special. Please bear that in mind & keep the conversations respectful & civil.

โ›” ย  Hate speech, bigotry and NSFW content will not be tolerated.


founded 1 year ago
MODERATORS