Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
Dnsmasq
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Dnsmasq
Commits
a4f04ed4
Commit
a4f04ed4
authored
Jan 06, 2012
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generate version string from git automatically
parent
07736e8d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
7 deletions
+34
-7
Makefile
Makefile
+6
-5
bld/get-version
bld/get-version
+28
-0
src/config.h
src/config.h
+0
-2
No files found.
Makefile
View file @
a4f04ed4
...
...
@@ -38,9 +38,10 @@ IDN_CFLAGS= `echo $(COPTS) | ../bld/pkg-wrapper HAVE_IDN $(PKG_CONFIG) --cflags
IDN_LIBS
=
`
echo
$(COPTS)
| ../bld/pkg-wrapper HAVE_IDN
$(PKG_CONFIG)
--libs
libidn
`
CT_CFLAGS
=
`
echo
$(COPTS)
| ../bld/pkg-wrapper HAVE_CONNTRACK
$(PKG_CONFIG)
--cflags
libnetfilter_conntrack
`
CT_LIBS
=
`
echo
$(COPTS)
| ../bld/pkg-wrapper HAVE_CONNTRACK
$(PKG_CONFIG)
--libs
libnetfilter_conntrack
`
LUA_CFLAGS
=
`
echo
$(COPTS)
| ../bld/pkg-wrapper HAVE_LUASCRIPT
$(PKG_CONFIG)
--cflags
lua5.1
`
LUA_LIBS
=
`
echo
$(COPTS)
| ../bld/pkg-wrapper HAVE_LUASCRIPT
$(PKG_CONFIG)
--libs
lua5.1
`
LUA_CFLAGS
=
`
echo
$(COPTS)
| ../bld/pkg-wrapper HAVE_LUASCRIPT
$(PKG_CONFIG)
--cflags
lua5.1
`
LUA_LIBS
=
`
echo
$(COPTS)
| ../bld/pkg-wrapper HAVE_LUASCRIPT
$(PKG_CONFIG)
--libs
lua5.1
`
SUNOS_LIBS
=
`
if
uname
|
grep
SunOS 2>&1
>
/dev/null
;
then
echo
-lsocket
-lnsl
-lposix4
;
fi
`
VERSION
=
-DVERSION
=
'\"`../bld/get-version`\"'
OBJS
=
cache.o rfc1035.o util.o option.o forward.o network.o
\
dnsmasq.o dhcp.o lease.o rfc2131.o netlink.o dbus.o bpf.o
\
...
...
@@ -48,7 +49,7 @@ OBJS = cache.o rfc1035.o util.o option.o forward.o network.o \
all
:
@
cd
$(SRC)
&&
$(MAKE)
\
BUILD_CFLAGS
=
"
$(DBUS_CFLAGS)
$(IDN_CFLAGS)
$(CT_CFLAGS)
$(LUA_CFLAGS)
"
\
BUILD_CFLAGS
=
"
$(
VERSION)
$(
DBUS_CFLAGS)
$(IDN_CFLAGS)
$(CT_CFLAGS)
$(LUA_CFLAGS)
"
\
BUILD_LIBS
=
"
$(DBUS_LIBS)
$(IDN_LIBS)
$(CT_LIBS)
$(LUA_LIBS)
$(SUNOS_LIBS)
"
\
-f
../Makefile dnsmasq
...
...
@@ -65,8 +66,8 @@ install-common :
all-i18n
:
@
cd
$(SRC)
&&
$(MAKE)
\
I18N
=
-DLOCALEDIR
=
'\"
$(LOCALEDIR)
\"
'
\
BUILD_CFLAGS
=
"
$(DBUS_CFLAGS)
$(CT_CFLAGS)
$(LUA_CFLAGS)
`
$(PKG_CONFIG)
--cflags
libidn
`
"
\
I18N
=
-DLOCALEDIR
=
\'\"
$(LOCALEDIR)
\"\
'
\
BUILD_CFLAGS
=
"
$(
VERSION)
$(
DBUS_CFLAGS)
$(CT_CFLAGS)
$(LUA_CFLAGS)
`
$(PKG_CONFIG)
--cflags
libidn
`
"
\
BUILD_LIBS
=
"
$(DBUS_LIBS)
$(CT_LIBS)
$(LUA_LIBS)
$(SUNOS_LIBS)
`
$(PKG_CONFIG)
--libs
libidn
`
"
\
-f
../Makefile dnsmasq
@
cd
$(PO)
;
for
f
in
*
.po
;
do
\
...
...
bld/get-version
0 → 100755
View file @
a4f04ed4
#!/bin/sh
# Determine the version string to build into a binary.
# When building in the git repository, we can use the output
# of "git describe" which gives an unequivocal answer.
#
# Failing that, we use the contents of the VERSION file
# which has a set of references substituted into it by git.
# If we can find one which matches $v[0-9].* then we assume it's
# a version-number tag, else we just use the whole string.
# we're called with pwd == src
cd
..
if
[
-d
.git
]
;
then
git describe
else
vers
=
`
cat
VERSION |
sed
's/[(), ]/\n/ g'
|
grep
-m
1
$v
[
0-9]
`
if
[
$?
-eq
0
]
;
then
echo
${
vers
#v
}
else
cat
VERSION
fi
fi
exit
0
src/config.h
View file @
a4f04ed4
...
...
@@ -14,8 +14,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define VERSION "2.60test7"
#define FTABSIZ 150
/* max number of outstanding requests (default) */
#define MAX_PROCS 20
/* max no children for TCP requests */
#define CHILD_LIFETIME 150
/* secs 'till terminated (RFC1035 suggests > 120s) */
...
...
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