[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
m4 1.4.4 on OS/2
From: |
Andreas Büning |
Subject: |
m4 1.4.4 on OS/2 |
Date: |
Thu, 04 May 2006 22:39:57 +0200 |
Hello!
I've just compiled m4 1.4.4 on OS/2, and I had to modify some Makefile.in
files (see patches below).
I've made the following changes:
- Used $(OBJEXT) and $(EXEEXT) when necessary. @OBJEXT@ and @EXEEXT@
represent the object file and executable file extensions, and both
are supported by all current autoconf versions.
- Added a .c.obj rule like automake does.
- Added $(CFLAGS) to $(LINK) because a) automake does it, too, and
b) many users might expect this.
- If I might suggest to insert m4.info into the PREFIX/info/dir file
so that m4.info can be found by the info reader. I added some code
from an automake-generated Makefile to doc/Makefile.in to call
install-info for the 'install' and 'uninstall' targets.
Please, update mkinstalldirs to a current version because the included
one is rather outdated.
I hope the patches appended below are convenient for you.
Thanks.
Andreas Büning
---------------------------
--- old/m4-1.4.4/src/Makefile.in Sun May 1 13:33:22 2005
+++ gnu/m4-1.4.4/src/Makefile.in Thu May 4 21:23:04 2006
@@ -33,6 +33,8 @@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
STACKOVF = @STACKOVF@
+OBJEXT = @OBJEXT@
+EXEEXT = @EXEEXT@
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -40,15 +42,18 @@
bindir = @bindir@
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
-LINK = $(CC) $(LDFLAGS) -o $@
+LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
.SUFFIXES:
-.SUFFIXES: .c .o
+.SUFFIXES: .c .o .obj
.c.o:
$(COMPILE) $<
+.c.obj:
+ $(COMPILE) $<
+
ANSI2KNR = @ANSI2KNR@
-O = address@hidden@o
+O = address@hidden@$(OBJEXT)
.SUFFIXES: ._c ._o
.c._c:
@@ -56,12 +61,12 @@
._c._o:
@echo $(COMPILE) $<
@rm -f _$*.c
- @ln $< _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c
+ @ln $< _$*.c && $(COMPILE) _$*.c && mv _$*.$(OBJEXT) $@ && rm _$*.c
.c._o:
./ansi2knr --varargs $< > $*._c
@echo $(COMPILE) $*._c
@rm -f _$*.c
- @ln $*._c _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c
+ @ln $*._c _$*.c && $(COMPILE) _$*.c && mv _$*.$(OBJEXT) $@ && rm _$*.c
INCLUDES = -I.. -I$(srcdir) -I$(srcdir)/../lib
@@ -74,24 +79,24 @@
DISTFILES = Makefile.in ansi2knr.c ansi2knr.1 $(HEADERS) $(SOURCES) \
TAGS
-all: m4
+all: m4$(EXEEXT)
-m4: $(OBJECTS) ../lib/libm4.a
+m4$(EXEEXT): $(OBJECTS) ../lib/libm4.a
$(LINK) $(OBJECTS) ../lib/libm4.a $(LIBS)
$(OBJECTS): $(ANSI2KNR) ../config.h m4.h ../lib/obstack.h
builtin$O: ../lib/regex.h
-ansi2knr: ansi2knr.o
- $(LINK) ansi2knr.o $(LIBS)
+ansi2knr: ansi2knr.$(OBJEXT)
+ $(LINK) ansi2knr.$(OBJEXT) $(LIBS)
install: all
$(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir)
- $(INSTALL_PROGRAM) m4 \
- $(DESTDIR)$(bindir)/`echo m4 | sed '$(transform)'`
+ $(INSTALL_PROGRAM) m4$(EXEEXT) \
+ $(DESTDIR)$(bindir)/`echo m4 | sed
'$(transform);s/$$/$(EXEEXT)/'`
uninstall:
- rm -f $(DESTDIR)$(bindir)/`echo m4 | sed '$(transform)'`
+ rm -f $(DESTDIR)$(bindir)/`echo m4 | sed '$(transform);s/$$/$(EXEEXT)/'`
tags: TAGS
@@ -99,10 +104,10 @@
cd $(srcdir) && etags -i ../lib/TAGS $(HEADERS) $(SOURCES)
mostlyclean:
- rm -f *.o *._c *._o core core.*
+ rm -f *.$(OBJEXT) *._c *._o core core.*
clean: mostlyclean
- rm -f m4
+ rm -f m4$(EXEEXT)
distclean: clean
rm -f Makefile ansi2knr
---------------------------
---------------------------
--- old/m4-1.4.4/lib/Makefile.in Sun May 1 13:34:08 2005
+++ gnu/m4-1.4.4/lib/Makefile.in Thu May 4 20:55:24 2006
@@ -30,21 +30,24 @@
CPPFLAGS = @CPPFLAGS@
DEFS = @DEFS@
RANLIB = @RANLIB@
+OBJEXT = @OBJEXT@
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
.SUFFIXES:
-.SUFFIXES: .c .o
+.SUFFIXES: .c .o .obj
.c.o:
$(COMPILE) $<
+.c.obj:
+ $(COMPILE) $<
INCLUDES = -I.. -I$(srcdir)
HEADERS = getopt.h obstack.h regex.h
SOURCES = regex.c getopt.c getopt1.c error.c obstack.c xmalloc.c \
xstrdup.c alloca.c strtol.c
-OBJECTS = regex.o getopt.o getopt1.o error.o obstack.o xmalloc.o \
-xstrdup.o @ALLOCA@ @LIBOBJS@
+OBJECTS = regex.$(OBJEXT) getopt.$(OBJEXT) getopt1.$(OBJEXT) error.$(OBJEXT) \
+obstack.$(OBJEXT) xmalloc.$(OBJEXT) xstrdup.$(OBJEXT) @ALLOCA@ @LIBOBJS@
DISTFILES = COPYING.LIB Makefile.in $(HEADERS) $(SOURCES) \
TAGS
@@ -68,7 +71,7 @@
cd $(srcdir) && etags $(HEADERS) $(SOURCES)
mostlyclean:
- rm -f *.o
+ rm -f *.$(OBJEXT)
clean: mostlyclean
rm -f libm4.a
---------------------------
---------------------------
--- old/m4-1.4.4/doc/Makefile.in Sun May 1 13:31:08 2005
+++ gnu/m4-1.4.4/doc/Makefile.in Thu May 4 21:57:12 2006
@@ -63,8 +63,24 @@
cd $(srcdir) && for file in m4.info*; do \
$(INSTALL_DATA) $$file $(DESTDIR)$(infodir)/$$file; \
done
+ @if (install-info --version && \
+ install-info --version 2>&1 | sed 1q | grep -i -v debian)
>/dev/null 2>&1; then \
+ cd $(srcdir) && for file in m4.info*; do \
+ relfile=`echo "$$file" | sed 's|^.*/||'`; \
+ echo " install-info --info-dir='$(DESTDIR)$(infodir)'
'$(DESTDIR)$(infodir)/$$relfile'";\
+ install-info --info-dir="$(DESTDIR)$(infodir)"
"$(DESTDIR)$(infodir)/$$relfile" || :;\
+ done; \
+ else : ; fi
uninstall:
+ @if (install-info --version && \
+ install-info --version 2>&1 | sed 1q | grep -i -v debian)
>/dev/null 2>&1; then \
+ cd $(DESTDIR)$(infodir) && for file in m4.info*; do \
+ relfile=`echo "$$file" | sed 's|^.*/||'`; \
+ echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove
'$(DESTDIR)$(infodir)/$$relfile'"; \
+ install-info --info-dir="$(DESTDIR)$(infodir)" --remove
"$(DESTDIR)$(infodir)/$$relfile"; \
+ done; \
+ else :; fi
rm -f $(DESTDIR)$(infodir)/m4.info*
mostlyclean:
---------------------------
- m4 1.4.4 on OS/2,
Andreas Büning <=
Re: m4 1.4.4 on OS/2, Eric Blake, 2006/05/10