📚 Cheatsheet

Une collection organisée de snippets de code pour accélérer votre développement. Parcourez, recherchez et copiez en un clic.

Snippets 7

Retour
Cible 'phony' commune : 'all'
Facile
.PHONY: all
all: mon_executable
Cible 'phony' commune : 'clean'
Facile
.PHONY: clean
clean:
	rm -f *.o mon_executable
Cible 'phony' commune : 'install'
Facile
.PHONY: install
install:
	cp mon_executable /usr/local/bin
Cible 'phony' pour éviter les conflits de nom
Facile
.PHONY: clean
Cible spéciale : .DELETE_ON_ERROR
Avancé
.DELETE_ON_ERROR:
Cible spéciale : .ONESHELL
Avancé
.ONESHELL:
test:
	cd /tmp
	pwd # Affiche bien /tmp
Cible spéciale : .SILENT
Intermédiaire
.SILENT: # Toutes les commandes seront silencieuses