]> Zhao Yanbai Git Server - minix.git/commitdiff
Improve makefile logic for building programs/libs
authorArun Thomas <arun@minix3.org>
Wed, 24 Feb 2010 11:58:05 +0000 (11:58 +0000)
committerArun Thomas <arun@minix3.org>
Wed, 24 Feb 2010 11:58:05 +0000 (11:58 +0000)
12 files changed:
etc/mk/minix.lib.mk
etc/mk/minix.links.mk [new file with mode: 0644]
etc/mk/minix.man.mk [new file with mode: 0644]
etc/mk/minix.own.mk
etc/mk/minix.prog.mk
lib/Makefile
lib/ack/libe/Makefile
lib/ack/libe/Makefile.inc [new file with mode: 0644]
lib/libc/Makefile
lib/libc/Makefile.inc [new file with mode: 0644]
lib/libend/Makefile
lib/libend/Makefile.inc [new file with mode: 0644]

index 5e80832c7c215b110898d4fffc0ee19946c062e6..9c893fbe6ff8d727da94fde36ff3353ebb2a4ed0 100644 (file)
@@ -135,8 +135,8 @@ ${DESTDIR}${LIBDIR}/lib${LIB}.a: lib${LIB}.a __archiveinstall
 .include <minix.files.mk>
 .include <minix.dep.mk>
 
-.if (${COMPILER_TYPE} == ack)
+.if ${COMPILER_TYPE} == "ack"
 .include <minix.ack.mk>
-.elif (${COMPILER_TYPE} == gnu)
+.elif ${COMPILER_TYPE} == "gnu"
 .include <minix.gcc.mk>
 .endif
diff --git a/etc/mk/minix.links.mk b/etc/mk/minix.links.mk
new file mode 100644 (file)
index 0000000..4ff1c93
--- /dev/null
@@ -0,0 +1,96 @@
+#      $NetBSD: bsd.links.mk,v 1.34 2009/04/10 16:16:12 apb Exp $
+
+.include <minix.init.mk>
+
+##### Basic targets
+install:       linksinstall
+
+##### Default values
+LINKS?=
+SYMLINKS?=
+LINKSOWN?=     ${BINOWN}
+LINKSGRP?=     ${BINGRP}
+LINKSMODE?=    ${NONBINMODE}
+
+__linkinstall: .USE
+       ${_MKSHMSG_INSTALL} ${.TARGET}; \
+       ${_MKSHECHO} "${INSTALL_LINK} \
+           -o ${LINKSOWN_${.ALLSRC:T}:U${LINKSOWN}} \
+           -g ${LINKSGRP_${.ALLSRC:T}:U${LINKSGRP}} \
+           -m ${LINKSMODE_${.ALLSRC:T}:U${LINKSMODE}} \
+           ${.ALLSRC} ${.TARGET}" && \
+       ${INSTALL_LINK} \
+           -o ${LINKSOWN_${.ALLSRC:T}:U${LINKSOWN}} \
+           -g ${LINKSGRP_${.ALLSRC:T}:U${LINKSGRP}} \
+           -m ${LINKSMODE_${.ALLSRC:T}:U${LINKSMODE}} \
+           ${.ALLSRC} ${.TARGET}
+
+##### Install rules
+.PHONY:                linksinstall
+linksinstall:: realinstall
+.if !empty(SYMLINKS)
+       @(set ${SYMLINKS}; \
+        while test $$# -ge 2; do \
+               l=$$1; shift; \
+               t=${DESTDIR}$$1; shift; \
+               if  ttarg=`${TOOL_STAT} -qf '%Y' $$t` && \
+                   [ "$$l" = "$$ttarg" ]; then \
+                       continue ; \
+               fi ; \
+               ${_MKSHMSG_INSTALL} $$t; \
+               ${_MKSHECHO} ${INSTALL_SYMLINK} $$l $$t; \
+               ${INSTALL_SYMLINK} $$l $$t; \
+        done; )
+.endif
+
+.for _src _dst in ${LINKS}
+_l:=${DESTDIR}${_src}
+_t:=${DESTDIR}${_dst}
+
+# Handle case conflicts carefully, when _dst occurs
+# more than once after case flattening
+.if ${MKUPDATE} == "no" || ${LINKS:tl:M${_dst:tl:Q}:[\#]} > 1
+${_t}!         ${_l} __linkinstall
+.else
+${_t}:         ${_l} __linkinstall
+.endif
+
+linksinstall:: ${_t}
+.PRECIOUS:     ${_t}
+.endfor
+
+configinstall:         configlinksinstall
+.PHONY:                        configlinksinstall
+configlinksinstall::   configfilesinstall
+.if !empty(CONFIGSYMLINKS)
+       @(set ${CONFIGSYMLINKS}; \
+        while test $$# -ge 2; do \
+               l=$$1; shift; \
+               t=${DESTDIR}$$1; shift; \
+               if  ttarg=`${TOOL_STAT} -qf '%Y' $$t` && \
+                   [ "$$l" = "$$ttarg" ]; then \
+                       continue ; \
+               fi ; \
+               ${_MKSHMSG_INSTALL} $$t; \
+               ${_MKSHECHO} ${INSTALL_SYMLINK} $$l $$t; \
+               ${INSTALL_SYMLINK} $$l $$t; \
+        done; )
+.endif
+
+.for _src _dst in ${CONFIGLINKS}
+_l:=${DESTDIR}${_src}
+_t:=${DESTDIR}${_dst}
+
+# Handle case conflicts carefully, when _dst occurs
+# more than once after case flattening
+.if ${MKUPDATE} == "no" || ${CONFIGLINKS:tl:M${_dst:tl:Q}:[\#]} > 1
+${_t}!         ${_l} __linkinstall
+.else
+${_t}:         ${_l} __linkinstall
+.endif
+
+configlinksinstall::   ${_t}
+.PRECIOUS:     ${_t}
+.endfor
+
+.include <minix.sys.mk>
diff --git a/etc/mk/minix.man.mk b/etc/mk/minix.man.mk
new file mode 100644 (file)
index 0000000..df015ff
--- /dev/null
@@ -0,0 +1,288 @@
+#      $NetBSD: bsd.man.mk,v 1.102 2009/10/23 23:12:10 joerg Exp $
+#      @(#)bsd.man.mk  8.1 (Berkeley) 6/8/93
+
+.include <minix.init.mk>
+
+##### Basic targets
+.PHONY:                maninstall manpages manlinks
+#.PHONY:               catinstall maninstall catpages manpages catlinks manlinks
+#.PHONY:               htmlinstall htmlpages htmllinks
+.if ${MKMANDOC} == "yes"
+.PHONY:                lintmanpages
+.endif
+realinstall:   ${MANINSTALL}
+
+##### Default values
+# .if ${USETOOLS} == "yes"
+# TMACDEPDIR?= ${TOOLDIR}/share/groff/tmac
+# .else
+# TMACDEPDIR?= /usr/share/tmac
+# .endif
+
+# HTMLDIR?=    ${DESTDIR}${MANDIR}
+# CATDEPS?=    ${TMACDEPDIR}/andoc.tmac \
+#              ${TMACDEPDIR}/doc.tmac \
+#              ${TMACDEPDIR}/mdoc/doc-common \
+#              ${TMACDEPDIR}/mdoc/doc-ditroff \
+#              ${TMACDEPDIR}/mdoc/doc-nroff \
+#              ${TMACDEPDIR}/mdoc/doc-syms
+# HTMLDEPS?=   ${TMACDEPDIR}/doc2html.tmac
+# MANTARGET?=  cat
+
+# MAN?=
+# MLINKS?=
+# _MNUMBERS=   1 2 3 4 5 6 7 8 9
+# .SUFFIXES:   ${_MNUMBERS:@N@.$N@}
+
+# .if ${MKMANZ} == "no"
+# MANCOMPRESS?=
+# MANSUFFIX?=
+# .else
+# MANCOMPRESS?=        gzip -ncf
+# MANSUFFIX?=  .gz
+# .endif
+
+# make MANCOMPRESS a filter, so it can be inserted on an as-needed basis
+.if !empty(MANCOMPRESS)
+MANCOMPRESS:=  | ${MANCOMPRESS}
+.endif
+
+__installpage: .USE
+       @cmp -s ${.ALLSRC} ${.TARGET} > /dev/null 2>&1 || \
+           (${_MKSHMSG_INSTALL} ${.TARGET}; \
+            ${_MKSHECHO} "${INSTALL_FILE} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \
+               ${.ALLSRC} ${.TARGET}" && \
+            ${INSTALL_FILE} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \
+               ${.ALLSRC} ${.TARGET})
+
+# XXX consider including bsd.links.mk and using __linkinstall instead
+__linkinstallpage: .USE
+       ${_MKSHMSG_INSTALL} ${.TARGET}; \
+       ${_MKSHECHO} "${INSTALL_LINK} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \
+           ${.ALLSRC} ${.TARGET}" && \
+       ${INSTALL_LINK} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \
+           ${.ALLSRC} ${.TARGET}
+
+##### Build and install rules (source form pages)
+
+.if ${MKMAN} != "no"
+maninstall:    manpages manlinks
+manpages::     # ensure target exists
+MANPAGES=      ${MAN:C/.$/&${MANSUFFIX}/}
+
+realall:       ${MANPAGES}
+.if !empty(MANSUFFIX)
+.NOPATH:       ${MANPAGES}
+.SUFFIXES:     ${_MNUMBERS:@N@.$N${MANSUFFIX}@}
+
+${_MNUMBERS:@N@.$N.$N${MANSUFFIX}@}:                   # build rule
+       ${_MKTARGET_FORMAT}
+       cat ${.IMPSRC} ${MANCOMPRESS} > ${.TARGET}.tmp && mv ${.TARGET}.tmp ${.TARGET}
+.endif # !empty(MANSUFFIX)
+
+.for F in ${MANPAGES:S/${MANSUFFIX}$//:O:u}
+_F:=           ${DESTDIR}${MANDIR}/man${F:T:E}${MANSUBDIR}/${F}${MANSUFFIX}
+
+.if ${MKUPDATE} == "no"
+${_F}!         ${F}${MANSUFFIX} __installpage          # install rule
+.if !defined(BUILD) && !make(all) && !make(${F})
+${_F}!         .MADE                                   # no build at install
+.endif
+.else
+${_F}:         ${F}${MANSUFFIX} __installpage          # install rule
+.if !defined(BUILD) && !make(all) && !make(${F})
+${_F}:         .MADE                                   # no build at install
+.endif
+.endif
+
+manpages::     ${_F}
+.PRECIOUS:     ${_F}                                   # keep if install fails
+.endfor
+
+manlinks::                                             # link install
+
+.for _src _dst in ${MLINKS}
+_l:=${DESTDIR}${MANDIR}/man${_src:T:E}${MANSUBDIR}/${_src}${MANSUFFIX}
+_t:=${DESTDIR}${MANDIR}/man${_dst:T:E}${MANSUBDIR}/${_dst}${MANSUFFIX}
+
+# Handle case conflicts carefully, when _dst occurs
+# more than once after case flattening
+.if ${MKUPDATE} == "no" || ${MLINKS:tl:M${_dst:tl:Q}:[\#]} > 1
+${_t}!         ${_l} __linkinstallpage
+.else
+${_t}:         ${_l} __linkinstallpage
+.endif
+
+manlinks::     ${_t}
+.PRECIOUS:     ${_t}
+.endfor
+.endif # ${MKMAN} != "no"
+
+# ##### Build and install rules (plaintext pages)
+
+# .if (${MKCATPAGES} != "no") && (${MKMAN} != "no")
+# catinstall:  catpages catlinks
+# catpages::   # ensure target exists
+# CATPAGES=    ${MAN:C/\.([1-9])$/.cat\1${MANSUFFIX}/}
+
+# realall:     ${CATPAGES}
+# .NOPATH:     ${CATPAGES}
+# .SUFFIXES:   ${_MNUMBERS:@N@.cat$N${MANSUFFIX}@}
+# .MADE:       ${CATDEPS}
+
+# ${_MNUMBERS:@N@.$N.cat$N${MANSUFFIX}@}: ${CATDEPS}   # build rule
+#      ${_MKTARGET_FORMAT}
+# .if defined(USETBL)
+#      ${TOOL_TBL} ${.IMPSRC} | ${TOOL_ROFF_ASCII} -mandoc ${MANCOMPRESS} \
+#          > ${.TARGET}.tmp && mv ${.TARGET}.tmp ${.TARGET}
+# .elif ${MKMANDOC} == yes && !defined(NOMANDOC)
+#      if test ""${NOMANDOC.${.IMPSRC:T}:tl:Q} != "yes"; then \
+#              ${TOOL_MANDOC_ASCII} ${.IMPSRC} ${MANCOMPRESS} \
+#                  > ${.TARGET}.tmp && mv ${.TARGET}.tmp ${.TARGET}; \
+#      else \
+#              ${TOOL_ROFF_ASCII} -mandoc ${.IMPSRC} ${MANCOMPRESS} \
+#                  > ${.TARGET}.tmp && mv ${.TARGET}.tmp ${.TARGET}; \
+#      fi
+# .else
+#      ${TOOL_ROFF_ASCII} -mandoc ${.IMPSRC} ${MANCOMPRESS} \
+#          > ${.TARGET}.tmp && mv ${.TARGET}.tmp ${.TARGET}
+# .endif
+
+# .for F in ${CATPAGES:S/${MANSUFFIX}$//:O:u}
+# _F:=         ${DESTDIR}${MANDIR}/${F:T:E}${MANSUBDIR}/${F:R}.0${MANSUFFIX}
+
+# .if ${MKUPDATE} == "no"
+# ${_F}!               ${F}${MANSUFFIX} __installpage          # install rule
+# .if !defined(BUILD) && !make(all) && !make(${F})
+# ${_F}!               .MADE                                   # no build at install
+# .endif
+# .else
+# ${_F}:               ${F}${MANSUFFIX} __installpage          # install rule
+# .if !defined(BUILD) && !make(all) && !make(${F})
+# ${_F}:               .MADE                                   # no build at install
+# .endif
+# .endif
+
+# catpages::   ${_F}
+# .PRECIOUS:   ${_F}                                   # keep if install fails
+# .endfor
+
+# catlinks::                                           # link install
+
+# .for _src _dst in ${MLINKS}
+# _l:=${DESTDIR}${MANDIR}/cat${_src:T:E}${MANSUBDIR}/${_src:R}.0${MANSUFFIX}
+# _t:=${DESTDIR}${MANDIR}/cat${_dst:T:E}${MANSUBDIR}/${_dst:R}.0${MANSUFFIX}
+
+# # Handle case conflicts carefully, when _dst occurs
+# # more than once after case flattening
+# .if ${MKUPDATE} == "no" || ${MLINKS:tl:M${_dst:tl:Q}:[\#]} > 1
+# ${_t}!               ${_l} __linkinstallpage
+# .else
+# ${_t}:               ${_l} __linkinstallpage
+# .endif
+
+# catlinks::   ${_t}
+# .PRECIOUS:   ${_t}
+# .endfor
+# .endif # (${MKCATPAGES} != "no") && (${MKMAN} != "no")
+
+# ##### Build and install rules (HTML pages)
+
+# .if (${MKHTML} != "no") && (${MKMAN} != "no")                # {
+# htmlinstall: htmlpages htmllinks
+# htmlpages::  # ensure target exists
+# HTMLPAGES=   ${MAN:C/\.([1-9])$/.html\1/}
+
+# realall:     ${HTMLPAGES}
+# .NOPATH:     ${HTMLPAGES}
+# .SUFFIXES:   ${_MNUMBERS:@N@.html$N@}
+# .MADE:       ${HTMLDEPS}
+
+# ${_MNUMBERS:@N@.$N.html$N@}: ${HTMLDEPS}                     # build rule
+#      ${_MKTARGET_FORMAT}
+# .if ${MKMANDOC} == "yes" && !defined(NOMANDOC)
+#      if test ""${NOMANDOC.${.IMPSRC:T}:tl:Q} != "yes"; then \
+#              ${TOOL_MANDOC_HTML} ${.IMPSRC} > ${.TARGET}.tmp && \
+#                  mv ${.TARGET}.tmp ${.TARGET}; \
+#      else \
+#              ${TOOL_ROFF_HTML} ${.IMPSRC} > ${.TARGET}.tmp && \
+#                  mv ${.TARGET}.tmp ${.TARGET}; \
+#      fi
+# .else
+#      ${TOOL_ROFF_HTML} ${.IMPSRC} > ${.TARGET}.tmp && \
+#          mv ${.TARGET}.tmp ${.TARGET}
+# .endif
+
+# .for F in ${HTMLPAGES:O:u}
+# # construct installed path
+# _F:=         ${HTMLDIR}/${F:T:E}${MANSUBDIR}/${F:R:S-/index$-/x&-}.html
+
+# .if ${MKUPDATE} == "no"
+# ${_F}!               ${F} __installpage                      # install rule
+# .if !defined(BUILD) && !make(all) && !make(${F})
+# ${_F}!               .MADE                                   # no build at install
+# .endif
+# .else
+# ${_F}:               ${F} __installpage                      # install rule
+# .if !defined(BUILD) && !make(all) && !make(${F})
+# ${_F}:               .MADE                                   # no build at install
+# .endif
+# .endif
+
+# htmlpages::  ${_F}
+# .PRECIOUS:   ${_F}                                   # keep if install fails
+# .endfor
+
+# htmllinks::                                          # link install
+
+# .for _src _dst in ${MLINKS}
+# _l:=${HTMLDIR}/html${_src:T:E}${MANSUBDIR}/${_src:R:S-/index$-/x&-}.html
+# _t:=${HTMLDIR}/html${_dst:T:E}${MANSUBDIR}/${_dst:R:S-/index$-/x&-}.html
+
+# # Handle case conflicts carefully, when _dst occurs
+# # more than once after case flattening
+# .if ${MKUPDATE} == "no" || ${MLINKS:tl:M${_dst:tl:Q}:[\#]} > 1
+# ${_t}!               ${_l} __linkinstallpage
+# .else
+# ${_t}:               ${_l} __linkinstallpage
+# .endif
+
+# htmllinks::  ${_t}
+# .PRECIOUS:   ${_t}
+# .endfor
+
+# .endif                                                       # }
+
+##### Clean rules
+.undef _F
+
+cleandir: cleanman
+.if !empty(CLEANFILES)
+       rm -f ${CLEANFILES}
+.endif
+
+cleanman: .PHONY
+.if !empty(MAN) && (${MKMAN} != "no")
+.if (${MKCATPAGES} != "no")
+       rm -f ${CATPAGES}
+.endif
+.if !empty(MANSUFFIX)
+       rm -f ${MANPAGES} ${CATPAGES:S/${MANSUFFIX}$//}
+.endif
+.if ${MKHTML} != "no"
+       rm -f ${HTMLPAGES}
+.endif
+.endif
+# (XXX ${CATPAGES:S...} cleans up old .catN files where .catN.gz now used)
+
+# .if ${MKMANDOC} == "yes" && !empty(MANPAGES)
+# lintmanpages: ${MANPAGES}
+#      ${TOOL_MANDOC_LINT} -Tlint -fstrict ${.ALLSRC}
+# .endif
+
+##### Pull in related .mk logic
+.include <minix.obj.mk>
+.include <minix.files.mk>
+.include <minix.sys.mk>
+
+${TARGETS} catinstall maninstall htmlinstall: # ensure existence
index 1e67be05e248b98b7fbf709bd59e682d52c5e471..a0e912ac32d9ab328a248c3adf625d143cbcbf50 100644 (file)
@@ -3,9 +3,12 @@
 .if !defined(_MINIX_OWN_MK_)
 _MINIX_OWN_MK_=1
 
-MAKECONF?=     /etc/mk.conf
+MAKECONF?=     /etc/make.conf
 .-include "${MAKECONF}"
 
+#Set to ack by default
+COMPILER_TYPE?=ack
+
 #
 # CPU model, derived from MACHINE_ARCH
 #
@@ -419,11 +422,14 @@ BINOWN?=  root
 BINMODE?=      555
 NONBINMODE?=   444
 
-MANDIR?=       /usr/share/man
-MANGRP?=       wheel
+#MANDIR?=      /usr/share/man
+MANDIR?=       /usr/man
+#MANGRP?=      wheel
+MANGRP?=       operator
 MANOWN?=       root
 MANMODE?=      ${NONBINMODE}
-MANINSTALL?=   catinstall htmlinstall maninstall
+#MANINSTALL?=  catinstall htmlinstall maninstall
+MANINSTALL?=   maninstall
 
 INFODIR?=      /usr/share/info
 INFOGRP?=      wheel
@@ -431,9 +437,9 @@ INFOOWN?=   root
 INFOMODE?=     ${NONBINMODE}
 
 #LIBDIR?=      /usr/lib
-.if (${COMPILER_TYPE} == ack)
+.if ${COMPILER_TYPE} == "ack"
 LIBDIR?=       /usr/lib/i386
-.elif (${COMPILER_TYPE} == gnu)
+.elif ${COMPILER_TYPE} == "gnu"
 LIBDIR?=       /usr/gnu/lib
 .endif
 
@@ -763,7 +769,9 @@ PRESERVE?=  -p
 .endif
 #XXX: Not supported by MINIX install
 #RENAME?=      -r
-HRDLINK?=      -l h
+#XXX: MINIX install only supports hard link
+#HRDLINK?=     -l h
+HRDLINK?=      -l
 SYMLINK?=      -l s
 
 METALOG?=      ${DESTDIR}/METALOG
index c10f8a8e79e442ca4f359177b04339f11bfb1bfd..31c7446012b3d05fb10c2592dae80ee7b17e04b5 100644 (file)
@@ -52,6 +52,11 @@ MKDEP_SUFFIXES?=     .o .ln
        rumpfs_tmpfs rumpfs_udf rumpfs_ufs
 .ifndef LIB${_lib:tu}
 LIB${_lib:tu}= ${DESTDIR}/usr/lib/lib${_lib}.a
+.if ${COMPILER_TYPE} == "ack"
+LIB${_lib:tu}= ${DESTDIR}/usr/lib/i386/lib${_lib}.a
+.elif ${COMPILER_TYPE} == "gnu"
+LIB${_lib:tu}= ${DESTDIR}/usr/gnu/lib/lib${_lib}.a
+.endif
 .MADE:         ${LIB${_lib:tu}}        # Note: ${DESTDIR} will be expanded
 .endif
 .endfor
@@ -203,7 +208,7 @@ LOBJS.${_P}+=       ${LSRCS:.c=.ln} ${SRCS.${_P}:M*.c:.c=.ln}
 
 ${OBJS.${_P}} ${LOBJS.${_P}}: ${DPSRCS}
 
-${_P}: .gdbinit ${LIBCRT0} ${OBJS.${_P}} ${LIBC} ${LIBCRTBEGIN} ${LIBCRTEND} ${DPADD}
+${_P}: ${LIBCRT0} ${OBJS.${_P}} ${LIBC} ${LIBCRTBEGIN} ${LIBCRTEND} ${DPADD}
 .if !commands(${_P})
        ${_MKTARGET_LINK}
        ${_CCLINK.${_P}} \
@@ -351,16 +356,16 @@ scriptsinstall::
 LINKSOWN?= ${BINOWN}
 LINKSGRP?= ${BINGRP}
 LINKSMODE?= ${BINMODE}
-.include <minix.man.mk>
+.include <minix.man.mk>
 .include <minix.files.mk>
 # .include <minix.inc.mk>
-.include <minix.links.mk>
+.include <minix.links.mk>
 .include <minix.sys.mk>
 .include <minix.dep.mk>
 
-.if (${COMPILER_TYPE} == ack)
+.if ${COMPILER_TYPE} == "ack"
 .include <minix.ack.mk>
-.elif (${COMPILER_TYPE} == gnu)
+.elif ${COMPILER_TYPE} == "gnu"
 .include <minix.gcc.mk>
 .endif
 
index 63de6aa0cdd4119417394f4c1f15d411b9048199..41a1a470036c2777c90b31f50196345cdb5fb98a 100644 (file)
@@ -2,7 +2,7 @@
 
 SUBDIR= csu libc libcurses libend libedit libm libsys libtimers libutil
 
-.if (${COMPILER_TYPE} == ack)
+.if ${COMPILER_TYPE} == "ack"
 SUBDIR+= ack/libd ack/libe ack/libfp ack/liby
 .endif
 
index 83fa0ff41beac8c05108a032c4d1b68475d620f7..458f61571faf88cc1aaebac774c100e3a738ad84 100644 (file)
@@ -1,5 +1,7 @@
 # Makefile for libe
 
+.include <minix.own.mk>
+
 LIB=           e
 
 AFLAGS+=-O -D_MINIX -D_POSIX_SOURCE -Was-ack
diff --git a/lib/ack/libe/Makefile.inc b/lib/ack/libe/Makefile.inc
new file mode 100644 (file)
index 0000000..7729eaa
--- /dev/null
@@ -0,0 +1 @@
+.include <minix.own.mk>
index 862a90b54450ecabd6f95e08bb5032a42744ccae..e24a63d6f4829cdf1ec36848fd697b64f4cf958a 100644 (file)
@@ -1,5 +1,7 @@
 # Makefile for libc
 
+.include "Makefile.inc"
+
 LIB=           c
 
 CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE
@@ -21,11 +23,11 @@ CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE
 .include "${.CURDIR}/arch/${ARCH}/rts/Makefile.inc"
 .include "${.CURDIR}/arch/${ARCH}/string/Makefile.inc"
 
-.if (${COMPILER_TYPE} == ack)
+.if ${COMPILER_TYPE} == "ack"
 .include "${.CURDIR}/ack/fphook/Makefile.inc"
 .include "${.CURDIR}/ack/math/Makefile.inc"
 .include "${.CURDIR}/ack/rts/Makefile.inc"
-.elif (${COMPILER_TYPE} == gnu)
+.elif ${COMPILER_TYPE} == "gnu"
 .include "${.CURDIR}/gnu/ieee_float/Makefile.inc"
 .include "${.CURDIR}/gnu/arch/${ARCH}/rts/Makefile.inc"
 .endif
diff --git a/lib/libc/Makefile.inc b/lib/libc/Makefile.inc
new file mode 100644 (file)
index 0000000..7729eaa
--- /dev/null
@@ -0,0 +1 @@
+.include <minix.own.mk>
index d9af4637d92f8c64eec141c3d27cc0b89bef6fad..4ce20a717ccc665372a4efa61538a6b3dbd55fc7 100644 (file)
@@ -1,5 +1,7 @@
 # Makefile for libend
 
+.include "Makefile.inc"
+
 LIB=end
 
 SRCS=  \
@@ -8,7 +10,7 @@ SRCS=  \
        end.s \
        etext.s
 
-.if (${COMPILER_TYPE} == gnu)
+.if ${COMPILER_TYPE} == "gnu"
 .include "${.CURDIR}/gnu/Makefile.inc"
 .endif
 
diff --git a/lib/libend/Makefile.inc b/lib/libend/Makefile.inc
new file mode 100644 (file)
index 0000000..7729eaa
--- /dev/null
@@ -0,0 +1 @@
+.include <minix.own.mk>