summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2014-12-15 23:48:32 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2014-12-15 23:48:32 +0000
commitbf8e740cf9792347bde468b424f10b2c1e0245ab (patch)
treeb328bca14831298429af1d63ab56fd4687ff6181
parent056f4c89bf09b7b80b5afe037e2373a91e9f8998 (diff)
downloads6-portable-utils-bf8e740cf9792347bde468b424f10b2c1e0245ab.tar.xz
Fix include order in Makefile, remove gcc warning
-rw-r--r--Makefile2
-rwxr-xr-xconfigure26
-rw-r--r--package/targets.mak8
-rw-r--r--src/skaembutils/s6-grep.c8
4 files changed, 25 insertions, 19 deletions
diff --git a/Makefile b/Makefile
index c8ff735..73d9cbb 100644
--- a/Makefile
+++ b/Makefile
@@ -9,8 +9,8 @@ it: all
CC = $(error Please use ./configure first)
-include package/targets.mak
-include config.mak
+include package/targets.mak
include package/deps.mak
version_m := $(basename $(version))
diff --git a/configure b/configure
index 917a7f4..16590e5 100755
--- a/configure
+++ b/configure
@@ -32,6 +32,8 @@ Dependencies:
--with-dynlib=DIR add DIR to the list of searched directories for shared libraries
Optional features:
+ --enable-shared build shared libraries [disabled]
+ --disable-static do not build static libraries [enabled]
--disable-allstatic do not prefer linking against static libraries [enabled]
--enable-static-libc make entirely static binaries [disabled]
--enable-slashpackage[=ROOT] assume /package installation at ROOT [disabled]
@@ -342,9 +344,19 @@ if $allstatic ; then
vpathd=
fi
echo "vpath lib%.so$vpathd"
-echo
-$static || echo "STATIC_LIBS :="
-$shared || echo "SHARED_LIBS :="
+echo "STATIC_LIBS :="
+echo "SHARED_LIBS :="
+if $static ; then
+ echo "DO_STATIC := 1"
+else
+ echo "DO_STATIC :="
+fi
+if $shared ; then
+ echo "DO_SHARED := 1"
+else
+ echo "DO_SHARED :="
+fi
+
exec 1>&3 3>&-
echo " ... done."
@@ -362,13 +374,13 @@ cat <<EOF
#define ${package_macro_name}_VERSION "$version"
EOF
if $slashpackage ; then
- echo "#define ${package_macro_name}_BINPREFIX \"$binprefix\""
- echo "#define ${package_macro_name}_EXTBINPREFIX \"$extbinprefix\""
- echo "#define ${package_macro_name}_LIBEXECPREFIX \"$binprefix\""
+ echo "#define ${package_macro_name}_BINPREFIX \"$binprefix/\""
+ echo "#define ${package_macro_name}_EXTBINPREFIX \"$extbinprefix/\""
+ echo "#define ${package_macro_name}_LIBEXECPREFIX \"$binprefix/\""
else
echo "#define ${package_macro_name}_BINPREFIX \"\""
echo "#define ${package_macro_name}_EXTBINPREFIX \"\""
- echo "#define ${package_macro_name}_LIBEXECPREFIX \"$libexecdir\""
+ echo "#define ${package_macro_name}_LIBEXECPREFIX \"$libexecdir/\""
fi
echo
echo "#endif"
diff --git a/package/targets.mak b/package/targets.mak
index 256c88a..e811c1f 100644
--- a/package/targets.mak
+++ b/package/targets.mak
@@ -1,4 +1,4 @@
-BIN_TARGETS = \
+BIN_TARGETS := \
s6-basename \
s6-cat \
s6-chmod \
@@ -39,7 +39,5 @@ s6-unquote \
s6-unquote-filter \
s6-update-symlinks
-SBIN_TARGETS =
-LIBEXEC_TARGETS =
-SHARED_LIBS =
-STATIC_LIBS =
+SBIN_TARGETS :=
+LIBEXEC_TARGETS :=
diff --git a/src/skaembutils/s6-grep.c b/src/skaembutils/s6-grep.c
index cd991e7..b42e807 100644
--- a/src/skaembutils/s6-grep.c
+++ b/src/skaembutils/s6-grep.c
@@ -56,12 +56,8 @@ int main (int argc, char const *const *argv)
stralloc line = STRALLOC_ZERO ;
regex_t re ;
unsigned int num = 0 ;
- unsigned int arglen ;
- if (flags.fixed)
- {
- if (flags.ignorecase) arglen = str_len(argv[0]) ;
- }
- else
+ unsigned int arglen = str_len(argv[0]) ;
+ if (!flags.fixed)
{
register int e = regcomp(&re, argv[0], REG_NOSUB | (flags.extended ? REG_EXTENDED : 0) | (flags.ignorecase ? REG_ICASE : 0)) ;
if (e)