summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4f97f4f)
The "install" target currently strips all executables while installing
them, which is not recommended according to GNU conventions. Instead,
there should exist the "install-strip" target for this purpose.
Moreover, the current install target assumes the GNU variant of
the install utility because we call install with --strip-program,
an option which is not available on *BSD.
This patch addresses both issues. It removes the autoconf check and
lets the user directly define the path to the install executable by
setting INSTALL, INSTALL_PROGRAM, INSTALL_DATA, as recommended by the
GNU project. These variables are used in the commands to be executed
when the install target is made. They have reasonable and portable
defaults, so not setting them at all should be fine on all supported
platforms, addressing the issue with --strip-program.
The new phony target install-strip runs install -s but does not try
to be smart about how to tell the install implementation which strip
program to use.
The cross compiling example can be simplified to reflect the fact
that CROSS_COMPILE is no longer used in the Makefile.
Example for cross-compiling
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Example for cross-compiling
~~~~~~~~~~~~~~~~~~~~~~~~~~~
- export CROSS_COMPILE='armv6j-hardfloat-linux-gnueabi-'
+ export CC='armv6j-hardfloat-linux-gnueabi-gcc'
export PATH="/usr/cross/arm/bin:$PATH"
export PATH="/usr/cross/arm/bin:$PATH"
- export CC=${CROSS_COMPILE}gcc
-
export LDFLAGS='
-L/usr/sysroot/arm/lib
-L/usr/sysroot/arm/usr/lib
export LDFLAGS='
-L/usr/sysroot/arm/lib
-L/usr/sysroot/arm/usr/lib
autoconf
autoheader
./configure --host=arm-linux-gnueabi --prefix /usr/sysroot/arm/usr/local
autoconf
autoheader
./configure --host=arm-linux-gnueabi --prefix /usr/sysroot/arm/usr/local
- make CROSS_COMPILE=$CROSS_COMPILE
For details see the user manual:
For details see the user manual:
PACKAGE_TARNAME := @PACKAGE_TARNAME@
PACKAGE_VERSION := @PACKAGE_VERSION@
PACKAGE_TARNAME := @PACKAGE_TARNAME@
PACKAGE_VERSION := @PACKAGE_VERSION@
M4 := @M4@
GENGETOPT := @GENGETOPT@
HELP2MAN := @HELP2MAN@
M4 := @M4@
GENGETOPT := @GENGETOPT@
HELP2MAN := @HELP2MAN@
vardir := /var/paraslash
mandir := $(datarootdir)/man/man1
vardir := /var/paraslash
mandir := $(datarootdir)/man/man1
-STRIP := $(CROSS_COMPILE)strip
MKDIR_P := mkdir -p
prefixed_executables := $(addprefix para_, $(executables))
MKDIR_P := mkdir -p
prefixed_executables := $(addprefix para_, $(executables))
tarball_delete := $(addprefix $(tarball_pfx)/, web .gitignore)
tarball := $(tarball_pfx).tar.bz2
tarball_delete := $(addprefix $(tarball_pfx)/, web .gitignore)
tarball := $(tarball_pfx).tar.bz2
-.PHONY: all mostlyclean clean distclean maintainer-clean install man tarball
all: $(prefixed_executables) $(man_pages)
all: $(prefixed_executables) $(man_pages)
+.PHONY: all mostlyclean clean distclean maintainer-clean install \
+ install-strip man tarball
man: $(man_pages)
tarball: $(tarball)
man: $(man_pages)
tarball: $(tarball)
$(Q) rm -f *.tar.bz2
$(Q) rm -f GPATH GRTAGS GSYMS GTAGS
$(Q) rm -f *.tar.bz2
$(Q) rm -f GPATH GRTAGS GSYMS GTAGS
+INSTALL ?= install
+INSTALL_PROGRAM ?= $(INSTALL)
+INSTALL_DATA ?= $(INSTALL) -m 644
+ifneq ($(findstring strip, $(MAKECMDGOALS)),)
+ strip_option := -s
+endif
+
+install install-strip: all man
$(MKDIR_P) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)
$(MKDIR_P) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)
- $(INSTALL) -s --strip-program $(STRIP) -m 755 \
- $(prefixed_executables) $(DESTDIR)$(bindir)
- $(INSTALL) -m 644 $(man_pages) $(DESTDIR)$(mandir)
+ $(INSTALL) $(strip_option) $(prefixed_executables) $(DESTDIR)$(bindir)
+ $(INSTALL_DATA) $(man_pages) $(DESTDIR)$(mandir)
$(MKDIR_P) $(DESTDIR)$(vardir) >/dev/null 2>&1 || true # not fatal, so don't complain
$(tarball):
$(MKDIR_P) $(DESTDIR)$(vardir) >/dev/null 2>&1 || true # not fatal, so don't complain
$(tarball):
test -z "$HELP2MAN" && AC_MSG_ERROR(
[help2man is required to build this package])
test -z "$HELP2MAN" && AC_MSG_ERROR(
[help2man is required to build this package])
-AC_PATH_PROG([INSTALL], [install])
-test -z "$INSTALL" && AC_MSG_ERROR(
- [The install program is required to build this package])
-