From 6f2b648fe4f34c619a3993081e9069112c5ffd2e Mon Sep 17 00:00:00 2001 From: Castro0o Date: Fri, 23 Mar 2018 13:12:45 +0100 Subject: [PATCH] cleared the read me file for xpub --- .DS_Store | Bin 6148 -> 0 bytes .gitignore | 1 + HELP-makefile.md | 80 +++++++++++++++++++++++++++++++++++++++++++ README | 86 +++-------------------------------------------- 4 files changed, 85 insertions(+), 82 deletions(-) delete mode 100644 .DS_Store create mode 100644 HELP-makefile.md diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index ce48ee8f64ea9cf57524a682c1f2f3dc45a7140a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~%Wl&^6ozM-Q0yRz5k*w6nGFl1ENnuXY>?bg7A%k=8MQ(br8c&jkz6~nokqoV z?(w!InvC3=5p+u&+&{0A%wdl-$KYh2x(B5)*Dcr zVr-n1Ia`uFbx_Q&5unr?r$aA{y}8+{LlIB}{x<^b-Caf$9UvF&quKZOr#B2~nwjPg zyi}{7TRyMp4X~Alae3vbGl<7d=4PX`>n2Zli~4~l{hpf*CjO&14lCdFwrMc#8>{!? zD068PBvYZgJ2dj+aW@`Ce!A<3>+MiK8}yBB`S9_uc=6`#yZ0YHe){}HJOvDk7Pl)>C-N1X z87PNN5`}TJ5B)5rhEkNEXH!evw+X866)N~$7xhyxodKF@+?oJzJeF**1$p*RI{P?mpN%IC`ER7bmYomR0hXM7yeA|4#6aw5ut~SqK91@2_20h-_36 zihv?;mIT=PK%g+SrIteZ(g77e0)Vp52yWoBvjmGFQf;ZFP#6KjA{11FVtK^CA{_dO zoM%fdg^F;5<>3R%J7al5!Tj!UeZr?BYztMjBA^J&5~zu$!S?_Ae?R}v2C0@Jpa?7! z0bJj5wz`m#+*{|8V|y)uvIm73n^y|uAyCQfm^*AMUW397#t3sjZK $@ + +tts: list.txt + cat $< | espeak +``` +when i run: `make tts` +tts rule will execute its dependency list.txt IF the list.xt does not exist in the top level of working directory. ELSE it will execute the list.txt + + +## TARGET NAMES +**use as rules' targets (first line of a rule,left of :) the name of resulting file(s)** + +One main problem in the OuNuPo makefile is the execution of the tesseract rule, every time another rule requests it (in make lingo has it as a dependency). This a duplication of the same process (ocr), which takes quite some time, and hence we want to avoid repeting, if the scanned images haven't changed. +Make has a very simple way of **avoiding this duplication of a process/rule**. +It is done **carefully defining the rules' target** - the name given to the rule, by which we invoke in order to execute that rule. +By having **the target of a rule take the name of the file(s), which will result from to the rule's execution**, the Makefile, will **check if that file is "out of date"**. +"A target is out of date if it does not exist or if it is older than any of the prerequisites " + +If the target/resulting file(s) are **not present**, the dependency rule will be executed +If the target/resulting file(s) are **not present**, the dependency rule will NOT be executed + +what follows is a simple example +``` +foo.txt: + echo "this is a test" >> foo.txt + @echo "$@ was made" + +art: foo.txt + cat foo.txt | figlet + @echo "$@ was made" +``` +For the first time you run `make art` the foo.txt dependency rule will be executed +In subsequent runs of `make art` foo.txt dependency rule will NOT be executed, because its target: foo.txt is already in the make working directory +To trigger the execution of foo.txt rule, we need to remove its target from the working directoy +That task if often delegate to a rule with target `clean` which removes the files/targets of make, such as + +``` +clean: removes output (target) files + rm ocr/output.txt + rm $(wildcard output/*) + rm $(tmpfile) +``` + +After running `make clean` the foo.txt rule is executed (as a dependancy) when running `make art` + +Targets can also include subfolders: + +``` +output/art.txt: foo.txt + cat foo.txt | figlet > $@ + @echo "$@ was made" +``` +which can be invoked by `make output/art.txt` + +Read more on https://www.gnu.org/software/make/manual/html_node/Rule-Syntax.html#Rule-Syntax + +# LINKS +* About Makefile syntax: [5 Writing Recipes in Rules](https://www.gnu.org/software/make/manual/make.html#Recipes) diff --git a/README b/README index 14cb368..83eff8c 100644 --- a/README +++ b/README @@ -1,86 +1,8 @@ +# OuNuPo Make +(Description of makefile) -# Tools for scanned pages -Get help on the different makefile targets by running: -`make` +## License -# Makefile Documentation +# Authors -## SYNTAX: AUTOMATIC VARIABLES -https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html - -* $@ file name of the target of the rule. -* $< name of the first prerequisite. -* $? names of all the prerequisites that are newer than the target, with spaces between . -* $^ names of all the prerequisites, -* $(@D) directory part of the file name of the target, - -## SYNTAX: PRINTING / ERRORS -@ preceeding command tells make not to print the command being executed -- preceeding a command tells make to ignore errors in a recipe line - - -## DEPENDENCIES AND RULES -a rule "asks" a *dependency* to be executed, only if the depency does not exist as a file -i.e. I have the 2 following rules in my make file: - -``` -list.txt: - ls . -1 > $@ - -tts: list.txt - cat $< | espeak -``` -when i run: `make tts` -tts rule will execute its dependency list.txt IF the list.xt does not exist in the top level of working directory. ELSE it will execute the list.txt - - -## TARGET NAMES -**use as rules' targets (first line of a rule,left of :) the name of resulting file(s)** - -One main problem in the OuNuPo makefile is the execution of the tesseract rule, every time another rule requests it (in make lingo has it as a dependency). This a duplication of the same process (ocr), which takes quite some time, and hence we want to avoid repeting, if the scanned images haven't changed. -Make has a very simple way of **avoiding this duplication of a process/rule**. -It is done **carefully defining the rules' target** - the name given to the rule, by which we invoke in order to execute that rule. -By having **the target of a rule take the name of the file(s), which will result from to the rule's execution**, the Makefile, will **check if that file is "out of date"**. -"A target is out of date if it does not exist or if it is older than any of the prerequisites " - -If the target/resulting file(s) are **not present**, the dependency rule will be executed -If the target/resulting file(s) are **not present**, the dependency rule will NOT be executed - -what follows is a simple example -``` -foo.txt: - echo "this is a test" >> foo.txt - @echo "$@ was made" - -art: foo.txt - cat foo.txt | figlet - @echo "$@ was made" -``` -For the first time you run `make art` the foo.txt dependency rule will be executed -In subsequent runs of `make art` foo.txt dependency rule will NOT be executed, because its target: foo.txt is already in the make working directory -To trigger the execution of foo.txt rule, we need to remove its target from the working directoy -That task if often delegate to a rule with target `clean` which removes the files/targets of make, such as - -``` -clean: removes output (target) files - rm ocr/output.txt - rm $(wildcard output/*) - rm $(tmpfile) -``` - -After running `make clean` the foo.txt rule is executed (as a dependancy) when running `make art` - -Targets can also include subfolders: - -``` -output/art.txt: foo.txt - cat foo.txt | figlet > $@ - @echo "$@ was made" -``` -which can be invoked by `make output/art.txt` - -Read more on https://www.gnu.org/software/make/manual/html_node/Rule-Syntax.html#Rule-Syntax - -# LINKS -* About Makefile syntax: [5 Writing Recipes in Rules](https://www.gnu.org/software/make/manual/make.html#Recipes)