bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

patch for OS/2


From: Andreas Buening
Subject: patch for OS/2
Date: Fri, 16 Aug 2002 22:52:45 +0200

Hello!

The following diff files are relative to the patches
I submitted a few months ago (originally from a CVS
snapshot). I hope this is okay for you.

If argv[0] is "make" then the current directory is prepended
to MAKE_COMMAND. I think the following patch makes also sense
for MSDOS:

------------------------------
--- old/make-3.79.2a1/main.c      Sat Jun 22 23:42:28 2002
+++ gnu/make-3.79.2a1/main.c      Fri Aug 16 19:35:00 2002
@@ -1113,7 +1113,7 @@
       strneq(argv[0], "//", 2))
     argv[0] = xstrdup(w32ify(argv[0],1));
 #else /* WINDOWS32 */
-#if defined (__MSDOS__) || defined (__EMX__)
+#if defined(__MSDOS__) || defined(__EMX__)
   if (strchr (argv[0], '\\'))
     {
       char *p;
@@ -1128,7 +1128,12 @@
      program that uses a non-absolute name.  */
   if (current_directory[0] != '\0'
       && argv[0] != 0
-      && (argv[0][0] != '/' && (argv[0][0] == '\0' || argv[0][1] != ':')))
+      && (argv[0][0] != '/' && (argv[0][0] == '\0' || argv[0][1] != ':'))
+# ifdef __EMX__
+      /* do not prepend cwd if argv[0] contains no '/', e.g. "make" */
+      && strchr(argv[0], '/') != 0
+# endif
+      )
     argv[0] = concat (current_directory, "/", argv[0]);
 #else  /* !__MSDOS__ */
   if (current_directory[0] != '\0'
------------------------------


"make check" doesn't work because "../make" doesn't exist
(but ../make.exe does). Therefore I added $(EXEEXT) to
Makefile.am. I also needed that LDADD stuff for linking
to an external gettext library:

------------------------------
--- old/make-3.79.2a1/Makefile.am       Fri May 10 03:15:08 2002
+++ gnu/make-3.79.2a1/Makefile.am       Fri Aug 16 20:09:36 2002
@@ -23,7 +23,10 @@
 noinst_HEADERS = commands.h dep.h filedef.h job.h make.h rule.h variable.h \
                debug.h getopt.h gettext.h

-make_LDADD =   @LIBOBJS@ @ALLOCA@ $(GLOBLIB) @GETLOADAVG_LIBS@
+# Get extra libs as needed
+LDADD = @LIBINTL@
+
+make_LDADD =   @LIBOBJS@ @ALLOCA@ $(GLOBLIB) @GETLOADAVG_LIBS@ $(LDADD)

 man_MANS =     make.1
 info_TEXINFOS =        make.texinfo
@@ -138,8 +141,8 @@
                     rm -f tests/$$f; ln -s ../srctests/$$f tests; \
                   done; fi ;; \
            esac; \
-           echo "cd tests && $(PERL) ./run_make_tests.pl -make ../make 
$(MAKETESTFLAGS)"; \
-           cd tests && $(PERL) ./run_make_tests.pl -make ../make 
$(MAKETESTFLAGS); \
+           echo "cd tests && $(PERL) ./run_make_tests.pl -make 
../make$(EXEEXT) $(MAKETESTFLAGS)"; \
+           cd tests && $(PERL) ./run_make_tests.pl -make ../make$(EXEEXT) 
$(MAKETESTFLAGS); \
          else \
            echo "Can't find a working Perl ($(PERL)); the test suite requires 
Perl."; \
          fi; \
------------------------------


bye,
Andreas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]