Un outil pour savoir si une commande est posix - retour accueil
git clone git://bebou.netlib.re/isposix
Log | Files | Refs | README |
commit d27a7090abde97b1c4b8ff301d3bd3534aeafeb3 parent 43d8b63691a5ba8eb578529bdfb73f3469556c7a Auteurice: Arthur Pons <arthur.pons@unistra.fr> Date: Thu, 26 Dec 2024 11:22:04 +0100 Modification makefile Ajout d'une règle clean Ajout de -f à cp parce que par défaut si le fichier existe déjà son contenu est modifié si possible mais pas le reste. Avec -f ça écrase tout. Voir dans le manuel de cp sur openbsd For each destination file that already exists, its contents are overwritten if permissions allow, but its mode, user ID, and group ID are unchanged. J'ai rencontré ce problème parce que j'avais déjà make install avec isposix pas exécutable et après l'avoir rendu exec, make install copiait bien le fichier mais sa version dans bin restait non exécutable. Est-ce que gnu cp a ce comportement ? Diffstat:
M | makefile | | | 9 | +++++++-- |
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/makefile b/makefile @@ -3,12 +3,17 @@ BDDPREFIX = /var all: posix isposix +clean: + rm -rf "${BDDPREFIX}/isposix" + rm -rf "${DESDIR}${PREFIX}/bin/isposix" + rm -rf "${DESDIR}${PREFIX}/bin/posix" + test: ./tests install: mkdir -p "${DESTDIR}${PREFIX}/bin" - cp isposix "${DESTDIR}${PREFIX}/bin" - cp posix "${DESTDIR}${PREFIX}/bin" + cp -f isposix "${DESTDIR}${PREFIX}/bin" + cp -f posix "${DESTDIR}${PREFIX}/bin" mkdir -p "${BDDPREFIX}/isposix" cp bdd/* "${BDDPREFIX}/isposix"