From eb86e555f015200e3bb3ac6d839df0b6ca13248d Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 9 May 2016 16:15:07 +0200 Subject: manpage update, Hilfe aus Programm entfernt --- Make.8.in | 70 ++++++++++++++++------------ Make.lpr | 19 +------- Make.lps | 127 ++++++++++++++++++++++++--------------------------- dateibeziehungen.pas | 2 +- 4 files changed, 102 insertions(+), 116 deletions(-) diff --git a/Make.8.in b/Make.8.in index 3fc1ef3..7e1ce71 100644 --- a/Make.8.in +++ b/Make.8.in @@ -10,9 +10,6 @@ Make \- somewhat more powerfull alternative to make .B "\-A, \-\-Ausgabe Ausgabedatei" store commands in \fIAusgabedatei\fP .TP -.B "\-H, \-\-Hilfe" -display help screen -.TP .B "\-W, \-\-Watte" just print what would be done .TP @@ -27,53 +24,68 @@ refresh all checksums .TP .B "\-u, \-\-unsicher" accept running jobs outside of directory of \fIAusgabedatei\fP or \fIPrüfsummendatei\fP -.SH SYNTAX -Empty lines and lines beginning with \fB#\fP are ignored. +.TP +Options \fB-D\fP, \fB-P\fP and either \fB-W\fP or \fB-A\fP are compulsory. +.SH MACHDATEI SYNTAX +\fB#\fP starts comments, empty lines are ignored. .PP -The file starts with definition of files: +The file consists of four types of lines: +.TP +1. Definitions of files to watch. +.TP +2. Definitions of targets. +.TP +3. Regular expressions matching sources +.TP +4. Commands to execute for compiling targets from sources. +.SH WATCH FILE DEFINITIONS .TP .B "/path/to/files" add these files to currentness control .TP .B "-r /path/to/files" recursively add these files and directories to currentness control -.PP -The rest of the file consists of compilation rules, each consisting of two consecutive lines: -.TP -The \fBfirst\fP line is a regex-aware rule for identifying dependencies and must not start with a space or tab. -.TP -.B ">1 target:sourceRegEx" -Each (set of) \fItarget\fP(s) is generated by a separate command, possibly involving many source files matching \fIsourceRegEx\fP. -.TP -.B ">n target:sourceRegEx" -All \fItarget\fPs are generated by a single command, possibly involving many source files matching \fIsourceRegEx\fP. .TP -The \fBfollowing\fP line(s) contain(s) commands to refresh the targets and must start with a space or tab. -The \fBlast\fP line of these must end on \fB;\fP. +.B "! excludeRegex" +from now on do not add files matching the regular expression \fIexcludeRegex\fP to currentness control +.SH TARGET DEFINITIONS +These lines must end on \fB:\fP. +Substitutions marked with (*) are allowed in this type of line. +Multiple targets may be defined in one line if separated by spaces or in common bash syntax: \fB*\fP, \fB{one,two,three}\fP, \fB{1..3}\fP are expanded. +Alternatively multiple targets may be defined in multiple consecutive lines. +A single line containing the source regex must follow a set of target definition lines. +.SH COMMAND DEFINITIONS +Each of these lines must end on \fB;\fP. +Substitutions marked with (*) are allowed in this type of line. +Commands on one line are concatenated with \fB&&\fP instead of \fB;\fP \- to use a literal \fB;\fP in a command, one must write \fB;;\fP in the +\fIMachdatei\fP. .SH SUBSTITUTIONS -Some substitutions and macros are recognized: +Some substitutions and macros are recognized. +Obviously, substitutions marked with \fB(*)\fP are only available in COMMAND- and TARGET-DEFINITION lines. .TP -.B "%nurmit'filePart'" -only apply rule / generate target name from source file if name of source file contains \fIfilePart\fP +.B "%nurmit'filePart'" (*) +only execute command / generate target name from source file if name of source file contains \fIfilePart\fP .TP -.B "%nurohne'filePart'" +.B "%nurohne'filePart'" (*) opposite of \fB%nurmit'filePart'\fP .TP -.B "%in" +.B "%in" (*) file name and path of source file .TP -.B "%ifile" +.B "%ifile" (*) file name of source file .TP -.B "%basename" +.B "%basename" (*) file name of source file without extension(s) .TP -.B "%dirname(number)" -last \fInumber\fP components of path so source file +.B "%dirname(num1,num2)" (*) +components \fInum1\fP upto \fInum2\fP of path to source file. +Negative numbers are counted from the back - e.g. \fB-1\fP is the last path component, etc. +\fInum2\fP may be omitted, it defaults to \fB-1\fP. .TP -.B "%dirname" +.B "%dirname" (*) path so source file. -Identical to \fB%basedir(0)\fP. +Identical to \fB%dirname(0)\fP. .TP .B "%DIRNAME" path to \fIMachdatei\fP diff --git a/Make.lpr b/Make.lpr index 030e0c5..7ebbfa9 100644 --- a/Make.lpr +++ b/Make.lpr @@ -19,7 +19,6 @@ type procedure doRun; override; public constructor create(theOwner: tComponent); override; - procedure writeHelp; virtual; end; function liesPruefsummenfile(sumNam: string; var dats: tDateienMitDaten): boolean; @@ -387,21 +386,14 @@ var inputfile,pruefsummenfile,errorMsg: string; mglAbhaengigkeiten,zutunAbhaengigkeiten: tAbhaengigkeiten; dateien: tDateienMitDaten; - i: longint; begin - errorMsg:=checkOptions('A:HWD:P:au','Ausgabe: Hilfe Watte Datei: Prüfsummen: alleSummenErneuern unsicher'); + errorMsg:=checkOptions('A:WD:P:au','Ausgabe: Watte Datei: Prüfsummen: alleSummenErneuern unsicher'); if errorMsg<>'' then begin showException(exception.create(errorMsg+#10'Hilfe: '+exename+' -H/--Hilfe')); terminate; exit; end; - if hasOption('H','Hilfe') then begin - writeHelp; - terminate; - exit; - end; - if (getOptionValue('A','Ausgabe')='') and not hasOption('W','Watte') then begin showException(exception.create('Ausgabedatei wird benötigt!')); terminate; @@ -437,9 +429,6 @@ begin exit; end; - for i:=0 to length(dateien)-1 do - writeln(dateien[i].aktuell,' ',dateien[i].name); - writeln('Regeln: '+inttostr(length(mglAbhaengigkeiten))+', Dateien: '+inttostr(length(dateien))); findeWasZuTunIst(mglAbhaengigkeiten,zuTunAbhaengigkeiten,dateien,inputfile); writeln('anzuwendende Regeln: '+inttostr(length(zuTunAbhaengigkeiten))); @@ -454,12 +443,6 @@ begin stopOnException:=True; end; -procedure tMake.writeHelp; -begin - writeln('Verwendung:'); - writeln(' ',exeName,' -A/--Ausgabe $ausgabedatei -H/--Hilfe -W/--Watte -D/--Datei $Machdatei -P/--Prüfsummen $Prüfsummendatei -a/--alleSummenErneuern -u/--unsicher'); -end; - var application: tMake; begin diff --git a/Make.lps b/Make.lps index 2ca12b1..9b0ff05 100644 --- a/Make.lps +++ b/Make.lps @@ -8,16 +8,16 @@ - - - - + + + + - + @@ -26,8 +26,7 @@ - - + @@ -37,36 +36,36 @@ - + + + + + + + + + + + + - - + + - - + + - - - - - - - - - - - @@ -76,127 +75,119 @@ - + - + - + - + - + - - + + - + - + - - - - - - + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - - + + - - + + - + - + - - - - - - - - diff --git a/dateibeziehungen.pas b/dateibeziehungen.pas index 5296dd0..30dedeb 100644 --- a/dateibeziehungen.pas +++ b/dateibeziehungen.pas @@ -196,7 +196,7 @@ begin if rekursiv and (sr.name<>'.') and (sr.name<>'..') then - sammleDateien(extractfilepath(wo)+sr.name+'/'+extractfilename(wo),rekursiv,ignoriere,dats); + sammleDateien(extractfilepath(wo)+sr.name+'/*',rekursiv,ignoriere,dats); end else begin setlength(dats,length(dats)+1); -- cgit v1.2.3-54-g00ecf