vincentb1 / fmtcount

Source for LaTeX fmtcount package
11 stars 5 forks source link

Adding Arabic languege #31

Open Elfengour opened 6 years ago

Elfengour commented 6 years ago

I will be happy to help you adding Arabic languge support to this package

vincentb1 commented 6 years ago

Dear @Elfengour You are most welcome for providing help. Unfortunately I can't speak a single word of arabic although my father's family, and my mother's mother were all arabic speaking people. Well, FYI, there are indeed quite plenty of French words originated from arabic, maybe even more than in Spanish. I have several plain & naive questions to you:

vincentb1 commented 6 years ago

One more question: what about the declension: are we going to have only singular and plural, as for number, and masculine, feminine and neutral as for gender. Or are there more declension cases like in Russian for instance (where « первый », « первого », and « первом » all mean « first » in different grammatical cases). That is why Russian would need quite some re-enginering of the way that fmtcount works.

mfbellalouna commented 6 years ago

Hello Dear Colleagues I just found this link, and I think that it's a very good idea to try to add the arabic language to your very useful package, fmtcount. So I'll try to give some ideas and tracks... I give you the litteral counter what I use in my documents, written with polyglossia and compiled by xelatex:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% MACRO FOR LITERAL NUMBERING %%

\newcommand\words[1]{\expandafter\xwords\csname c@#1\endcsname} \def\xwords#1{\ifcase#1\or الأول\or الثاني\or الثالث\or الرابع\or الخامس\or السادس\or السابع\or الثامن\or التاسع\or العاشر\or الحادي عشر\or الثاني عشر\or الثالث عشر\or الرابع عشر\or الخامس عشر\or السادس عشر\or السابع عشر\or الثامن عشر\or التاسع عشر\or العشرون\or \else please add some words \fi} %%%%%%%%%%%%%%%%%%%%%%%%%%%%% END MACRO FOR LITERAL NUMBERING %%

what I use for the chapters. The command \words{chapter} gives the entry number \value{chapter} in this list, until the value 20.

Note that the arabic counters depend on gender, and that the counter "\words" is a masculine one, as the word "chapter" in arabic is masculine. If you intend to finalize this, I can give the analogous counter in the feminine case.

With my many thanks. Cordially

mfbellalouna commented 6 years ago

Note that this enumeration is similar of the english one: "chapter one", "chapter two" etc... The litteral numbering such that "There is one exercise", "There is two exercises"... is developped in my following post on stack exchange:

https://tex.stackexchange.com/questions/228782/customizing-pointpoints-in-exam-class-for-arabic-language

without using the arabic characters.. I can give you the arabic one that I use in my exam. Thank you

vincentb1 commented 6 years ago

Dear @mfbellalouna,

Thank you for your input. I am trying to port this to fmtcount. I let you know as soon as I have something running…

mfbellalouna commented 6 years ago

Dear @vincentb1 Thank you for your quick reply. About the four cases of words, in my post,

I want to customize the command '\thepoints' for Arabic language, where we have four cases instead of two: The cases '\@points=1 or=1/2', '\@points=2', '3<=\@points<=10', and '\@points>10'. Then, '\@pointname' will have 4 different values-names, say {WORD_1, WORD_2, WORD_3, WORD_4}.

you can see as an example of EMW, what I use, in my exam macros, and try it for several values of numquestions. Many thanks.

\documentclass[12pt]{exam}

\newcommand\TheNumQuestions{\ifthenelse{\equal{\numquestions}{1}}{1 questionone}{\ifthenelse{\equal{\numquestions}{2}}{2 questiontwo}{\ifthenelse{\equal{\numquestions}{3}}{\numquestions\ questionthreetoten}{\ifthenelse{\equal{\numquestions}{4}}{\numquestions\ questionthreetoten}{\ifthenelse{\equal{\numquestions}{5}}{\numquestions\ questionthreetoten}{\ifthenelse{\equal{\numquestions}{6}}{\numquestions\ questionthreetoten}{\ifthenelse{\equal{\numquestions}{7}}{\numquestions\ questionthreetoten}{\ifthenelse{\equal{\numquestions}{8}}{\numquestions\ questionthreetoten}{\ifthenelse{\equal{\numquestions}{9}}{\numquestions\ questionthreetoten}{\ifthenelse{\equal{\numquestions}{10}}{\numquestions\ questionthreetoten}{\numquestions\ questiongreatten}}}}}}}}}}}

\begin{document} This exam contains \TheNumQuestions \begin{questions} \question A question \question A question \question A question \question A question \end{questions} \end{document}

vincentb1 commented 6 years ago

Hello, Let us go step by step, I have created arabic language experimental code to support 1 to 20 numbers based on your input. Please get & install the code as follows (if you are under a Linux/MAC OSX terminal) :

cd /tmp
mkdir arabic-experiment
cd arabic-experiment
git clone git://github.com/nlct/fmtcount.git
cd fmtcount/dist
export TEXMF_INSTALL_DIR=/path/to/your/texmf
make install
texhash

In the above, replace /path/to/your/texmf by the actual path of the TEXMF where you want the files installed.

mfbellalouna commented 6 years ago

Good morning Excuse me I'm not a linux' man ! I use miktex under windows, so I don't understand very well what you say. If I understand good, you created a code, so I do this by some commands, like putting it in some .sty file, say fmtcount_arabic.sty, and refresh miktex database after creating it... I can do all other thing if different.

vincentb1 commented 6 years ago

No problem , I am under MSW+ MikTeX at my home too. I caught a cold, and I feel fairly weak, so I come back to you later with guidance when I feel better.

mfbellalouna commented 6 years ago

Ok Take care. Tell me at any time Best

vincentb1 commented 6 years ago

Hello, I feel better now, although I am still coughing… I was asking about Linux | MAC OSX because development tools like git or gnumake are there by default or very easy to insall. But it is OK to install them on MSW too, incidentally that is what I have. I suggest that you install these tools because before we have a complete arabic supporting fmtcount we will have to do a number of iterations, and it will be easier for me if you can take the updates directy from the git repo without my packaging fmtcount.

So first install the git client from there. Frankly speaking git is not limited to SW development. As I write all my documents under LaTeX, for any document needing revisions, I maintain the LaTeX source versions under git. So as you are a LaTeX user, you may also become a git user for your own purpose of maintaining some documents. git is easy to scale, you can use it for a local repository (ie repository is on your own PC, not on a remote server) where you are alone to write and modify the source code, or for huge projects with hundreds of developers. Once you have installed git, come back to me, and I provide additional instruction to how proceed together. So long… BTW, my native language is French, so you can use this language too if easier than English for you.

mfbellalouna commented 6 years ago

Bonjour cher ami J'ai bien reçu votre message et suis content que vous allez mieux. Je pars en cours et vous réponds plus en détail. A tout à l'heure et merci Faouzi Bellalouna

2018-03-12 9:06 GMT+03:00 Vincent Belaïche notifications@github.com:

Hello, I feel better now, although I am still coughing… I was asking about Linux | MAC OSX because development tools like git or gnumake are there by default or very easy to insall. But it is OK to install them on MSW too, incidentally that is what I have. I suggest that you install these tools because before we have a complete arabic supporting fmtcount we will have to do a number of iterations, and it will be easier for me if you can take the updates directy from the git repo without my packaging fmtcount.

  • git is a version control system. This is what allows SW developers to track any change, and to maintain easily different branches — for instance you have a master branch on which you develop the next release still not stable, and a release_1.0 branch where you maintain the release 1.0, just correcting bugs and not adding any new feature.
  • gnumake is a sw that allows to make scripts in which compilation steps are done only when necessary, which saves processing time.

So first install the git client from there https://git-scm.com/download/win. Frankly speaking git is not limited to SW development. As I write all my documents under LaTeX, for any document needing revisions, I maintain the LaTeX source versions under git. So as you are a LaTeX user, you may also become a git user for your own purpose of maintaining some documents. git is easy to scale, you can use it for a local repository (ie repository is on your own PC, not on a remote server) where you are alone to write and modify the source code, or for huge projects with hundreds of developers. Once you have installed git, come back to me, and I provide additional instruction to how proceed together. So long… BTW, my native language is French, so you can use this language too if easier than English for you.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nlct/fmtcount/issues/31#issuecomment-372202504, or mute the thread https://github.com/notifications/unsubscribe-auth/AjZgrc-X5vKuI4v0vTlUOoaFjWtneN34ks5tdhBrgaJpZM4RPmlk .

mfbellalouna commented 6 years ago

re-bonjour Je vous réécris, après avoir installé git client comme vous me l'avez dit... Il est à noter que j'ai gardé les options d'installation, par défaut, ne sachant pas exactement ce que signifiaient les différentes options... J'attends ainsi les instructions qui suivent... Avec mes remerciements

2018-03-12 11:03 GMT+03:00 Mohamed Faouzi Bellalouna <mfbellalouna@gmail.com

:

Bonjour cher ami J'ai bien reçu votre message et suis content que vous allez mieux. Je pars en cours et vous réponds plus en détail. A tout à l'heure et merci Faouzi Bellalouna

2018-03-12 9:06 GMT+03:00 Vincent Belaïche notifications@github.com:

Hello, I feel better now, although I am still coughing… I was asking about Linux | MAC OSX because development tools like git or gnumake are there by default or very easy to insall. But it is OK to install them on MSW too, incidentally that is what I have. I suggest that you install these tools because before we have a complete arabic supporting fmtcount we will have to do a number of iterations, and it will be easier for me if you can take the updates directy from the git repo without my packaging fmtcount.

  • git is a version control system. This is what allows SW developers to track any change, and to maintain easily different branches — for instance you have a master branch on which you develop the next release still not stable, and a release_1.0 branch where you maintain the release 1.0, just correcting bugs and not adding any new feature.
  • gnumake is a sw that allows to make scripts in which compilation steps are done only when necessary, which saves processing time.

So first install the git client from there https://git-scm.com/download/win. Frankly speaking git is not limited to SW development. As I write all my documents under LaTeX, for any document needing revisions, I maintain the LaTeX source versions under git. So as you are a LaTeX user, you may also become a git user for your own purpose of maintaining some documents. git is easy to scale, you can use it for a local repository (ie repository is on your own PC, not on a remote server) where you are alone to write and modify the source code, or for huge projects with hundreds of developers. Once you have installed git, come back to me, and I provide additional instruction to how proceed together. So long… BTW, my native language is French, so you can use this language too if easier than English for you.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nlct/fmtcount/issues/31#issuecomment-372202504, or mute the thread https://github.com/notifications/unsubscribe-auth/AjZgrc-X5vKuI4v0vTlUOoaFjWtneN34ks5tdhBrgaJpZM4RPmlk .

vincentb1 commented 6 years ago

Bonsoir,

Pas de souci, les options par défaut sont complètement convenables. À dire vrai la personnalisation permet surtout d'installer le client git ailleurs que sous C:\Program Files (x86)\ ou un truc de ce genre…

L'étape suivante est d'aller dans le menu Démarrer, et d'ouvrir une console Git bash. Alors vous aurez une fenêtre de console qui va s'ouvrir où vous pourrez taper des commandes en ligne, un peu comme avec une console MSDos ou avec une console PowerShell, sauf que l'interpreteur de commande est bash et non cmd ou powershell. Par défaut le répertoire courant à l'ouverture de la console est, sous MSWindows10 par exemple C:\Users\Vincent chez moi, parce que mon identifiant d'utilisateur est Vincent, mais chez vous ça fera peut-être C:\Users\Mohamed. À dire vrai ça dépend un peu de la configuration de votre PC.

Vous pouvez savoir le nom MSWindows du répertoire courant en tapant la commande pwd -W. Bon supposons que c'est C:\Users\Mohamed. Taper ensuite les commandes suivantes :

mkdir -p Projects
cd Projects
git clone git://github.com/nlct/fmtcount.git
cd fmtcount/dist
export TEXMF_INSTALL_DIR="/c/Program Files/MiKTeX 2.9"
make install

Je vais commenter ce qui précède :

  1. mkdir -p Projects crée un répertoire nommé Projects sous le répertoire d'accueil du client git, si par ex. le répertoire d'accueil est c:\Users\Mohamed, cela va créer le répertoire c:\Users\Mohamed\Projects
  2. cd Projects change le réprtoire courant, pour que cela devienne celui que vous avez crée en 1.
  3. git clone git://github.com/nlct/fmtcount.git va recréer une copie locale du dépôt distant git où fmtcount est versionné sous le répertoire Projects
  4. cd fmtcount/dist change le répertoire courant pour se mettre la où se trouve le scipt gnumake d'installation de fmtcount — un tel script s'appelle un makefile
  5. export TEXMF_INSTALL_DIR="/c/Program Files/MiKTeX 2.9" configure une variable d'environnement nommée TEXMF_INSTALL_DIR utilisée par le makefile d'installation de fmtcount pour savoir où installer fmtcount. À noter, il faut mettre le bon chemin correspondant à la TEXMF par défaut de MiKTeX ou à l'une des TEXMF de MiKTeX que vous utilisez. Pour configurer cela, comme on est sous bash il faut d'une part remplacer c: par /c dans le chemin, et d'eautre part utiliser des obliques à la place des contr'obliques.
  6. make install, va exécuter le makefile d'installation de fmtcount, ça suppose que vous avec gnumake d'installé sur votre machine.
  7. Après la 1re installation, rafraichir la FNDB de MiKTEX de sorte que le nouveau fichier fc-arabic.defsoit référencé. Pour les mises à jour suivantes, ça ne sera plus nécessaire
vincentb1 commented 6 years ago

Si vous n'avez pas gnumake, vous pouvez récuper un binaire .

Le plus simple est de mettre tout le contenu de l'archive sous c:/Program Files (x86)/Git à supposer que ce soit le répertoire par défaut d'installation du client git que vous venez d'installer. Après cela, lorsque vous ouvrez une console git bash et que vous tapez

make --version

Cela doit répondre à peu près la même chose que cela :

GNU Make 4.2.1
Built for x86_64-pc-msys
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
mfbellalouna commented 6 years ago

Bonsoir J'ai essayé de suivre l'installation ce matin et ça a planté.. et je n'ai pas eu beaucoup de temps pour réfléchir à un débogage.. je serais en séminaire à partir de demain et ne pourrai m'atteler sérieusement à fmtcount que la semaine prochaine, à partir de lundi. Merci et à lundi prochain Faouzi Bellalouna

2018-03-13 0:40 GMT+03:00 Vincent Belaïche notifications@github.com:

Si vous n'avez pas gnumake, vous pouvez récuper un binaire là https://sourceforge.net/projects/ezwinports/files/make-4.2.1-without-guile-w32-bin.zip/download .

Le plus simple est de mettre tout le contenu de l'archive sous c:/Program Files (x86)/Git à supposer que ce soit le répertoire par défaut d'installation du client git que vous venez d'installer. Après cela, lorsque vous ouvrez une console git bash et que vous tapez

make --version

Cela doit répondre à peu près la même chose que cela :

GNU Make 4.2.1 Built for x86_64-pc-msys Copyright (C) 1988-2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nlct/fmtcount/issues/31#issuecomment-372472091, or mute the thread https://github.com/notifications/unsubscribe-auth/AjZgrTFLs6a_kE-dNpw9rSFKWBFIU53iks5tdutMgaJpZM4RPmlk .

vincentb1 commented 6 years ago

OK, pas de souci. N'hésitez pas à m'envoyer une trace de ce qui s'est passé. Je me tiens à votre disposition pour vous aider.

mfbellalouna commented 6 years ago

​Bonjour, je reviens vers vous, (avec quelque retard, que vous m'excuserez !) après avoir essayé d'effectuer ​l'installation que vous m'avez indiqué, et qui ne réussit pas... je vous envoie en copie les commandes Git...

........... Mfaouzi@FanEnvy MINGW64 ~ $ pwd -d bash: pwd: -d: invalid option pwd: usage: pwd [-LPW]

Mfaouzi@FanEnvy MINGW64 ~ $ pwd -d. bash: pwd: -d: invalid option pwd: usage: pwd [-LPW]

Mfaouzi@FanEnvy MINGW64 ~ $ mkdir -p Projects

Mfaouzi@FanEnvy MINGW64 ~ $ cd Projects

Mfaouzi@FanEnvy MINGW64 ~/Projects $ git clone git://github.com/nlct/fmtcount.git Cloning into 'fmtcount'... fatal: read error: Invalid argument

Mfaouzi@FanEnvy MINGW64 ~/Projects $ .......................

sachant que Mfaouzi est mon nom d'utilisateur. Le répertoire courant est ainsi "C:/users/Mfaouzi", et "FanEnvy" est le nom de ma machine... Noter que la commande "pwd -d" que vous préconisez, n'a pas été valide pour mon cas. Si vous voyez d'où vient l'erreur, je vous prie de me l'indiquer, afin que l'on commence le boulot tantôt.. Avec mes remerciements

2018-03-14 0:33 GMT+03:00 Vincent Belaïche notifications@github.com:

OK, pas de souci. N'hésitez pas à m'envoyer une trace de ce qui s'est passé. Je me tiens à votre disposition pour vous aider.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nlct/fmtcount/issues/31#issuecomment-372826086, or mute the thread https://github.com/notifications/unsubscribe-auth/AjZgrXr-uBiT4IHrjRaRwEkUeCZ9sXUHks5teDsegaJpZM4RPmlk .

vincentb1 commented 6 years ago

Juste un petit commentaire à propos de la commande pwd. Pour info la commande pwd donne le chemin du répertoire courant. C'est l'équivalent de echo %CD% sous MSDos.

Ce que je préconisais c'était pwd -W et non pwd -d, donc pas étonnant que pwd -d n'a pas marché. L'option -W n'existe que sur les portages MSWindows de bash de type MSYS, on ne peut pas faire pwd -W sous Linux. Ce que ça fait c'est que ça donne le chemin du répertoire courant en notation MSWindows, et non le chemin du répertoire courant en notation MSYS.

vincentb1 commented 6 years ago

Concernant le problème avec git, est-ce que — toujours dans la console Git Bash — vous pouvez taper la commande suivante : git --version. Chez moi ça fait cela :

Vincent@AIGLEROYAL ~
$ git --version
git version 1.9.4.msysgit.2

Vincent est mon nom d'utilisateur, et AIGLEROYAL le nom de ma machine (qui ne le mérite pas vraiment, parce que c'est un vieux PC pourri).

vincentb1 commented 6 years ago

Petite question : est-ce que vous êtes derrière un proxy dans une université ou chez vous. Quand c'est derrière un proxy, le fait d'utiliser une URL en git: peut poser des problème si le port git (9418) est bloqué. On peut alors essayer de passer par le protocole http (c'est plus lent que le protocole git, mais c'est pour ne pas s'embêter, et pleurer auprès de l'administrateur de votre université). Pour utiliser le protocole http au lieu du protocole git il suffit de taper la commande :

git clone http://github.com/nlct/fmtcount.git

Voir ce blog, toutefois je viens d'essayer chez moi, et ça ne marche pas, alors qu'avec le protocole git si…

mfbellalouna commented 6 years ago

Bonjour le coupable était bien le proxy comme vous l'avez soupçonné. Le "clonage" a bien réussi de chez moi, hors proxy. Noter d'autre part que la commande pwd -w ne marche pas non plus.. Je vous envoie une copie de ma console:

Mfaouzi@FanEnvy MINGW64 ~/Projects $ pwd -w bash: pwd: -w: invalid option pwd: usage: pwd [-LPW]

Mfaouzi@FanEnvy MINGW64 ~/Projects $ git --version git version 2.16.2.windows.1

Mfaouzi@FanEnvy MINGW64 ~/Projects $ git clone git://github.com/nlct/fmtcount.git Cloning into 'fmtcount'... remote: Counting objects: 964, done. remote: Total 964 (delta 0), reused 0 (delta 0), pack-reused 964 Receiving objects: 100% (964/964), 414.95 KiB | 281.00 KiB/s, done. Resolving deltas: 100% (644/644), done.

En attendant la suite et avec mes remerciements

Le 22 mars 2018 à 01:49, Vincent Belaïche notifications@github.com a écrit :

Petite question : est-ce que vous êtes derrière un proxy dans une université ou chez vous. Quand c'est derrière un proxy, le fait d'utiliser une URL en git: peut poser des problème si le port git (9418) est bloqué. On peut alors essayer de passer par le protocole http (c'est plus lent que le protocole git, mais c'est pour ne pas s'embêter, et pleurer auprès de l'administrateur de votre université). Pour utiliser le protocole http au lieu du protocole git il suffit de taper la commande :

git clone http://github.com/nlct/fmtcount.git

Voir ce blog https://blog.github.com/2008-06-19-http-cloning/, toutefois je viens d'essayer chez moi, et ça ne marche pas, alors qu'avec le protocole git si…

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nlct/fmtcount/issues/31#issuecomment-375121377, or mute the thread https://github.com/notifications/unsubscribe-auth/AjZgrUQA2gsgBQVq7BhfMowS9vX6qlfqks5tgtkLgaJpZM4RPmlk .

mfbellalouna commented 6 years ago

Noter d'autre part que j'ai une "connexion baladeuse", que je peux utiliser à mon bureau aussi, si besoin est.

Le 22 mars 2018 à 05:48, Mohamed Faouzi Bellalouna mfbellalouna@gmail.com a écrit :

Bonjour le coupable était bien le proxy comme vous l'avez soupçonné. Le "clonage" a bien réussi de chez moi, hors proxy. Noter d'autre part que la commande pwd -w ne marche pas non plus.. Je vous envoie une copie de ma console:

Mfaouzi@FanEnvy MINGW64 ~/Projects $ pwd -w bash: pwd: -w: invalid option pwd: usage: pwd [-LPW]

Mfaouzi@FanEnvy MINGW64 ~/Projects $ git --version git version 2.16.2.windows.1

Mfaouzi@FanEnvy MINGW64 ~/Projects $ git clone git://github.com/nlct/fmtcount.git Cloning into 'fmtcount'... remote: Counting objects: 964, done. remote: Total 964 (delta 0), reused 0 (delta 0), pack-reused 964 Receiving objects: 100% (964/964), 414.95 KiB | 281.00 KiB/s, done. Resolving deltas: 100% (644/644), done.

En attendant la suite et avec mes remerciements

Le 22 mars 2018 à 01:49, Vincent Belaïche notifications@github.com a écrit :

Petite question : est-ce que vous êtes derrière un proxy dans une université ou chez vous. Quand c'est derrière un proxy, le fait d'utiliser une URL en git: peut poser des problème si le port git (9418) est bloqué. On peut alors essayer de passer par le protocole http (c'est plus lent que le protocole git, mais c'est pour ne pas s'embêter, et pleurer auprès de l'administrateur de votre université). Pour utiliser le protocole http au lieu du protocole git il suffit de taper la commande :

git clone http://github.com/nlct/fmtcount.git

Voir ce blog https://blog.github.com/2008-06-19-http-cloning/, toutefois je viens d'essayer chez moi, et ça ne marche pas, alors qu'avec le protocole git si…

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nlct/fmtcount/issues/31#issuecomment-375121377, or mute the thread https://github.com/notifications/unsubscribe-auth/AjZgrUQA2gsgBQVq7BhfMowS9vX6qlfqks5tgtkLgaJpZM4RPmlk .

mfbellalouna commented 6 years ago

re-bonjour à bien regarder, W était en majuscule ! Sachant cela, la commande marche, et donne ceci:

Mfaouzi@FanEnvy MINGW64 ~/Projects $ pwd -W C:/Users/Mfaouzi/Projects

Le 22 mars 2018 à 05:51, Mohamed Faouzi Bellalouna mfbellalouna@gmail.com a écrit :

Noter d'autre part que j'ai une "connexion baladeuse", que je peux utiliser à mon bureau aussi, si besoin est.

Le 22 mars 2018 à 05:48, Mohamed Faouzi Bellalouna <mfbellalouna@gmail.com

a écrit :

Bonjour le coupable était bien le proxy comme vous l'avez soupçonné. Le "clonage" a bien réussi de chez moi, hors proxy. Noter d'autre part que la commande pwd -w ne marche pas non plus.. Je vous envoie une copie de ma console:

Mfaouzi@FanEnvy MINGW64 ~/Projects $ pwd -w bash: pwd: -w: invalid option pwd: usage: pwd [-LPW]

Mfaouzi@FanEnvy MINGW64 ~/Projects $ git --version git version 2.16.2.windows.1

Mfaouzi@FanEnvy MINGW64 ~/Projects $ git clone git://github.com/nlct/fmtcount.git Cloning into 'fmtcount'... remote: Counting objects: 964, done. remote: Total 964 (delta 0), reused 0 (delta 0), pack-reused 964 Receiving objects: 100% (964/964), 414.95 KiB | 281.00 KiB/s, done. Resolving deltas: 100% (644/644), done.

En attendant la suite et avec mes remerciements

Le 22 mars 2018 à 01:49, Vincent Belaïche notifications@github.com a écrit :

Petite question : est-ce que vous êtes derrière un proxy dans une université ou chez vous. Quand c'est derrière un proxy, le fait d'utiliser une URL en git: peut poser des problème si le port git (9418) est bloqué. On peut alors essayer de passer par le protocole http (c'est plus lent que le protocole git, mais c'est pour ne pas s'embêter, et pleurer auprès de l'administrateur de votre université). Pour utiliser le protocole http au lieu du protocole git il suffit de taper la commande :

git clone http://github.com/nlct/fmtcount.git

Voir ce blog https://blog.github.com/2008-06-19-http-cloning/, toutefois je viens d'essayer chez moi, et ça ne marche pas, alors qu'avec le protocole git si…

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nlct/fmtcount/issues/31#issuecomment-375121377, or mute the thread https://github.com/notifications/unsubscribe-auth/AjZgrUQA2gsgBQVq7BhfMowS9vX6qlfqks5tgtkLgaJpZM4RPmlk .

vincentb1 commented 6 years ago

OK, bon maintenant que le git clone a marché — aux histoires de proxy près, il faudra peut-être qu'on trouve comment passer en HTTP pour ne pas être em***dés par le proxy — on peut passer à la suite que je rappelle ici :

cd fmtcount/dist
export TEXMF_INSTALL_DIR="/c/Program Files/MiKTeX 2.9"
make install

À noter que "/c/Program Files/MiKTeX 2.9" est à remplacer par la racine de MiKTeX sur votre PC où C: est remplacé par /c pour être conforme à la notation MSYS. Vous pouvez metttre autre chose que ça, si par exemple sous l'onglet Roots défini par l'utilitaire MiKTeX Settings vous avez rajouté un chemin de TeXMF, ça peut être ce chemin là, juste mis en notation MSYS — il faut juste que le répertoire existe, et c'est d'ailleurs peut-être plus propre de faire cela dans un premier temps pour ne pas écraser le fmtcount officiel par le fmtcount expérimental.

À noter aussi que vous pouvez créer un fichier C:/Users/Mfaouzi/.profile dans lequel vous mettrez les commandes

export TEXMF_INSTALL_DIR="/c/Program Files/MiKTeX 2.9"
cd ~/Projects/fmtcount/dist

il faur alors que vous sortiez et reveniez sous Git Bash. L'avantage de faire ça, c'est que ça vous met au bon endroit avec le bon environnement dès que vous entrez sous Git Bash. Il n'y a alors plus qu'à taper make install.

À noter aussi, que la 1re fois après le make install il faut rafraichir la FNDB, par ex. en tapant la commande texhash sous la console Git Bash, ou bien en cliquant sur le bouton Refresh FNDB de l'utilitaire MiKTeX Settings comme pour une installation manuelle (ne passant pas par le gestionnaire de paquetage de MiKTeX). Ça ne sera plus à faire pour les mises à jours suivantes du fmtcount expérimental, puisque MiKTeX aura déjà référencé tous les nouveaux fichiers.

Si vous arrivez jusque là, alors vous pourrez faire des tests avec le code que vous avez fourni et que j'ai adapté à fmtcount, et nous pourrons allez plus loin.

mfbellalouna commented 6 years ago

Bonjour "Si vous arrivez jusque là,.." Je n'y arrive pas helas...

Je suis parti de 0, rentrant dans C/Users/Mfaouzi/Projects puis dans fmtcount/dist. Ensuite la commande export TEXMF_INSTALL_DIR="/c/ProgramData/Miktex/2.9" ne répond rien, et la commande make n'est pas reconnue. Le coupable est cette "commande Gunmake" dont vous parlez, et que je ne connais pas... Qu'en est-il?

ci-joint copie de ma console Git... Merci

Mfaouzi@FanEnvy MINGW64 ~ $ cd Projects

Mfaouzi@FanEnvy MINGW64 ~/Projects $ cd fmtcount/dist

Mfaouzi@FanEnvy MINGW64 ~/Projects/fmtcount/dist (master) $ export TEXMF_INSTALL_DIR="/c/ProgramData/Miktex/2.9"

Mfaouzi@FanEnvy MINGW64 ~/Projects/fmtcount/dist (master) $ make install bash: make: command not found

vincentb1 commented 6 years ago

OK, c'est normal que le export TEXMF_INSTALL_DIR="/c/Program Files/MiKTeX 2.9" ne réponde rien, c'est que ça s'est bien passé. Le souci c'est que vous n'avez pas installé GNUmake sur votre machine. Vous en trouverez un .

Pour son installation le plus simple c'est de décompresser le contenu dans le même répertoire où vous avez git, chez moi c'est C:\Program Files (x86)\Git, donc par exemple dans l'archive compressée de GNUMake vous avec bin\make.exe qui ira sous C:\Program Files (x86)\Git, et donc make.exe se trouvera sous C:\Program Files (x86)\Git\bin au même endroit que git.exe.

Après ça, ça devrait marcher, même sans sortir/re-entrer dans la console Git Bash.

mfbellalouna commented 6 years ago

Bonjour le plus simple ne marche pas chez moi ! J'ai suivi en effet les instructions et j'ai toujours ce message:

Mfaouzi@FanEnvy MINGW64 ~ $ make --version bash: make: command not found

malgrè le fait que j'ai bien l'application make.exe dans le dossier C:\Program Files\Git\bin qui contient aussi les applications bash, git et sh. Il se peut que le coupable soit la version de Miktex qui n'est pas la version "admin" mais "user" pour des motifs de légéreté... Une solution serait peut-être d'installer GNUmake en suivant des instructions, comme dans ce lien que j'ai googlé, https://www.youtube.com/watch?v=T9yFxM19c2Q. Me le conseillerez-vous !?

vincentb1 commented 6 years ago

C'est vraiment bizarre que ça ne fonctionne pas… que ce passe-t-il quand vous tapez which git, chez moi ça sort /bin/git. Si ensuite je fais echo $PATH, alors ça sort une liste séparée par des :, et cette liste contient /bin, ce qui explique que git soit bien trouvé par le shell. Si maintenant je fais pushd /bin, et ensuite pwd -W j'ai C:/Program Files (x86)/Git/bin, et si là je fais ls, alors ça me donne une liste contenant git.exe — et chez vous il devrait y avoir aussi make.exe. Juste pour info, pushd, c'est pareil que cd, sauf que derrière on peut faire un popd pour revenir à l'endroit d'où on était parti. Pourriez vous faire tous ces tests pour voir ce que ça donne chez vous…

mfbellalouna commented 6 years ago

re-bonjour Bon... j'ai installé GNUmake en suivant le lien, et ça a failli ne pas marcher !... Il a fallu que j'ajoute, après installation (sans que ce soit mentionné nulle part !) dans le path le chemin C:\gnuwin32\bin\, et j'ai alors reçu le message suivant:

Mfaouzi@FanEnvy MINGW64 ~ $ make --version GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. Ceci est un logiciel libre ; voir le source pour les conditions de copie. Il n'y a PAS de garantie ; tant pour une utilisation COMMERCIALE que pour R▒PONDRE ▒ UN BESOIN PARTICULIER.

Ce logiciel est construit pour i386-pc-mingw32

je vais reprendre maintenant mon make install et je vous tiens au courant

mfbellalouna commented 6 years ago

Suite... la commande make est maintenant opérationnelle, mais elle m'a donné les erreurs suivantes, que j'ai eu dans le git bash:... je pense que l'on peut maintenant appréhender la suite...

Mfaouzi@FanEnvy MINGW64 ~/Projects/fmtcount/dist (master) $ make install C:/gnuwin32/bin/make -C ../trunk dist make[1]: entrant dans le r▒pertoire ▒ C:/Users/Mfaouzi/Projects/fmtcount/trunk ▒ makedtx -author "Nicola Talbot and Vincent Belaïche" \ -src "(.+).(sty|def)$=>\1.\2" \ -doc fmtcount-manual.tex fmtcount

starting package maintenance... installation directory: "C:\Users\Mfaouzi\AppData\Local\Programs\MiKTeX 2.9" package repository: http://mirror.easyname.at/ctan/systems/win32/miktex/tm/packages/ visiting repository http://mirror.easyname.at/ctan/systems/win32/miktex/tm/packages/... repository type: remote package repository loading lightweight database... downloading http://mirror.easyname.at/ctan/systems/win32/miktex/tm/packages/miktex-zzdb1-2.9.tar.lzma... 175738 bytes, 76.14 KB/Sec lightweight database digest: 7e17f06370ea805fb0e8a95dc02b6b71 going to download 291474 bytes going to install 9 file(s) (1 package(s)) downloading http://mirror.easyname.at/ctan/systems/win32/miktex/tm/packages/makedtx.tar.lzma... 291474 bytes, 108.06 KB/Sec extracting files from makedtx.tar.lzma...

./cp2dist -m -f fmtcount.sty -f fcnumparser.sty -f fcprefix.sty -f fc-british.def -f fc-brazilian.def -f fc-english.def -f fc-american.def -f fc-french.def -f fc-frenchb.def -f fc-francais.def -f fc-german.def -f fc-portuges.def -f fc-portuguese.def -f fc-spanish.def -f fc-UKenglish.def -f fc-USenglish.def -f fc-ngermanb.def -f fc-ngerman.def -f fc-germanb.def -f fc-italian.def fmtcount.{dtx,ins} ../dist command cp CHANGES ../dist process_begin: CreateProcess(NULL, command cp CHANGES ../dist, ...) failed. make (e=2): Le fichier sp▒cifi▒ est introuvable. make[1]: [dist] Erreur 2 make[1]: quittant le r▒pertoire ▒ C:/Users/Mfaouzi/Projects/fmtcount/trunk ▒ make: [fmtcount.ins] Erreur 2

mfbellalouna commented 6 years ago

je viens de voir votre message et j'ai suivi les commandes, qui donnent

Mfaouzi@FanEnvy MINGW64 ~/Projects/fmtcount/dist (master) $ which git /mingw64/bin/git

Mfaouzi@FanEnvy MINGW64 ~/Projects/fmtcount/dist (master) $ echo $path

Mfaouzi@FanEnvy MINGW64 ~/Projects/fmtcount/dist (master) $ pushd /bin /bin ~/Projects/fmtcount/dist

Mfaouzi@FanEnvy MINGW64 /bin $ pwd -W C:/Program Files/Git/usr/bin

et dans commande ls, nulle trace de git.exe ni de make.exe,... je donne quelques copies..

gio-querymodules.exe perl.exe git-flow perl5.26.1.exe git-flow-bugfix pinky.exe gitflow-common pldd.exe git-flow-config pluginviewer.exe git-flow-feature pr.exe git-flow-hotfix printenv.exe git-flow-init printf.exe git-flow-log ps.exe git-flow-release psl.exe gitflow-shFlags psl-make-dafsa git-flow-support ptx.exe git-flow-version pwd.exe gkill.exe readlink.exe*

et

ls.exe ssh-add.exe mac2unix.exe ssh-agent.exe md5sum.exe ssh-copy-id

vincentb1 commented 6 years ago

Bonjour, Je fais suite à votre avant dernier commentaire. Il vous manquait deux choses pour que ça fonctionne comme sur des roulettes :

Normalement vous auriez dû avoir cp déjà installé avec git bash. Il faut qu'on éclaircisse cela …

Par rapport à votre commentaire précédent, quand vous avez fait which git, ça vous a donné /mingw64/bin/git et non /bin/git, il fallait donc aller voir sous /mingw64/bin et non sous /bin, donc sous Git bash il faudrait taper

pushd /mingw64/bin
pwd -W
ls 
cd ..
pwd -W
echo $PATH

Attention sous bash la casse des variables d'environnement compte, donc echo $PATHce n'est pas pareil que echo $path que vous avez essayé et qui n'a rien donné.

Là réponse du second pwd -W vous dit où dezipper l'archive contenant make. Du coup comme ça ça devrait marcher sans mettre C:/gnuwin32/bin dans votre PATH, et vous pouvez déplacer tout le contenu de C:\gnuwin32 à l'endroit donné par le second pwd -W, puis détruire C:\gnuwin32.

Par contre il faut que sous votre PATH il y ait bien /mingw64/bin, si ce n'est pas le cas il vous faut éditer le fichier ~/.profile pour y rajouter un truc du genre :

export PATH="/mingw64/bin:$PATH"
vincentb1 commented 6 years ago

Juste pour info, chez moi, dans la console Git Bash, si je fais which cp.exe, ça me repond /bin/cp.exe, c'est à dire que j'ai cp au même endroit que git, en l'occurrence sous le répertoire c:\Program Files (x86)\Git\bin.

mfbellalouna commented 6 years ago

Bonsoir bien reçu. Je regarde tout cela demain matin

vincentb1 commented 6 years ago

Pas de souci, bonne soirée à vous…

mfbellalouna commented 6 years ago

Bonjour, j'ai passé la matinée à "bidouiller le truc" mais ça ne marche toujours pas... le problème est que j'ai 3 sortes de \bin ! .. j'ai \git\bin puis \git\mingw64\bin puis \git\usr\bin... ce dernier dossier contient make.exe et cp.exe mais pas les autres, qui ne contiennent que make.exe . Voici la fin du .log de make install... après avoir tourne des pages et des pages...

% . . . % % % . . . . . % . . . % % > % % % File fmtcount.dtx ended by \endinput. Lines processed: 9514 Comments removed: 3756 Comments passed: 28 Codelines passed: 5686

) No pages of output. Transcript written on fmtcount.log. mkdir -p C:/Program command cp fmtcount.pdf C:/Program Files/MiKTeX 2.9/doc/latex/fmtcount/ process_begin: CreateProcess(NULL, command cp fmtcount.pdf C:/Program Files/MiKTeX 2.9/doc/latex/fmtcount/, ...) failed. make (e=2): Le fichier sp▒cifi▒ est introuvable. make: *** [Makefile:11: install] Error 2

Mfaouzi@FanEnvy MINGW64 ~/Projects/fmtcount/dist (master)

J'ai créé un fichier .profile comme vous m'avez dit, où j'ai mis les 3 lignes de commande que vous m'avez indiqué..

Las je ne sais plus quoi faire ! Tout désinstaller et réinstaller !?

vincentb1 commented 6 years ago

Bonsoir, J'ai installé Git bash il y a un certain temps, et très problablement je n'ai pas la même configuration que vous. Je pense que mon Git bash est basé sur MSYS1 qui n'est plus maintenu, et le votre est sans doute basé sur MSYS2 plus récent, mais avec pas tout à fait la même organisation des répertoires pour pouvoir être utilisé à la fois en mode MSYS, en mode MINGW32 et en mode MINGW64. Ça n'est pas notre sujet et je ne vais pas développer plus loin le pourquoi du comment de cette évolution, et pourquoi je spécule que votre Git bash est basé sur MSYS2.

En ce qui nous concerne, ce qui est essentiel pour que ça marche c'est que votre variable d'environnement PATH soit bien configurée. Pouvez vous me dire ce que ça fait quand vous tapez:

echo $PATH
cd "C:/Program Files/Git/bin"
pwd
cd "C:/Program Files/Git/usr/bin"
pwd
cd "C:/Program Files/Git/mingw64/bin"
pwd
vincentb1 commented 6 years ago

En tout cas pas de panique, si vraiment on ne s'en sort pas comme ça, je désinstallerai mon Git pour le réinstaller et avoir la même configuration que vous, ça sera plus pratique pour vous dire quoi faire.

mfbellalouna commented 6 years ago

Bonsoir Je vous poste les réponses de ma console Git à vos instructions:

Mfaouzi@FanEnvy MINGW64 ~/Projects/fmtcount/dist (master) $ echo $PATH /mingw64/bin:/c/Users/Mfaouzi/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/Mfaouzi/bin:/c/Program Files/Broadcom/Broadcom 802.11:/c/Program Files/MiKTeX 2.9/miktex/bin/x64:/c/Program Files (x86)/MiKTeX 2.9/miktex/bin:/c/Program Files (x86)/Windows Live/Shared:/c/Program Files (x86)/Skype/Phone:/cmd:/c/Users/Mfaouzi/AppData/Roaming/MiKTeX/2.9/miktex/bin:/c/Users/Mfaouzi/AppData/Local/Programs/MiKTeX 2.9/miktex/bin/x64:/c/gnuwin32/bin:/usr/bin/vendor_perl:/usr/bin/core_perl

Mfaouzi@FanEnvy MINGW64 ~/Projects/fmtcount/dist (master) $ cd "C:/Program Files/Git/bin"

Mfaouzi@FanEnvy MINGW64 /bin $ pwd /bin

Mfaouzi@FanEnvy MINGW64 /bin $ cd "C:/Program Files/Git/usr/bin"

Mfaouzi@FanEnvy MINGW64 /usr/bin $ pwd /usr/bin

Mfaouzi@FanEnvy MINGW64 /usr/bin $ cd "C:/Program Files/Git/mingw64/bin"

Mfaouzi@FanEnvy MINGW64 /mingw64/bin $ pwd /mingw64/bin

Mfaouzi@FanEnvy MINGW64 /mingw64/bin $

vincentb1 commented 6 years ago

C'est bizarre :

Pouvez-vous faire dans la console Git bash ceci :

cp --version
/usr/bin/cp --version
/usr/bin/cp.exe --version
command cp --version
which cp
mfbellalouna commented 6 years ago

Bonjour Tout répond à merveille ! Je vous donne les outputs sous Git bash :

Mfaouzi@FanEnvy MINGW64 /mingw64/bin $ cp --version cp (GNU coreutils) 8.26 Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Written by Torbjorn Granlund, David MacKenzie, and Jim Meyering.

Mfaouzi@FanEnvy MINGW64 /mingw64/bin $ /usr/bin/cp --version cp (GNU coreutils) 8.26 Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Written by Torbjorn Granlund, David MacKenzie, and Jim Meyering.

Mfaouzi@FanEnvy MINGW64 /mingw64/bin $ /usr/bin/cp.exe --version cp (GNU coreutils) 8.26 Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Written by Torbjorn Granlund, David MacKenzie, and Jim Meyering.

Mfaouzi@FanEnvy MINGW64 /mingw64/bin $ command cp --version cp (GNU coreutils) 8.26 Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Written by Torbjorn Granlund, David MacKenzie, and Jim Meyering.

Mfaouzi@FanEnvy MINGW64 /mingw64/bin $ which cp /usr/bin/cp

Mfaouzi@FanEnvy MINGW64 /mingw64/bin $

mfbellalouna commented 6 years ago

Noter aussi que j'ai essayé de "bidouiller" mes autres dossiers \bin , avec réponse positive pour un cas et négative pour l'autre... Voici les détails :

Mfaouzi@FanEnvy MINGW64 /mingw64/bin $ /bin/cp --version cp (GNU coreutils) 8.26 Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Written by Torbjorn Granlund, David MacKenzie, and Jim Meyering.

Mfaouzi@FanEnvy MINGW64 /mingw64/bin $ mingw64/bin/cp --version bash: mingw64/bin/cp: No such file or directory

vincentb1 commented 6 years ago

Oui, ça peut paraître surprenant, car on a l'impression que vous avez cp à la fois sous /bin et sous /usr/bin. Mais en relisant plus attentivement cette expérience que vous avez faite plus haut, c'est en fait normal, car Git bash monte à la fois /bin et /usr/bin sur le même répertoire Windows C:\Program Files\Git\usr\bin. Vous pouvez vérifier ceci en faisant l'expérience suivante :

cd /bin
pwd -W
cd /usr/bin
pwd -W
cd /mingw64/bin
pwd -W

Normalement les deux premiers devraient vous donner C:/Program Files/Git/usr/bin, et le 3e C:/Program Files/Git/mingw64/bin. J'avoue que pour cette expérience, je vous ai proposé de faire qq chose dont le résultat est un peu déroutant. En effet, qu'on fasse cd "C:/Program Files/Git/bin" ou cd "C:/Program Files/Git/usr/bin", dans les deux cas le répertoire courant correspond au même répertoire MSWindows C:\Program Files\Git\usr\bin, même si dans le 1er cas Git bash affiche dans l'invite de commande /bin et dans le second /usr/bin.

Pour info, vous pouvez voir le montage de répertoires que fait MSYS en faisant

cat /etc/fstab

Juste une remarque, pour revenir à l'expérience que vous venez de faire, dans le second cas c'est normal que vous ayez une réponse négative puisque vous avez essayé mingw64/bin/cp, c'est à dire ./mingw64/bin/cp, et non /mingw64/bin/cp.

En relisant ce qui s'est mal passé dans l'expérience où vous tentez make install avec makedtx qui marche, mais pas command cp, je commence à me demander si c'est bien directement cp qui n'a pas fonctionné. Juste avant il y a l'appel à un script perl cp2dist qui a peut-être dysfonctionné de manière silencieuse, ce qui aurait entraîné le pb avec cp, ensuite.

Pourriez-vous faire l'expérience suivante pour vérifier que cp fonctionne bien dans un makefile.

  1. Créer un fichier essai.mak avec le contenu suivant :
    
    fic2.txt : fic1.txt
    command cp $< $@

fic1.txt : echo "Bonjour" > $@


Attention, c'est important que :
1. l'indentation devant `command` et `echo` doit être faite avec un caractère TAB
2. les fins de ligne doivent être des LF, et pas des CR-LF — mais peut-être qu'avec le portage MSWindows de GNUMake les CR-LF marchent aussi.

Ensuite, une fois le fichier créé vous tapez la commande suivante sous Git bash:
``` bash
make -f "le/chemin/qui/va/bien/essai.mak"

Pour vérifier que le problème ne vient pas de cp2dist, pouvez vous sous Git bash taper aussi :

perl --version
mfbellalouna commented 6 years ago

Bonjour Bon j'ai créé le fichier essai.mak comme vous me l'avez dit, dans le répertoire C:\users\Mfaouzi\Projects, tout en ne comprenant pas très bien ce que vous voulez dire par LF et CR-LF... En tout état de cause; ce fichier essai n'est pas détecté, ou il m'échappe encore des choses... Je donne copie de ma console git:

Mfaouzi@FanEnvy MINGW64 ~/Projects/fmtcount/dist (master) $ cd ..

Mfaouzi@FanEnvy MINGW64 ~/Projects/fmtcount (master) $ cd ..

Mfaouzi@FanEnvy MINGW64 ~/Projects $ make -f "C/users/Mfaouzi/Projects/essai.mak" make: C/users/Mfaouzi/Projects/essai.mak: No such file or directory make: *** No rule to make target 'C/users/Mfaouzi/Projects/essai.mak'. Stop.

mfbellalouna commented 6 years ago

Lorsque je tape ce que vous dites sur Git, cela donne ceci:

Mfaouzi@FanEnvy MINGW64 ~/Projects $ perl --version

This is perl 5, version 26, subversion 1 (v5.26.1) built for x86_64-msys-thread-multi

Copyright 1987-2017, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page.

vincentb1 commented 6 years ago

Dans votre 1re expérience make n'a pas trouvé essai.makparce que vous avez tapé C/users/Mfaouzi/Projects/essai.mak et non /c/users/Mfaouzi/Projects/essai.mak.

Il faut que ça commence par /c, c'est à dire c pris à la racine, et non par C, c'est à dire C pris sous le répertoire courant.

Juste pour info, vous auriez pu taper aussi ~/Projects/essai.mak, en effet sous bash ~ est un raccourci pour le répertoire d'accueil, C:\users\Mfaouzi en l'occurrence. Attention toutefois avec le raccourci ~, il ne faut pas qu'il soit entre guillemets. Vous pouvez taper ~/Projects/essai.mak, ou ~/"Projects/essai.mak", mais si vous tapez "~/Projects/essai.mak" alors bash recherche le répertoire nommé ~ sous le répertoire courant — en effet ~ est un caractère valide pour les noms de fichier.

Voitre 2e expérience montre que vous avez bien perl d'installé avec Git bash, et donc cp2dist devrait marcher. On aurait pu se douter que perl était là parce que makedtx que MikTeX vous a installé est sous le capot aussi un script perl. MiKTeX installe en fait un wrapper .exe de ce script de sorte à pouvoir l'appeler aussi depuis une console MSDos, et pas seulement depuis une console bash, mais il faut avoir un moteur perl dans le PATH pour que ça marche.

Pouvez-vous refaire l'expérience make -f ~/Projects/essai.mak s'il vous plaît …

vincentb1 commented 6 years ago

Juste pour précision : LF signifie Line-Feed (saut de ligne), c'est le caractère de code ASCII 10, c'est la terminaison de ligne dans les fichiers texte sous Linux, CR signifie Carriage-Return (retour chariot), c'est le caractère de code ASCII 13, et dans les fichiers texte en MSDos la terminaison de ligne est la séquence des deux caractères CR puis LF.

mfbellalouna commented 6 years ago

Après ajout du slash, cela donne :

Mfaouzi@FanEnvy MINGW64 ~/Projects $ make -f "/C/users/Mfaouzi/Projects/essai.mak" echo "Bonjour" > fic1.txt command cp fic1.txt fic2.txt process_begin: CreateProcess(NULL, command cp fic1.txt fic2.txt, ...) failed. make (e=2): Le fichier sp▒cifi▒ est introuvable. make: *** [C:/users/Mfaouzi/Projects/essai.mak:2: fic2.txt] Error 2

mfbellalouna commented 6 years ago

cp est introuvable à première vue. Que pensez-vous si j'ajoute le chemin de cp.exe à la main dans le path comme je l'ai fait pour make au départ ?

cad plus précisément, ajouter au PATH la ligne de commande C:\Program Files\Git\usr\bin\cp.exe....