Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ioping
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ioping
Commits
ec17b76d
Commit
ec17b76d
authored
May 03, 2017
by
Konstantin Khlebnikov
Committed by
GitHub
May 03, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #32 from kolyshkin/makefile
Makefile and man page nitpicks
parents
f468aafc
2b4920d5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
11 deletions
+23
-11
Makefile
Makefile
+21
-9
ioping.1
ioping.1
+1
-1
ioping.c
ioping.c
+1
-1
No files found.
Makefile
View file @
ec17b76d
...
...
@@ -14,11 +14,16 @@ DOCS=README.md LICENSE changelog
SPEC
=
ioping.spec
PACKAGE
=
ioping
EXTRA_VERSION
:=
$(
shell
test
-d
.git
&&
git describe
--tags
--dirty
=
+ |
sed
's/^v[^-]*//;s/-/./g'
)
VERSION
:=
$(
shell
sed
-ne
's/\# define VERSION \"\(.*\)\"/\1/p'
ioping.c
)
${EXTRA_VERSION}
GIT_VER
:=
$(
shell
test
-d
.git
&&
git describe
--tags
--match
'v[0-9]*'
\
--abbrev
=
0 |
sed
's/v//'
)
SRC_VER
:=
$(
shell
sed
-ne
's/\# define VERSION \"\(.*\)\"/\1/p'
ioping.c
)
EXTRA_VERSION
:=
$(
shell
test
-d
.git
&&
git describe
--tags
--match
'v[0-9]*'
\
--dirty
=
+ |
sed
's/^v[^-]*//;s/-/./g'
)
VERSION
:=
$(SRC_VER)$(EXTRA_VERSION)
DISTDIR
=
$(PACKAGE)
-
$(VERSION)
DISTFILES
=
$(SRCS)
$(MANS)
$(DOCS)
$(SPEC)
Makefile
PACKFILES
=
$(BINARY)
$(MANS)
$(MANS_F)
$(DOCS)
CPPFLAGS
+=
-DEXTRA_VERSION
=
\"
${EXTRA_VERSION}
\"
STRIP
=
strip
TARGET
=
$(
shell
${CC}
-dumpmachine
)
...
...
@@ -35,11 +40,18 @@ BINARY:=$(BINARY:=.exe)
LIBS
=
-lm
endif
all
:
$(BINARY)
all
:
checkver
$(BINARY)
version
:
version
:
checkver
@
echo
${VERSION}
checkver
:
@
if
test
-n
"
$(GIT_VER)
"
-a
"
$(GIT_VER)
"
!=
"
$(SRC_VER)
"
;
then
\
echo
"ERROR: Version mismatch between git and source"
;
\
echo
git:
$(GIT_VER)
, src:
$(SRC_VER)
;
\
exit
1
;
\
fi
clean
:
$(RM)
-f
$(OBJS)
$(BINARY)
$(MANS_F)
ioping.tmp
...
...
@@ -59,7 +71,7 @@ install: $(BINARY) $(MANS)
install
-m
644
$(MANS)
$(DESTDIR)$(MAN1DIR)
%.o
:
%.c
$(CC)
$(CFLAGS)
$(CPPFLAGS)
-
DEXTRA_VERSION
=
\"
${EXTRA_VERSION}
\"
-
c
-o
$@
$<
$(CC)
$(CFLAGS)
$(CPPFLAGS)
-c
-o
$@
$<
%.ps
:
%.1
man
-t
./
$<
>
$@
...
...
@@ -73,17 +85,17 @@ install: $(BINARY) $(MANS)
$(BINARY)
:
$(OBJS)
$(CC)
-o
$@
$^
$(CFLAGS)
$(LDFLAGS)
$(LIBS)
dist
:
$(DISTFILES)
dist
:
checkver
$(DISTFILES)
tar
-cz
--transform
=
's,^,
$(DISTDIR)
/,S'
$^
-f
$(DISTDIR)
.tar.gz
binary-tgz
:
$(PACKFILES)
binary-tgz
:
checkver
$(PACKFILES)
${STRIP}
${BINARY}
tar
-cz
--transform
=
's,^,
$(DISTDIR)
/,S'
-f
${PACKAGE}
-
${VERSION}
-
${TARGET}
.tgz
$^
binary-zip
:
$(PACKFILES)
binary-zip
:
checkver
$(PACKFILES)
${STRIP}
${BINARY}
ln
-s
.
$(DISTDIR)
zip
${PACKAGE}
-
${VERSION}
-
${TARGET}
.zip
$(
addprefix
$(DISTDIR)
/,
$^
)
rm
$(DISTDIR)
.PHONY
:
all
clean install dist version
.PHONY
:
all
version checkver clean strip test install dist binary-tgz binary-zip
ioping.1
View file @
ec17b76d
...
...
@@ -63,7 +63,7 @@ Print raw statistics for every \fIperiod\fR requests (see format below).
Print raw statistics for every \fIperiod\fR in time.
.TP
.B \-A
Use asynchronous I/O (
syscalls \fBio_submit\fR(2), \fBio_submit\fR(2), etc
).
Use asynchronous I/O (
\fBio_setup\fR(2), \fBio_submit\fR(2) etc syscalls
).
.TP
.B \-B
Batch mode. Be quiet and print final statistics in raw format.
...
...
ioping.c
View file @
ec17b76d
...
...
@@ -19,7 +19,7 @@
*/
#ifndef VERSION
# define VERSION "
0.9
"
# define VERSION "
1.0
"
#endif
#ifndef EXTRA_VERSION
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment