debian/0000755000000000000000000000000012266362325007175 5ustar debian/control0000644000000000000000000000167112260557134010603 0ustar Source: bmake Section: devel Priority: optional Maintainer: Andrew Shadura Standards-Version: 3.9.4 Build-Depends: debhelper (>= 9), groff, dh-autoreconf Homepage: http://www.crufty.net/help/sjg/bmake.html Package: bmake Architecture: any Multi-Arch: foreign Replaces: pmake Provides: pmake Depends: ${shlibs:Depends}, ${misc:Depends} Description: NetBSD make bmake is a program designed to simplify the maintenance of other programs. Its input is a list of specifications as to the files upon which programs and other files depend. mkdep, a program to construct Makefile dependency lists, is also included. . bmake is a port of the NetBSD make tool. Package: pmake Architecture: all Depends: bmake, ${misc:Depends} Description: NetBSD make (transitional package) This is a dummy package to aid in transitioning from pmake package to the new bmake package. . This dummy package may be safely removed after upgrading. debian/bmake.install0000644000000000000000000000017112260536074011641 0ustar bmake pmake debian/mkdep usr/bin debian/mk/* usr/share/mk/ debian/bmake.pm usr/share/perl5/Debian/Debhelper/Buildsystem/ debian/watch0000644000000000000000000000017612260536074010230 0ustar version=3 #http://ftp.netbsd.org/pub/NetBSD/misc/sjg/bmake-(\d{8})\.tar\.gz http://crufty.net/ftp/pub/sjg/bmake-(.*)\.tar\.gz debian/clean0000644000000000000000000000024212260536074010176 0ustar pmake Makefile.config config.h config.log config.status make-bootstrap.sh makefile unit-tests/Makefile unit-tests/test.* PSD.doc/tutorial.asc PSD.doc/tutorial.ps debian/bmake.dirs0000644000000000000000000000005112260536074011131 0ustar usr/bin usr/share/mk usr/share/doc/bmake debian/changelog0000644000000000000000000002650512266362043011054 0ustar bmake (20131001-4) unstable; urgency=low * Don't include OS prefix in MACHINE_ARCH (Closes: #735856, patch by Robert Millan). -- Andrew Shadura Sat, 18 Jan 2014 03:17:05 +0100 bmake (20131001-3) unstable; urgency=low * Add patch to fix segfault in hash.c, drop old var.c patch. -- Andrew Shadura Sat, 04 Jan 2014 16:21:42 +0100 bmake (20131001-2) unstable; urgency=low * Check for sysctl(2) presence (unbreaks build for Hurd). * Clean up pkgsrc mk files: - Set correct MACHINE_GNU_PLATFORM. - Don't try to link against crtBegin.o explicitly. - Eliminate the need for a separate "debian" machine type. -- Andrew Shadura Tue, 31 Dec 2013 18:45:49 +0100 bmake (20131001-1) unstable; urgency=low * New upstream release. * Set MAKE_VERSION variable (Closes: #733654). * Update copyright information. * Drop old manpage patch, rename make(1) to bmake(1). * Set real OS variable in sys.mk. -- Andrew Shadura Tue, 31 Dec 2013 00:10:55 +0100 bmake (20130904-1) unstable; urgency=low * Rename the package to bmake, add a transitional package (Closes: #627983). * New upstream release -- Andrew Shadura Sun, 22 Sep 2013 16:07:33 +0200 pmake (20130730-3) unstable; urgency=low * Disable MAKEFLAGS patch, apparently it breaks more than fixes. -- Andrew Shadura Sun, 22 Sep 2013 15:31:06 +0200 pmake (20130730-2) unstable; urgency=low * Provide bmake. * Add buildsystem addon for debhelper. -- Andrew Shadura Thu, 15 Aug 2013 02:52:01 +0200 pmake (20130730-1) unstable; urgency=low * New maintainer. * New release based on bmake-20130730. * The main binary is now bmake, pmake is a compatibility symlink. * Use debhelper 9. * Bump Standards-Version to 3.9.4. -- Andrew Shadura Wed, 14 Aug 2013 22:55:06 +0200 pmake (1.111-3.3) unstable; urgency=low * Non-maintainer upload. * Mark pmake as Multi-Arch: foreign. The default configuration does differ on different architectures, but it can be overridden by setting MACHINE_ARCH and MACHINE_MULTIARCH (closes: #694907). * Use correct compiler when cross-building (closes: #694909). -- Colin Watson Tue, 04 Jun 2013 11:27:37 +0100 pmake (1.111-3.2) unstable; urgency=low * Non-maintainer upload. * Fix "powerpc and sparc64 considered as incomplete" Patch by Aurelien Jarno Closes: 640919 -- Anibal Monsalve Salazar Thu, 22 Sep 2011 08:39:25 +1000 pmake (1.111-3.1) unstable; urgency=low * Non-maintainer upload. * Fix missing -Wl for linker arguments Patch by Guillem Jover Closes: 628677 -- Anibal Monsalve Salazar Sat, 25 Jun 2011 18:55:30 +1000 pmake (1.111-3) unstable; urgency=low * 100_mk.diff: prepend -Wl for linker-only flags (Closes: 610516). * 140_multiarch.diff: new patch for multiarch, courtesy of Guillem Jover; fixes hardcoded paths (Closes: #626877). * 150_mktemp.diff: new patch, replace insecure temporary file handling with proper mktemp use, courtesy of Matej Vela (Closes: 626673). -- Sam Hocevar Sun, 29 May 2011 15:44:08 +0200 pmake (1.111-2) unstable; urgency=low [ Sam Hocevar ] * Switch package to 3.0 (quilt) format. * debian/patches: rough split of the old patch. * debian/control: set policy to 3.8.3. [ Thorsten Glaser ] * Port to hurd-i386 (Closes: #547459) - make.h: define MAXPATHLEN if not defined (XXX kludge) - main.c: check sysconf(_PC_PATH_MAX) and bail out if larger than the defined kludge value; inform the user appropriately I’m doing it this way because this codebase is ancient, and to really fix this issue is not worth the effort. No activity in more than four years speaks for itself. * mk/sys.mk: We do not run NetBSD® but Debian. (Closes: #493839) * debian/rules: Replace 「dpkg --print-gnu-build-architecture」 with 「dpkg-architecture -qDEB_HOST_ARCH_CPU」 to unbreak build. * debian/rules: Use -Wno-unused to clean up build messages. -- Sam Hocevar Mon, 21 Dec 2009 22:43:44 +0100 pmake (1.111-1) unstable; urgency=low * New upstream snapshot. * This version properly parses arguments and does not crash when parameters are missing (Closes: #287336, #316394). * debian/control: + Set policy to 3.6.2.1. -- Sam Hocevar (Debian packages) Thu, 7 Jul 2005 10:20:56 +0200 pmake (1.98-3) unstable; urgency=low * mk/bsd.man.mk: + Use symlinks instead of hard links when using the MLINKS directive to link manual pages, courtesy of Robert Millan. -- Sam Hocevar (Debian packages) Fri, 12 Mar 2004 13:14:27 +0100 pmake (1.98-2) unstable; urgency=low * buf.c: + Work around a GCC 3 ICE on hppa. -- Sam Hocevar (Debian packages) Wed, 10 Mar 2004 18:43:16 +0100 pmake (1.98-1) unstable; urgency=low * New maintainer (Closes: #218804). * New upstream version from NetBSD HEAD (Closes: #134798). * Moved to a non-native package. * debian/rules: + Switched to debhelper. * main.c: + Parse $MAKE instead of $MAKEFLAGS when called from GNU make to avoid strange interactions (Closes: #189097). -- Sam Hocevar (Debian packages) Fri, 27 Feb 2004 16:04:12 +0100 pmake (1.45-11) unstable; urgency=low * Set defaults to match policy better. Closes: #150895. Thanks to Matej Vela for the patch. -- Steve McIntyre <93sam@debian.org> Sun, 30 Jun 2002 23:52:31 +0100 pmake (1.45-10) unstable; urgency=low * Fixed broken '.Nm ""' directives in the man page. Closes: #137768 * Changed name from "make" to "pmake" in manpage. -- Steve McIntyre <93sam@debian.org> Tue, 12 Mar 2002 21:59:55 +0000 pmake (1.45-9) unstable; urgency=low * Fixed broken .Bl directives in the man page. Closes: #117723 -- Steve McIntyre <93sam@debian.org> Sun, 04 Nov 2001 17:00:14 +0000 pmake (1.45-8) unstable; urgency=high * High urgency because of two important bug fixes... * Fixed important bug in getopt handling that broke -n flag in recursive Makefiles. Closes: #109608 * Modified shared library targets to use $(CC) -shared instead of $(LD) -x -shared, which didn't work. Closes: #109959 -- Steve McIntyre <93sam@debian.org> Sat, 08 Sep 2001 15:35:11 +0100 pmake (1.45-7) unstable; urgency=low * Don't depend on particular locations of groff's macros, as they may change, and indeed have done with groff 1.17 (closes: #101973). Thanks to Colin Watson for the patch. -- Steve McIntyre <93sam@debian.org> Sun, 24 Apr 2001 02:40:21 +0100 pmake (1.45-6) unstable; urgency=low * Make sure that make execs a shell to expand target rules containing "~". Closes: #89313. * Fixed the definition of "sh" in job.c so that pmake will play nicely with bash if non-compat mode is used (e.g parallel makes). It was assuming that "sh" was "ash" and understood the -q flag. -- Steve McIntyre <93sam@debian.org> Tue, 17 Apr 2001 02:10:41 +0100 pmake (1.45-5) unstable; urgency=low * Applied patch for Hurd from Igor Khavkine . * Added Build-Depends for groff. Closes: #90358 * New maintainer address * Updated Standards-Version. -- Steve McIntyre <93sam@debian.org> Thu, 22 Mar 2001 19:19:08 +0100 pmake (1.45-4) unstable; urgency=low * New maintainer. * Updated Standards-Version. * Fixed multiple lintian warnings. -- Steve McIntyre Sun, 21 May 2000 18:36:23 +0100 pmake (1.45-3.2) frozen unstable; urgency=low * it's for frozen too -- Jim Lynch Mon, 6 Mar 2000 09:03:28 +0800 pmake (1.45-3.1) unstable; urgency=low * Apply patch in Bug#56878 (Closes Bug#56878) -- Jim Lynch Sun, 5 Mar 2000 12:45:54 +0800 pmake (1.45-3) unstable; urgency=low * Unconditionally set OBJECT_FMT to "a.out" in mk/bsd.own.mk (Fixes crtbegin/crtend.o problems on powerpc and alpha). (Closes Bug#38951). -- Edward Brocklesby Sun, 6 Jun 1999 09:35:15 +0000 pmake (1.45-2) unstable; urgency=low * Fixed crt0.o stuff in mk/bsd.prog.mk. * Fixed FUD in /usr/share/mk/bsd.README -- Edward Brocklesby Sun, 23 May 1999 16:55:06 +0000 pmake (1.45-1) unstable; urgency=low * New upstream version. * Moved mk files back from /usr/lib/mk to /usr/share/mk. -- Edward Brocklesby Wed, 5 May 1999 21:08:58 +0000 pmake (1.39-4) unstable; urgency=low * New maintainer. -- Edward Brocklesby Tue, 23 Feb 1999 21:01:53 +0000 pmake (1.39-3) unstable; urgency=low * debian/control (Maintainer): new address. * debian/copyright: ditto. * debian/control (Standards-Version): updated to 2.5.0.0. -- James Troup Tue, 10 Nov 1998 13:37:41 +0000 pmake (1.39-2) frozen unstable; urgency=medium * mk/bsd.man.mk: correct CATDEPS, Herbet Xu . [#21158] * debian/control (Standards-Version): Updated to 2.4.1.0. -- James Troup Wed, 15 Apr 1998 12:12:11 +0200 pmake (1.39-1) unstable; urgency=high * New upstream version [98-03-16]. * Reverts back to .orig.tar.gz and .diff.gz. * Replace mkdep with the one from OpenBSD as it deals with temporary files in a secure fashion. [#19806] * pmake now comes with ASCII and postscript versions of the pmake tutorial in /usr/doc/pmake/. * debian/control: Updated Standards-Version to 2.4.0.0 [#16780]. * debian/copyright: Corrected ftp site information. * debian/copyright: Expanded changes description. * debian/rules: No longer uses {,} and other minor changes. * mk/bsd.doc.mk: Groff's tmac macros are in /usr/share/groff/tmac, not /usr/share/tmac on Debian GNU/Linux. * mk/bsd.lib.mk: added a machine definition "debian". * mk/bsd.own.mk: s#/usr/share/"/usr/" for MANDIR and DOCDIR. * mk/bsd.own.mk: s/wheel/root/g. * mk/bsd.own.mk: define MANZ. * mk/bsd.own.mk: don't make files unwritable by owner. * mk/bsd.prog.mk: undefine LIBCRT0. * mk/sys.mk: MAKE is pmake not GNU make. * var.c: #include because needs it. * util.c: don't try to redefine libc functions by #ifndefing a large chunk on (__linux__). -- James Troup Thu, 19 Mar 1998 20:53:45 +0100 pmake (1.0-17) unstable; urgency=low * Fixed mk/bsd.lib.mk so that bogus `-q' argument isn't passed to tsort [#11536] -- James Troup Mon, 28 Jul 1997 21:17:39 +0100 pmake (1.0-16) unstable; urgency=low * Abandonned debian diff, since the diff is bigger than the original source. * Added mkdep (again from NetBSD Current) [fixes #11464]. -- James Troup Fri, 25 Jul 1997 13:50:44 +0100 pmake (1.0-15) unstable; urgency=low * Updated source to NetBSD Current. * Rebuilt with libc6. -- James Troup Sat, 5 Jul 1997 01:10:27 +0100 pmake (1.0-14) unstable; urgency=low * New maintainer. * Upgraded to Standards 2.1.3.0 (Fixes bug #9491, #3793). * bsd.lib.mk no longer passes spurious `T' argument to ar (Fixes bug #3793), patch from Philip Blundell . -- James Troup Wed, 14 May 1997 01:34:07 +0100 Local variables: mode: debian-changelog End: debian/pmake.10000644000000000000000000000001412260536074010345 0ustar .so bmake.1 debian/mk/0000755000000000000000000000000012263715437007607 5ustar debian/mk/bsd.man.mk0000644000000000000000000001135212260536074011457 0ustar # $NetBSD: bsd.man.mk,v 1.1.1.1 2006/07/14 23:13:00 jlam Exp $ # @(#)bsd.man.mk 8.1 (Berkeley) 6/8/93 .if !target(__initialized__) __initialized__: .if exists(${.CURDIR}/../Makefile.inc) .include "${.CURDIR}/../Makefile.inc" .endif .include .include .include .MAIN: all .endif .PHONY: catinstall maninstall catpages manpages catlinks manlinks cleanman html installhtml cleanhtml .if ${MKMAN} != "no" realinstall: ${MANINSTALL} .endif cleandir: cleanman MANTARGET?= cat NROFF?= nroff -Tascii GROFF?= groff -Tascii TBL?= tbl .SUFFIXES: .1 .2 .3 .4 .5 .6 .7 .8 .9 \ .cat1 .cat2 .cat3 .cat4 .cat5 .cat6 .cat7 .cat8 .cat9 \ .html1 .html2 .html3 .html4 .html5 .html6 .html7 .html8 .html9 .9.cat9 .8.cat8 .7.cat7 .6.cat6 .5.cat5 .4.cat4 .3.cat3 .2.cat2 .1.cat1: .if !defined(USETBL) @echo "${NROFF} -mandoc ${.IMPSRC} > ${.TARGET}" @${NROFF} -mandoc ${.IMPSRC} > ${.TARGET} || \ (rm -f ${.TARGET}; false) .else @echo "${TBL} ${.IMPSRC} | ${NROFF} -mandoc > ${.TARGET}" @${TBL} ${.IMPSRC} | ${NROFF} -mandoc > ${.TARGET} || \ (rm -f ${.TARGET}; false) .endif .9.html9 .8.html8 .7.html7 .6.html6 .5.html5 .4.html4 .3.html3 .2.html2 .1.html1: .if !defined(USETBL) @echo "${GROFF} -mdoc2html -P-b -P-u -P-o ${.IMPSRC} > ${.TARGET}" @${GROFF} -mdoc2html -P-b -P-u -P-o ${.IMPSRC} > ${.TARGET} || \ (rm -f ${.TARGET}; false) .else @echo "${TBL} ${.IMPSRC} | ${GROFF} -mdoc2html -P-b -P-u -P-o > ${.TARGET}" @cat ${.IMPSRC} | ${GROFF} -mdoc2html -P-b -P-u -P-o > ${.TARGET} || \ (rm -f ${.TARGET}; false) .endif .if defined(MAN) && !empty(MAN) MANPAGES= ${MAN} CATPAGES= ${MANPAGES:C/(.*).([1-9])/\1.cat\2/} .NOPATH: ${CATPAGES} .if !defined(NOHTML) HTMLPAGES= ${MANPAGES:C/(.*).([1-9])/\1.html\2/} .endif .endif MINSTALL= ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} \ -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} .if defined(MANZ) # chown and chmod are done afterward automatically MCOMPRESS= gzip -9cf MCOMPRESSSUFFIX= .gz .endif catinstall: catlinks maninstall: manlinks __installpage: .USE .if defined(MCOMPRESS) && !empty(MCOMPRESS) @rm -f ${.TARGET} ${MCOMPRESS} ${.ALLSRC} > ${.TARGET} @chown ${MANOWN}:${MANGRP} ${.TARGET} @chmod ${MANMODE} ${.TARGET} .else @cmp -s ${.ALLSRC} ${.TARGET} > /dev/null 2>&1 || \ (echo "${MINSTALL} ${.ALLSRC} ${.TARGET}" && \ ${MINSTALL} ${.ALLSRC} ${.TARGET}) .endif # Rules for cat'ed man page installation .if defined(CATPAGES) && !empty(CATPAGES) && ${MKCATPAGES} != "no" catpages:: ${CATPAGES:@P@${DESTDIR}${MANDIR}/${P:T:E}${MANSUBDIR}/${P:T:R}.0${MCOMPRESSSUFFIX}@} .PRECIOUS: ${CATPAGES:@P@${DESTDIR}${MANDIR}/${P:T:E}${MANSUBDIR}/${P:T:R}.0${MCOMPRESSSUFFIX}@} .if !defined(UPDATE) .PHONY: ${CATPAGES:@P@${DESTDIR}${MANDIR}/${P:T:E}${MANSUBDIR}/${P:T:R}.0${MCOMPRESSSUFFIX}@} .endif . for P in ${CATPAGES:O:u} . if !defined(BUILD) && !make(all) && !make(${P}) ${DESTDIR}${MANDIR}/${P:T:E}${MANSUBDIR}/${P:T:R}.0${MCOMPRESSSUFFIX}: .MADE . endif ${DESTDIR}${MANDIR}/${P:T:E}${MANSUBDIR}/${P:T:R}.0${MCOMPRESSSUFFIX}: ${P} __installpage . endfor .else catpages:: .endif # Rules for source page installation .if defined(MANPAGES) && !empty(MANPAGES) manpages:: ${MANPAGES:@P@${DESTDIR}${MANDIR}/man${P:T:E}${MANSUBDIR}/${P}${MCOMPRESSSUFFIX}@} .PRECIOUS: ${MANPAGES:@P@${DESTDIR}${MANDIR}/man${P:T:E}${MANSUBDIR}/${P}${MCOMPRESSSUFFIX}@} .if !defined(UPDATE) .PHONY: ${MANPAGES:@P@${DESTDIR}${MANDIR}/man${P:T:E}${MANSUBDIR}/${P}${MCOMPRESSSUFFIX}@} .endif . for P in ${MANPAGES:O:u} ${DESTDIR}${MANDIR}/man${P:T:E}${MANSUBDIR}/${P}${MCOMPRESSSUFFIX}: ${P} __installpage . endfor .else manpages:: .endif .if ${MKCATPAGES} != "no" catlinks: catpages .if defined(MLINKS) && !empty(MLINKS) @set ${MLINKS}; \ while test $$# -ge 2; do \ name=$$1; \ shift; \ dir=${DESTDIR}${MANDIR}/cat$${name##*.}; \ l=$${dir}${MANSUBDIR}/$${name%.*}.0${MCOMPRESSSUFFIX}; \ name=$$1; \ shift; \ dir=${DESTDIR}${MANDIR}/cat$${name##*.}; \ t=$${dir}${MANSUBDIR}/$${name%.*}.0${MCOMPRESSSUFFIX}; \ if test $$l -nt $$t -o ! -f $$t; then \ echo $$t -\> $$l; \ ln -sf $$l $$t; \ fi; \ done .endif .else catlinks: .endif manlinks: manpages .if defined(MLINKS) && !empty(MLINKS) @set ${MLINKS}; \ while test $$# -ge 2; do \ name=$$1; \ shift; \ dir=${DESTDIR}${MANDIR}/man$${name##*.}; \ l=$${dir}${MANSUBDIR}/$${name}${MCOMPRESSSUFFIX}; \ name=$$1; \ shift; \ dir=${DESTDIR}${MANDIR}/man$${name##*.}; \ t=$${dir}${MANSUBDIR}/$${name}${MCOMPRESSSUFFIX}; \ if test $$l -nt $$t -o ! -f $$t; then \ echo $$t -\> $$l; \ ln -sf $$l $$t; \ fi; \ done .endif # Html rules html: installhtml: cleanhtml: realall: cleanman: rm -f ${CATPAGES} # Make sure all of the standard targets are defined, even if they do nothing. clean depend includes lint regress tags: debian/mk/sys.mk0000644000000000000000000000712612260536074010757 0ustar # $NetBSD: Linux.sys.mk,v 1.3 2011/10/31 23:41:21 sbd Exp $ # NetBSD: sys.mk,v 1.58 2000/08/22 17:38:49 bjh21 Exp # @(#)sys.mk 8.2 (Berkeley) 3/21/94 unix?= We run Debian OS!= uname -s .SUFFIXES: .out .a .ln .o .s .S .c .cc .cpp .cxx .C .F .f .r .y .l .cl .p .h .SUFFIXES: .sh .m4 .LIBS: .a AR?= ar ARFLAGS?= rl RANLIB?= ranlib AS?= as AFLAGS?= COMPILE.s?= ${CC} ${AFLAGS} -c LINK.s?= ${CC} ${AFLAGS} ${LDFLAGS} COMPILE.S?= ${CC} ${AFLAGS} ${CPPFLAGS} -c -traditional-cpp LINK.S?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS} CC?= cc DBG?= -O2 CFLAGS?= ${DBG} COMPILE.c?= ${CC} ${CFLAGS} ${CPPFLAGS} -c LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} CXX?= c++ CXXFLAGS?= ${CFLAGS} COMPILE.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c LINK.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} OBJC?= ${CC} OBJCFLAGS?= ${CFLAGS} COMPILE.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c LINK.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${LDFLAGS} CPP?= cpp NOLINT= 1 CPPFLAGS?= FC?= f77 FFLAGS?= -O RFLAGS?= COMPILE.f?= ${FC} ${FFLAGS} -c LINK.f?= ${FC} ${FFLAGS} ${LDFLAGS} COMPILE.F?= ${FC} ${FFLAGS} ${CPPFLAGS} -c LINK.F?= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS} COMPILE.r?= ${FC} ${FFLAGS} ${RFLAGS} -c LINK.r?= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS} INSTALL?= install LEX?= lex LFLAGS?= LEX.l?= ${LEX} ${LFLAGS} LD?= ld LDFLAGS?= LINT?= lint LINTFLAGS?= -chapbxzF LORDER?= echo MAKE?= bmake NM?= nm PC?= pc PFLAGS?= COMPILE.p?= ${PC} ${PFLAGS} ${CPPFLAGS} -c LINK.p?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS} SHELL?= sh SIZE?= size TSORT?= tsort YACC?= yacc YFLAGS?= YACC.y?= ${YACC} ${YFLAGS} # At least Ubuntu 8.1 sets __attribute__((warn_unused_result)) on fwrite() # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509 .if !defined(NOGCCERROR) CFLAGS+= -Wno-error .endif # C .c: ${LINK.c} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} .c.o: ${COMPILE.c} ${.IMPSRC} .c.a: ${COMPILE.c} ${.IMPSRC} ${AR} ${ARFLAGS} $@ $*.o rm -f $*.o .c.ln: ${LINT} ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC} # C++ .cc .cpp .cxx .C: ${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} .cc.o .cpp.o .cxx.o .C.o: ${COMPILE.cc} ${.IMPSRC} .cc.a .cpp.a .cxx.a .C.a: ${COMPILE.cc} ${.IMPSRC} ${AR} ${ARFLAGS} $@ $*.o rm -f $*.o # Fortran/Ratfor .f: ${LINK.f} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} .f.o: ${COMPILE.f} ${.IMPSRC} .f.a: ${COMPILE.f} ${.IMPSRC} ${AR} ${ARFLAGS} $@ $*.o rm -f $*.o .F: ${LINK.F} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} .F.o: ${COMPILE.F} ${.IMPSRC} .F.a: ${COMPILE.F} ${.IMPSRC} ${AR} ${ARFLAGS} $@ $*.o rm -f $*.o .r: ${LINK.r} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} .r.o: ${COMPILE.r} ${.IMPSRC} .r.a: ${COMPILE.r} ${.IMPSRC} ${AR} ${ARFLAGS} $@ $*.o rm -f $*.o # Pascal .p: ${LINK.p} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} .p.o: ${COMPILE.p} ${.IMPSRC} .p.a: ${COMPILE.p} ${.IMPSRC} ${AR} ${ARFLAGS} $@ $*.o rm -f $*.o # Assembly .s: ${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} .s.o: ${COMPILE.s} ${.IMPSRC} .s.a: ${COMPILE.s} ${.IMPSRC} ${AR} ${ARFLAGS} $@ $*.o rm -f $*.o .S: ${LINK.S} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} .S.o: ${COMPILE.S} ${.IMPSRC} .S.a: ${COMPILE.S} ${.IMPSRC} ${AR} ${ARFLAGS} $@ $*.o rm -f $*.o # Lex .l: ${LEX.l} ${.IMPSRC} ${LINK.c} -o ${.TARGET} lex.yy.c ${LDLIBS} -ll rm -f lex.yy.c .l.c: ${LEX.l} ${.IMPSRC} mv lex.yy.c ${.TARGET} .l.o: ${LEX.l} ${.IMPSRC} ${COMPILE.c} -o ${.TARGET} lex.yy.c rm -f lex.yy.c # Yacc .y: ${YACC.y} ${.IMPSRC} ${LINK.c} -o ${.TARGET} y.tab.c ${LDLIBS} rm -f y.tab.c .y.c: ${YACC.y} ${.IMPSRC} mv y.tab.c ${.TARGET} .y.o: ${YACC.y} ${.IMPSRC} ${COMPILE.c} -o ${.TARGET} y.tab.c rm -f y.tab.c # Shell .sh: rm -f ${.TARGET} cp ${.IMPSRC} ${.TARGET} debian/mk/bsd.kernobj.mk0000644000000000000000000000236112260536074012336 0ustar # $NetBSD: bsd.kernobj.mk,v 1.1.1.1 2006/07/14 23:13:00 jlam Exp $ # KERNSRCDIR Is the location of the top of the kernel src. # It defaults to ${BSDSRCDIR}/sys, but the top-level # Makefile.inc sets it to ${ABSTOP}/sys (ABSTOP is the # absolute path to the directory where the top-level # Makefile.inc was found. # # KERNARCHDIR Is the location of the machine dependent kernel # sources. It defaults to arch/${MACHINE} # # KERNCONFDIR Is where the configuration files for kernels are # found; default is ${KERNSRCDIR}/${KERNARCHDIR}/conf. # # KERNOBJDIR Is the kernel build directory. The kernel GENERIC for # instance will be compiled in ${KERNOBJDIR}/GENERIC. # The default value is # ${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile # if it exists or the target 'obj' is being made. # Otherwise the default is # ${KERNSRCDIR}/${KERNARCHDIR}/compile. # KERNSRCDIR?= ${BSDSRCDIR}/sys # just incase ${MACHINE} is not always correct KERNARCHDIR?= arch/${MACHINE} .if make(obj) || exists(${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile) KERNOBJDIR?= ${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile .else KERNOBJDIR?= ${KERNSRCDIR}/${KERNARCHDIR}/compile .endif KERNCONFDIR?= ${KERNSRCDIR}/${KERNARCHDIR}/conf debian/mk/bsd.README0000644000000000000000000006040712260536074011240 0ustar # $NetBSD: bsd.README,v 1.2 2009/12/30 20:46:22 abs Exp $ # @(#)bsd.README 8.2 (Berkeley) 4/2/94 This is the README file for the new make "include" files for the BSD source tree. The files are installed in /usr/share/mk, and are, by convention, named with the suffix ".mk". Note, this file is not intended to replace reading through the .mk files for anything tricky. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= RANDOM THINGS WORTH KNOWING: The files are simply C-style #include files, and pretty much behave like you'd expect. The syntax is slightly different in that a single '.' is used instead of the hash mark, i.e. ".include ". One difference that will save you lots of debugging time is that inclusion of the file is normally done at the *end* of the Makefile. The reason for this is because .mk files often modify variables and behavior based on the values of variables set in the Makefile. To make this work, remember that the FIRST target found is the target that is used, i.e. if the Makefile has: a: echo a a: echo a number two the command "make a" will echo "a". To make things confusing, the SECOND variable assignment is the overriding one, i.e. if the Makefile has: a= foo a= bar b: echo ${a} the command "make b" will echo "bar". This is for compatibility with the way the V7 make behaved. It's fairly difficult to make the BSD .mk files work when you're building multiple programs in a single directory. It's a lot easier to split up the programs than to deal with the problem. Most of the agony comes from making the "obj" directory stuff work right, not because we switched to a new version of make. So, don't get mad at us, figure out a better way to handle multiple architectures so we can quit using the symbolic link stuff. (Imake doesn't count.) The file .depend in the source directory is expected to contain dependencies for the source files. This file is read automatically by make after reading the Makefile. The variable DESTDIR works as before. It's not set anywhere but will change the tree where the file gets installed. The profiled libraries are no longer built in a different directory than the regular libraries. A new suffix, ".po", is used to denote a profiled object, and ".so" denotes a shared (position-independent) object. The following variables that control how things are made/installed that are not set by default. These should not be set by Makefiles; they're for the user to define in MAKECONF (see bsd.own.mk, below) or on the make(1) command line: BUILD If defined, 'make install' checks that the targets in the source directories are up-to-date and remakes them if they are out of date, instead of blindly trying to install out of date or non-existent targets. UPDATE If defined, 'make install' only installs targets that are more recently modified in the source directories that their installed counterparts. UNPRIVILEGED If defined, don't set the owner/group/mode when installing files or directories. This allows a non-root "make install". MKCATPAGES If "no", don't build or install the catman pages. MKDOC If "no", don't build or install the documentation. MKINFO If "no", don't build or install Info documentation from Texinfo source files. MKLINT If "no", don't build or install the lint libraries. MKMAN If "no", don't build or install the man or catman pages. Also acts as "MKCATPAGES=no" MKNLS If "no", don't build or install the NLS files and locale definition files. MKOBJ If "no", don't enable the rule which creates objdirs. "yes" by default. MKOBJDIRS If "no", don't create objdirs during a "make build". "no" by default. MKPIC If "no", don't build or install shared libraries. MKPICINSTALL If "no", don't install the *_pic.a libraries. MKPROFILE If "no", don't build or install the profiling libraries. MKSHARE If "no", act as "MKCATPAGES=no MKDOC=no MKINFO=no MKMAN=no MKNLS=no". I.e, don't build catman pages, documentation, Info documentation, man pages, NLS files, ... =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= The include file has the default rules for all makes, in the BSD environment or otherwise. You probably don't want to touch this file. If you intend to run a cross build, you will need to supply the following host tools, and configure the following variables properly: OBJCOPY objcopy - copy and translate object files STRIP strip - Discard symbols from object files CONFIG config - build kernel compilation directories RPCGEN rpcgen - Remote Procedure Call (RPC) protocol compiler MKLOCALE mklocale - make LC_CTYPE locale files =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= The include file handles installing manual pages and their links. It has a two targets: maninstall: Install the manual page sources and their links. catinstall: Install the preformatted manual pages and their links. It sets/uses the following variables: MANDIR Base path for manual installation. MANGRP Manual group. MANOWN Manual owner. MANMODE Manual mode. MANSUBDIR Subdirectory under the manual page section, i.e. "/vax" or "/tahoe" for machine specific manual pages. MAN The manual pages to be installed (use a .1 - .9 suffix). MLINKS List of manual page links (using a .1 - .9 suffix). The linked-to file must come first, the linked file second, and there may be multiple pairs. The files are soft-linked. The include file includes a file named "../Makefile.inc" if it exists. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= The include file contains source tree configuration parameters, such as the owners, groups, etc. for both manual pages and binaries, and a few global "feature configuration" parameters. It has no targets. To get system-specific configuration parameters, bsd.own.mk will try to include the file specified by the "MAKECONF" variable. If MAKECONF is not set, or no such file exists, the system make configuration file, /etc/mk.conf is included. These files may define any of the variables described below. bsd.own.mk sets the following variables, if they are not already defined (defaults are in brackets): BSDSRCDIR The real path to the system sources, so that 'make obj' will work correctly. [/usr/src] BSDOBJDIR The real path to the system 'obj' tree, so that 'make obj' will work correctly. [/usr/obj] BINGRP Binary group. [wheel] BINOWN Binary owner. [root] BINMODE Binary mode. [555] NONBINMODE Mode for non-executable files. [444] MANDIR Base path for manual installation. [/usr/share/man/cat] MANGRP Manual group. [wheel] MANOWN Manual owner. [root] MANMODE Manual mode. [${NONBINMODE}] MANINSTALL Manual installation type: maninstall, catinstall, or both LDSTATIC Control program linking; if set blank, link everything dynamically. If set to "-static", link everything statically. If not set, programs link according to their makefile. LIBDIR Base path for library installation. [/usr/lib] LINTLIBDIR Base path for lint(1) library installation. [/usr/libdata/lint] LIBGRP Library group. [${BINGRP}] LIBOWN Library owner. [${BINOWN}] LIBMODE Library mode. [${NONBINMODE}] DOCDIR Base path for system documentation (e.g. PSD, USD, etc.) installation. [/usr/share/doc] HTMLDOCDIR Base path for html system documentation installation. [/usr/share/doc/html] DOCGRP Documentation group. [wheel] DOCOWN Documentation owner. [root] DOCMODE Documentation mode. [${NONBINMODE}] NLSDIR Base path for National Language Support files installation. [/usr/share/nls] NLSGRP National Language Support files group. [wheel] NLSOWN National Language Support files owner. [root] NLSMODE National Language Support files mode. [${NONBINMODE}] STRIPFLAG The flag passed to the install program to cause the binary to be stripped. This is to be used when building your own install script so that the entire system can be made stripped/not-stripped using a single knob. [-s] COPY The flag passed to the install program to cause the binary to be copied rather than moved. This is to be used when building our own install script so that the entire system can either be installed with copies, or with moves using a single knob. [-c] Additionally, the following variables may be set by bsd.own.mk or in a make configuration file to modify the behaviour of the system build process (default values are in brackets along with comments, if set by bsd.own.mk): MKCRYPTO If set to "no", no cryptography support will be built into the system. Defaults to "yes". NOCRYPTO If set, it is equivalent to setting MKCRYPTO to "no". MKCRYPTO_IDEA If set to "yes", IDEA support will be built into libcrypto_idea.a. Defaults to "no". MKCRYPTO_RC5 If set to "yes", RC5 support will be built into libcrypto_rc5.a. Defaults to "no". MKKERBEROS If set to "no", disables building Kerberos (v4 or v5) support into various system utilities that support it. Defaults to "yes". NOTE: This does not affect the building of the Kerberos libraries or infrastructure programs themselves. To completely disable Kerberos, set MKCRYPTO to "no". NOKERBEROS If set, it is equivalent to setting MKKERBEROS to "no". SKEY Compile in support for S/key authentication. [yes, set unconditionally] MANZ Compress manual pages at installation time. SYS_INCLUDE Copy or symlink kernel include files into /usr/include. Possible values are "symlinks" or "copies" (which is the same as the variable being unset). NOPROFILE Do not build profiled versions of system libraries NOPIC Do not build PIC versions of system libraries, and do not build shared libraries. [set if ${MACHINE_ARCH} is "sh3" and ${OBJECT_FMT} is "COFF", unset otherwise.] NOLINT Do not build lint libraries. OBJECT_FMT Object file format. [set to "ELF" on architectures that use ELF -- currently if ${MACHINE_ARCH} is "alpha", "mipsel", "mipseb", "powerpc", "sparc", "sparc64", "i386" and some m68k machines, or set to "a.out" on other architectures]. MKSOFTFLOAT If "yes", build with options to enable the compiler to generate output containing library calls for floating point and possibly soft-float library support. Defaults to "no". bsd.own.mk is generally useful when building your own Makefiles so that they use the same default owners etc. as the rest of the tree. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= The include file handles building programs from one or more source files, along with their manual pages. It has a limited number of suffixes, consistent with the current needs of the BSD tree. It has eight targets: all: build the program and its manual page clean: remove the program, any object files and the files a.out, Errs, errs, mklog, and ${PROG}.core. cleandir: remove all of the files removed by the target clean, as well as .depend, tags, and any manual pages. `distclean' is a synonym for `cleandir'. depend: make the dependencies for the source files, and store them in the file .depend. includes: install any header files. install: install the program and its manual pages; if the Makefile does not itself define the target install, the targets beforeinstall and afterinstall may also be used to cause actions immediately before and after the install target is executed. lint: run lint on the source files tags: create a tags file for the source files. It sets/uses the following variables: BINGRP Binary group. BINOWN Binary owner. BINMODE Binary mode. CLEANFILES Additional files to remove for the clean and cleandir targets. COPTS Additional flags to the compiler when creating C objects. CPPFLAGS Additional flags to the C pre-processor LDADD Additional loader objects. Usually used for libraries. For example, to load with the compatibility and utility libraries, use: LDADD+=-lutil -lcompat LDFLAGS Additional loader flags. LINKS The list of binary links; should be full pathnames, the linked-to file coming first, followed by the linked file. The files are hard-linked. For example, to link /bin/test and /bin/[, use: LINKS= ${DESTDIR}/bin/test ${DESTDIR}/bin/[ SYMLINKS The list of symbolic links; should be full pathnames. Syntax is identical to LINKS. Note that DESTDIR is not automatically included in the link. MAN Manual pages (should end in .1 - .9). If no MAN variable is defined, "MAN=${PROG}.1" is assumed. PROG The name of the program to build. If not supplied, nothing is built. PROGNAME The name that the above program will be installed as, if different from ${PROG}. SRCS List of source files to build the program. If SRCS is not defined, it's assumed to be ${PROG}.c. DPADD Additional dependencies for the program. Usually used for libraries. For example, to depend on the compatibility and utility libraries use: DPADD+=${LIBCOMPAT} ${LIBUTIL} The following libraries are predefined for DPADD: LIBCRT0?= ${DESTDIR}/usr/lib/crt0.o LIBC?= ${DESTDIR}/usr/lib/libc.a LIBC_PIC?= ${DESTDIR}/usr/lib/libc_pic.a LIBCOMPAT?= ${DESTDIR}/usr/lib/libcompat.a LIBCRYPT?= ${DESTDIR}/usr/lib/libcrypt.a LIBCURSES?= ${DESTDIR}/usr/lib/libcurses.a LIBDBM?= ${DESTDIR}/usr/lib/libdbm.a LIBDES?= ${DESTDIR}/usr/lib/libdes.a LIBEDIT?= ${DESTDIR}/usr/lib/libedit.a LIBFORM?= ${DESTDIR}/usr/lib/libform.a LIBGCC?= ${DESTDIR}/usr/lib/libgcc.a LIBGNUMALLOC?= ${DESTDIR}/usr/lib/libgnumalloc.a LIBINTL?= ${DESTDIR}/usr/lib/libintl.a LIBIPSEC?= ${DESTDIR}/usr/lib/libipsec.a LIBKDB?= ${DESTDIR}/usr/lib/libkdb.a LIBKRB?= ${DESTDIR}/usr/lib/libkrb.a LIBKVM?= ${DESTDIR}/usr/lib/libkvm.a LIBL?= ${DESTDIR}/usr/lib/libl.a LIBM?= ${DESTDIR}/usr/lib/libm.a LIBMENU?= ${DESTDIR}/usr/lib/libmenu.a LIBMP?= ${DESTDIR}/usr/lib/libmp.a LIBNTP?= ${DESTDIR}/usr/lib/libntp.a LIBPC?= ${DESTDIR}/usr/lib/libpc.a LIBPCAP?= ${DESTDIR}/usr/lib/libpcap.a LIBPLOT?= ${DESTDIR}/usr/lib/libplot.a LIBPOSIX?= ${DESTDIR}/usr/lib/libposix.a LIBRESOLV?= ${DESTDIR}/usr/lib/libresolv.a LIBRPCSVC?= ${DESTDIR}/usr/lib/librpcsvc.a LIBSKEY?= ${DESTDIR}/usr/lib/libskey.a LIBTERMCAP?= ${DESTDIR}/usr/lib/libtermcap.a LIBTELNET?= ${DESTDIR}/usr/lib/libtelnet.a LIBUTIL?= ${DESTDIR}/usr/lib/libutil.a LIBWRAP?= ${DESTDIR}/usr/lib/libwrap.a LIBY?= ${DESTDIR}/usr/lib/liby.a LIBZ?= ${DESTDIR}/usr/lib/libz.a SHAREDSTRINGS If defined, a new .c.o rule is used that results in shared strings, using xstr(1). Note that this will not work with parallel makes. STRIPFLAG The flag passed to the install program to cause the binary to be stripped. SUBDIR A list of subdirectories that should be built as well. Each of the targets will execute the same target in the subdirectories. SCRIPTS A list of interpreter scripts [file.{sh,csh,pl,awk,...}]. These are installed exactly like programs. SCRIPTSNAME The name that the above program will be installed as, if different from ${SCRIPTS}. These can be further specialized by setting SCRIPTSNAME_