Skip to contentSkip to conversation

make install on windows

PATCH In review Alexandre Bique 2 participants 4 messages Feb 26, 2009 – Feb 28, 2009 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 make install on windows

Hi,

On windows with cygwin or mingw, when i do make install, it installs linux elf32 files instead of windows *.exe.

Here is a patch to install the right file depending on $(EXEEXT).

Thank you.

Signature · 1 line
Alexandre Bique
Makefile.in +2 -2
Index: Makefile.in
===================================================================
@@ -222,14 +222,14 @@
 	  $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(pkgdatadir)/$$dest; \
 	done
 	$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1
-	@list='$(bin_UTILITIES)'; for file in $$list; do \
+	@list='$(bin_UTILITIES:=$(EXEEXT))'; for file in $$list; do \
 	  if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
 	  dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
 	  $(INSTALL_PROGRAM) $$dir$$file $(DESTDIR)$(bindir)/$$dest; \
 	  $(HELP2MAN) --section=1 $(builddir)/$$file > $(DESTDIR)$(mandir)/man1/$$dest.1; \
 	done
 	$(mkinstalldirs) $(DESTDIR)$(sbindir) $(DESTDIR)$(mandir)/man8
-	@list='$(sbin_UTILITIES)'; for file in $$list; do \
+	@list='$(sbin_UTILITIES:=$(EXEXT))'; for file in $$list; do \
 	  if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
 	  dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
 	  $(INSTALL_PROGRAM) $$dir$$file $(DESTDIR)$(sbindir)/$$dest; \
#1 lore raw
Quoted 8 lines · Alexandre Bique

Hi,

On windows with cygwin or mingw, when i do make install, it installs linux elf32 files instead of windows *.exe.

Here is a patch to install the right file depending on $(EXEEXT).

Thank you.

Ooouuuppss, there is a little mistake : $(EXEXT) instead of $(EXEEXT). Take the new patch.

Sorry.

Signature · 1 line
Alexandre Bique
Makefile.in +2 -2
Index: Makefile.in
===================================================================
@@ -222,14 +222,14 @@
 	  $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(pkgdatadir)/$$dest; \
 	done
 	$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1
-	@list='$(bin_UTILITIES)'; for file in $$list; do \
+	@list='$(bin_UTILITIES:=$(EXEEXT))'; for file in $$list; do \
 	  if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
 	  dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
 	  $(INSTALL_PROGRAM) $$dir$$file $(DESTDIR)$(bindir)/$$dest; \
 	  $(HELP2MAN) --section=1 $(builddir)/$$file > $(DESTDIR)$(mandir)/man1/$$dest.1; \
 	done
 	$(mkinstalldirs) $(DESTDIR)$(sbindir) $(DESTDIR)$(mandir)/man8
-	@list='$(sbin_UTILITIES)'; for file in $$list; do \
+	@list='$(sbin_UTILITIES:=$(EXEEXT))'; for file in $$list; do \
 	  if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
 	  dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
 	  $(INSTALL_PROGRAM) $$dir$$file $(DESTDIR)$(sbindir)/$$dest; \
#2 lore raw
Quoted 19 lines · Alexandre Bique
Quoted 10 lines

Hi,

On windows with cygwin or mingw, when i do make install, it installs linux elf32 files instead of windows *.exe.

Here is a patch to install the right file depending on $(EXEEXT).

Thank you.

Ooouuuppss, there is a little mistake : $(EXEXT) instead of $(EXEEXT). Take the new patch.

Makefile.in (working copy) line 227

Quoted 7 lines
Makefile.in (working copy) renamed from Makefile.in (revision 2001) +1 -1
@@ -222,14 +222,14 @@
       $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(pkgdatadir)/$$dest; \
     done
     $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1
-    @list='$(bin_UTILITIES)'; for file in $$list; do \
+    @list='$(bin_UTILITIES:=$(EXEEXT))'; for file in $$list; do \
       if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
       dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \

This is not necessary on Cygwin. Its /usr/bin/install handles the .exe issue itself, such that most existing Makefiles work OOTB.

Please make sure that /usr/bin/install and no other install is found in the PATH.

Signature · 1 line
Christian Franke
#3 lore raw
Quoted 33 lines · Christian Franke
Quoted 22 lines · Alexandre Bique
Quoted 12 lines

Hi,

On windows with cygwin or mingw, when i do make install, it installs linux elf32 files instead of windows *.exe.

Here is a patch to install the right file depending on $(EXEEXT).

Thank you.

Ooouuuppss, there is a little mistake : $(EXEXT) instead of $(EXEEXT). Take the new patch.

Makefile.in    (working copy) renamed from Makefile.in    (revision 2001) +0 -0
@@ -222,14 +222,14 @@
       $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(pkgdatadir)/$$dest; \
Quoted 6 lines

    done
    $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1
-    @list='$(bin_UTILITIES)'; for file in $$list; do \
+    @list='$(bin_UTILITIES:=$(EXEEXT))'; for file in $$list; do \
      if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
      dest="echo $$file | sed 's,.*/,,' | sed '$(transform)'"; \

This is not necessary on Cygwin. Its /usr/bin/install handles the .exe issue itself, such that most existing Makefiles work OOTB.

Quoted 1 line

Please make sure that /usr/bin/install and no other install is found in the PATH.

Ok i will check it tomorow or monday.

--
Alexandre Bique