OSDN Git Service

Streamline the installation procedure. master
authorKeith Marshall <keith@users.osdn.me>
Wed, 24 Jun 2020 21:29:21 +0000 (22:29 +0100)
committerKeith Marshall <keith@users.osdn.me>
Wed, 24 Jun 2020 21:29:21 +0000 (22:29 +0100)
ChangeLog
Makefile.in
configure.ac

index 97f7bf0..c24b246 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2020-06-24  Keith Marshall  <keith@users.osdn.me>
+
+       Streamline the installation procedure.
+
+       * Makefile.in (LIBEXEC_DATA): Rename it as...
+       (LIBEXEC_DLLS): ...this; other data should be enumerated separately,
+       but there is currently none.  Update all references, as appropriate.
+       (install): Add dependency on "all".  Eliminate "for" loops, using...
+       (INSTALL_PROGRAM): ...this, to perform one-shot installation for...
+       (BIN_PROGRAMS, LIBEXEC_PROGRAMS): ...each of these sets, and...
+       (INSTALL_DATA): ...this, for one-shot installation of...
+       (LIBEXEC_SCRIPTS): ...these.
+       (install-strip): Reimplement recursively, appending "-s" to...
+       (INSTALL_PROGRAM): ...this; hence remove requirement for...
+       (STRIP): ...this; delete definition.
+
+       * configure.ac (STRIP): No longer used, so no need for...
+       (AC_CHECK_TOOL): ...this, to locate it; delete configuration check.
+
 2020-06-23  Keith Marshall  <keith@users.osdn.me>
 
        Delete an unnecessary duplicate function call.
 2020-06-23  Keith Marshall  <keith@users.osdn.me>
 
        Delete an unnecessary duplicate function call.
index bf67c98..d698678 100644 (file)
@@ -195,7 +195,7 @@ script_srcdir = ${srcdir}/scripts/libexec
 
 BIN_PROGRAMS = pkginfo$(EXEEXT) mingw-get$(EXEEXT)
 LIBEXEC_PROGRAMS = guistub$(EXEEXT) guimain$(EXEEXT) lastrites$(EXEEXT)
 
 BIN_PROGRAMS = pkginfo$(EXEEXT) mingw-get$(EXEEXT)
 LIBEXEC_PROGRAMS = guistub$(EXEEXT) guimain$(EXEEXT) lastrites$(EXEEXT)
-LIBEXEC_DATA = mingw-get-0.dll
+LIBEXEC_DLLS = mingw-get-0.dll
 
 LIBEXEC_SCRIPTS = ${script_srcdir}/setup.lua \
    ${script_srcdir}/shlink.js ${script_srcdir}/unlink.js
 
 LIBEXEC_SCRIPTS = ${script_srcdir}/setup.lua \
    ${script_srcdir}/shlink.js ${script_srcdir}/unlink.js
@@ -203,7 +203,7 @@ LIBEXEC_SCRIPTS = ${script_srcdir}/setup.lua \
 # Primary build goals...
 #
 all: all-core all-setup
 # Primary build goals...
 #
 all: all-core all-setup
-all-core: $(BIN_PROGRAMS) $(LIBEXEC_PROGRAMS) $(LIBEXEC_DATA)
+all-core: $(BIN_PROGRAMS) $(LIBEXEC_PROGRAMS) $(LIBEXEC_DLLS)
 all-setup: all-setup-dll all-setup-exe
 all-setup-dll: mingw-get-setup-0.dll
 
 all-setup: all-setup-dll all-setup-exe
 all-setup-dll: mingw-get-setup-0.dll
 
@@ -222,7 +222,7 @@ mingw-get$(EXEEXT): $(CLI_EXE_OBJECTS)
 guistub$(EXEEXT): guistub.$(OBJEXT) pkgicon.$(OBJEXT)
        $(CXX) -o $@ $(CXXFLAGS) $(GUI_LDFLAGS) $+
 
 guistub$(EXEEXT): guistub.$(OBJEXT) pkgicon.$(OBJEXT)
        $(CXX) -o $@ $(CXXFLAGS) $(GUI_LDFLAGS) $+
 
-guimain$(EXEEXT): $(GUIMAIN_OBJECTS) $(LIBEXEC_DATA)
+guimain$(EXEEXT): $(GUIMAIN_OBJECTS) $(LIBEXEC_DLLS)
        $(CXX) -o $@ $(CXXFLAGS) $(GUI_LDFLAGS) $+ $(GUIMAIN_LIBS)
 
 lastrites$(EXEEXT): rites.$(OBJEXT)
        $(CXX) -o $@ $(CXXFLAGS) $(GUI_LDFLAGS) $+ $(GUIMAIN_LIBS)
 
 lastrites$(EXEEXT): rites.$(OBJEXT)
@@ -336,7 +336,6 @@ INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 
-STRIP = @STRIP@
 LN_S = @LN_S@
 
 # Installation rules...
 LN_S = @LN_S@
 
 # Installation rules...
@@ -346,16 +345,11 @@ installdirs:
        $(mkinstalldirs) ${libexecdir}/${PACKAGE_TARNAME}
        $(mkinstalldirs) ${PACKAGE_CONFIG_DIR}
 
        $(mkinstalldirs) ${libexecdir}/${PACKAGE_TARNAME}
        $(mkinstalldirs) ${PACKAGE_CONFIG_DIR}
 
-install: installdirs install-profile
-       for image in $(BIN_PROGRAMS); do \
-         $(INSTALL_PROGRAM) $$image ${bindir}; \
-         done
-       for image in $(LIBEXEC_PROGRAMS); do \
-         $(INSTALL_PROGRAM) $$image ${libexecdir}/${PACKAGE_TARNAME}; \
-         done
-       for image in $(LIBEXEC_DATA) $(LIBEXEC_SCRIPTS); do \
-         $(INSTALL_DATA) $$image ${libexecdir}/${PACKAGE_TARNAME}; \
-         done
+install: all installdirs install-profile
+       $(INSTALL_PROGRAM) $(BIN_PROGRAMS) ${bindir}
+       $(INSTALL_PROGRAM) $(LIBEXEC_DLLS) ${libexecdir}/${PACKAGE_TARNAME}
+       $(INSTALL_PROGRAM) $(LIBEXEC_PROGRAMS) ${libexecdir}/${PACKAGE_TARNAME}
+       $(INSTALL_DATA) $(LIBEXEC_SCRIPTS) ${libexecdir}/${PACKAGE_TARNAME}
 
 vpath %.xml.in ${srcdir}/xml
 install-profile: install-%: %.xml
 
 vpath %.xml.in ${srcdir}/xml
 install-profile: install-%: %.xml
@@ -364,13 +358,8 @@ install-profile: install-%: %.xml
 %.xml: %.xml.in
        $(TAG_SCRIPT) $< > $@
 
 %.xml: %.xml.in
        $(TAG_SCRIPT) $< > $@
 
-install-strip: install
-       for image in $(BIN_PROGRAMS); do \
-         $(STRIP) ${bindir}/$$image; \
-         done
-       for image in $(LIBEXEC_PROGRAMS) $(LIBEXEC_DATA); do \
-         $(STRIP) ${libexecdir}/${PACKAGE_TARNAME}/$$image; \
-         done
+install-strip:
+       $(QUIET_MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
 
 # Packaging and distribution...
 # "Native" source files, (i.e. those specific to mingw-get), are...
 
 # Packaging and distribution...
 # "Native" source files, (i.e. those specific to mingw-get), are...
index 4c7aca7..8e268e8 100644 (file)
   AC_PROG_INSTALL
   AC_PROG_LN_S
 
   AC_PROG_INSTALL
   AC_PROG_LN_S
 
-# As for the archive librarian, we need to ensure that the tool
-# for stripping binaries is compatible with the compiler
-#
-  AC_CHECK_TOOL([STRIP],[strip],[strip])
-
 # Identify features to be traced to facilitate debugging; make
 # it precious, to avoid introducing accidental inconsistencies.
 #
 # Identify features to be traced to facilitate debugging; make
 # it precious, to avoid introducing accidental inconsistencies.
 #