Commit Graph

96 Commits

Author SHA1 Message Date
Kris Kennaway d510ecb42b Bring in the WARNS directive from NetBSD, localized in a new bsd.sys.mk
to avoid polluting sys.mk.  This directive controls the addition of
compiler warning flags to CFLAGS in a relatively compiler-neutral manner.

The idea is that WARNS can be set in Makefile.inc or in individual
Makefiles as they become clean, to prevent the introduction of new
warnings in the code.  -Werror is added by default
2001-05-19 23:18:21 +00:00
Jeroen Ruigrok van der Werven bfc4cb269a Who ever came up with the ${CFLAGS} need to be passed to lint?
We can now run make lint on src/bin at least.

I am sure Mark Murray has way more interesting fixes up his sleeve.
2001-04-19 19:45:19 +00:00
Ruslan Ermilov f7ee8cfe3f Introduce SCRIPTS for bsd.prog.mk. See bsd.README for details.
Idea stolen from NetBSD.

Reviewed by:	bde
2001-04-07 11:13:46 +00:00
Ruslan Ermilov 95f8c8262a Introduce ${PROGNAME}, the name that the program will be installed as,
if different from ${PROG}.  (The name PROGNAME was stolen from NetBSD.)

Reviewed by:	bde
2001-04-02 11:44:20 +00:00
Ruslan Ermilov 19ea15a158 Define MAN to ${PROG}.1 if no manpages were specified, but still
provide MAN1 for backwards compatibility.  Third party software
may still have dependancy lines of this form:

${MAN1}:	foo.man
2001-03-28 15:07:48 +00:00
Ruslan Ermilov 918fb560b4 Make it possible to build manpages for the entire source tree. 2001-03-27 08:43:28 +00:00
Ruslan Ermilov 75c9631fac Backout botched attempt to introduce MANSECT feature; it
doesn't work in "developer" mode (single module checkout).
2001-03-26 14:47:21 +00:00
Ruslan Ermilov 862d3deac6 Removed _MANPAGES, MANDEPEND and MANSRC.
Added MAN which will eventually replace MAN[0-9] and MAN1aout.
For now, the old syntax is still supported.

Reviewed by:	bde
2001-03-26 08:04:11 +00:00
Ruslan Ermilov 6b10ad2220 If the MANSECT variable is specified, it will override the default
manual section.  If, for example, MANSECT is set to 8, the default
MAN1=${PROG}.1 feature of bsd.prog.mk becomes MAN8=${PROG}.8.
Useful for games, libexec, sbin and usr.sbin subtrees.

Reviewed by:	bde
2001-03-20 18:06:09 +00:00
Ruslan Ermilov 500d826509 Check for MAN9 for consistency. 2000-03-23 16:46:20 +00:00
Bruce Evans 218a2cd2bc Removed NOEXTRADEPEND hack. This was only for an old version of makeworld. 2000-01-09 15:40:32 +00:00
Peter Wemm 7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Tim Vanderhoek e902c1bb07 Add variable INSTALLFLAGS_EDIT used to remove arbitrary INSTALLFLAGS.
Specifically intended for removing -fschg ("INSTALLFLAGS_EDIT=:S/schg/uchg/")
this makes the NOFSCHG flag redundant.  NOFSCHG will still be honoured by
bsd.lib.mk but is valid for buildworld only.  NOFSCHG is still implemented in
the old way (ie. _not_ ".if NOFSCHG then { INSTALLFLAGS_EDIT+=:S/schg/,/ }"
to emphasize the fact that NOFSCHG is only supported in a limited
fashion and for buildworld.

The interface and implementation are such that future use of flags such
as sappnd can also be easily removed or altered (perhaps to uappnd).

This commit brought to you by the letters B, D, and E, and the numbers six,
one, thirteen, and three.
1999-07-31 20:27:33 +00:00
Bruce Evans 6e19760bfa "Fixed" missing dependency of ${PROG} on ${LIBC} in the elf case. 1999-05-06 02:58:30 +00:00
Bruce Evans 2336a7ea75 Removed all traces of LN_FLAGS. It was only used to produce a link
/usr/sbin/sysctl -> ${DESTDIR}/sbin/sysctl in some versions of 2.2,
and this link was broken if DESTDIR was set.

Added a SYMLINKS macro.  This works the same as LINKS, except it
creates symlinks and the linked-to pathname may be relative.  This
is more flexible than LN_FLAGS, since it supports installing
symlinks independently of hard links.

Use `ln -f[s] ...' instead of `rm -f ...; ln [-s] ...' for LINKS and
SYMLINKS.  This is equivalent if the target is neither a directory nor
a symlink to a directory.

PR:		8279
1999-03-23 03:06:25 +00:00
John Polstra 368c8de45c Introduce a new variable NEED_LIBNAMES. If it is defined,
<bsd.libnames.mk> is included regardless of the object file format.

This is needed to fix the a.out PAM breakage that manifests itself
when trying to build login.
1999-01-22 12:41:27 +00:00
Bruce Evans 1749f1e3bf Removed bitrotted code for setting OBJFORMAT. 1998-12-06 17:14:37 +00:00
David E. O'Brien 7b81086b13 Allow ``make BINDIR=/foo/games'' to work. 1998-10-18 09:35:17 +00:00
John Birrell c908270ee3 Add a man section 1aout for the legacy man files to avoid them being
installed over the ones from binutils.
1998-09-07 05:55:02 +00:00
John Birrell cdaa52cf0c BINFORMAT -> OBJFORMAT ready for E-day. 1998-08-30 20:33:27 +00:00
Peter Wemm e0301e5d4b Make ../Makefile.inc handling more consistant to prevent multiple includes
when certain .mk files include other .mk files.  This will remove the
need for multiple include protection in some other makefiles around the
tree (and helps some elf conditionals).
1998-08-08 07:02:08 +00:00
Dmitrij Tejblum c7cbe79e18 Recognize ".cpp" as a C++ suffix.
PR:		3476
1998-06-05 18:38:55 +00:00
Bruce Evans 5d9599c863 Oops, forgot references in previous commit.
Submitted by:	Brian Cully <shmit@erols.com>
PR:		6178
1998-05-15 09:34:48 +00:00
Bruce Evans 70a6e3314e Support Objective C almost as well as C++.
Notes:
- We no longer use -fgnu-runtime in bsd.lib.mk, since it is the default
  and bsd.lib.mk is the wrong place to override it.
- Gnu C doesn't have a special compiler driver for Objective C like it
  does for C++.  The defaults are suitable for Gnu C.  Use `OBJCLIBS='
  in /etc/make.conf for POC.
1998-05-15 09:30:13 +00:00
Bruce Evans 29901fcc76 Moved lex and yacc source handling from bsd.prog.mk to bsd.dep.mk
so that it applies to libraries (and lkms) as well as programs.
1998-05-08 06:31:05 +00:00
Bruce Evans cf1b9c0a35 Regress to generating foo.c from foo.y via y.tab.c for crufty applications
that want a y.tab.h file.  This want must be specified by putting y.tab.h
in SRCS (and defaulting to or putting -d in YFLAGS).  This only works if
there is only one yacc parser, of course.  One improvement:  copy y.tab.c
to foo.c instead of renaming it, so that `#line...y.tab.c' statements in
it refer to an existing file.

Regress to not generating explicit rules for .l and .y sources containing
slashes.  This case is unusual and hard to handle properly.

Don't generate an unused dependency when -d is not in YFLAGS.
1998-05-06 15:01:18 +00:00
Bruce Evans 91023e7c67 Oops, the symlink from y.tab.h doesn't work until its target exists. 1998-05-05 03:59:27 +00:00
Bruce Evans 5441eeaedf Fudge local variables better in the yacc rules so that multiple yacc
sources are handled properly.
1998-05-04 17:43:46 +00:00
Bruce Evans 42b2082ac7 Generate explicit rules and other infrastructure for lex and yacc
sources.  This will be used to fix `make -jN' races in many
Makefiles in /usr/src, and to simplify these and other Makefiles.

To get the fixes and simplifications, application Makefiles should
put the raw lex and yacc source names (foo.l and bar.y) in SRCS and
not put the names of any generated files in SRCS or CLEANFILES.  A
few Makefiles already do this, although it didn't actually work before
(mkdep couldn't create complete dependencies because there is no
intermediate .c file for the .y.o and .l.o implicit rules).

Complications: if bar.y is in SRCS and -d is in YFLAGS, then bar.h
will be generated whether or not it is used, even if this clobbers a
real source file.  This is so that bar.c can be generated using the
-j-safe and debugger-friendly -o option to YACC.  There are smaller
warts for handling y.tab.h.  y.tab.c and lex.yy.c are not supported.
1998-05-04 13:54:41 +00:00
Eivind Eklund 1ed9b1c368 Support new version of global.
Submitted by:	Shigio Yamaguchi <shigio@wafu.netgate.net>
Tested by:	make buildworld
1998-03-23 14:58:30 +00:00
Eivind Eklund 69b87d3e06 Introduce the 'regress' target.
Silently approved by:	-hackers, -current
1998-03-12 20:02:17 +00:00
Bruce Evans 589d9341f4 Removed support for now-unused FreeBSD misfeature DPSRCS. 1998-03-06 07:28:01 +00:00
Bruce Evans 987afe2a2f Fixed dependency of ${PROG} on ${DPSRCS}. There were various races
for `make -j'.  There are one-off fixes for the problem in a few
Makefiles, e.g., amd/amq/Makefile.
1998-03-06 06:48:39 +00:00
Bruce Evans 89d11b8a94 Removed clean target. Simply add to CLEANFILES so that the default target
in bsd.obj.mk works.
1998-02-25 02:56:58 +00:00
Eivind Eklund f5c7505126 Limit check for target to smaller section of makefile. 1998-02-19 14:53:29 +00:00
Eivind Eklund 6fe6af9f74 Don't create a ${PROG} target if it already exists. 1998-02-19 01:30:23 +00:00
Wolfgang Helbig aa3be41e39 Postpone the test for non-emptiness of $PROG, $OBJS and $CLEANFILES
to ``shell time''. The previous version didn't work in
/usr/src7share/man/man4.
Reviewed by:	bde
1998-02-07 17:19:06 +00:00
Bruce Evans c6d8090e2c Oops, the previous patch was botched. 1997-12-18 12:56:52 +00:00
Bruce Evans f0adc726c5 Oops, rm -f can't handle empty lists. 1997-12-17 15:35:09 +00:00
Bruce Evans 4e9229ba67 Don't clean files that we don't create.
Fixed style of empty test.

Include <bsd.libnames.mk> if `checkdpadd' is being made, so that it can
:e checked until it goes away.
1997-12-17 13:40:00 +00:00
Peter Wemm 3ec75cc6df Change the BINFORMAT definitions so that they do not depend on sys.mk,
since 2.1.x make(1) apparently does not have the -m switch to set both
the the bsd.*.mk and sys.mk location, and this breaks 'make world' from a
2.1.x system.
1997-09-05 09:09:56 +00:00
Peter Wemm 8c05a446bf A first cut at some rules for building elf shared libs. Of particular
note, using "-Wl,-f" to generate a library objects list doesn't work
anymore since the hack to ld hasn't been incorporated into binutils-2.8.
(and the -f switch is used for something else already)

This is disabled by default, don't panic! :-)
1997-08-30 23:23:18 +00:00
Satoshi Asami 2799473b0c Merge buildworld/installworld patch to Makefile from RELENG_2_2. Patch
a couple *.mk files to enable -current world building on really old
machines (e.g., 2.1.5).

Reviewed by:	too many many people to list here, special thanks to bde
1997-08-05 03:49:49 +00:00
Satoshi Asami e89ac5b08b Do not set the application variable LDDESTDIR. Note that it is still honored
in a few places (in bsd.lib.mk and bsd.prog.mk); this merely fixed part of
the brokenness by not setting it here.

This fixes building of secure telnetd when DESTDIR is defined.
(Otherwise, it will try to link libtelnet from ${DESTDIR}/usr/lib.)

Reviewed by:	bde, jkh
1997-07-31 06:12:04 +00:00
Paul Traina 3d8cd70cec Make NOSHARED = no / NOSHARED = NO do what you'd expect. 1997-06-28 08:14:10 +00:00
Jordan K. Hubbard 398ac038db Change the distribute targets so that a given item in our source tree
can place itself into n distributions, where n >= 1.
1997-06-21 15:40:34 +00:00
Satoshi Asami 15db27b831 Change CXXINCLUDES to use "g++" explicitly. CXXINCLUDES was defined
with ${CXX} at the end; the only problem was, the directory name is
"g++" and ${CXX} is defined as "c++" in sys.mk.
1997-05-23 08:38:46 +00:00
Bruce Evans 1c735bb4a5 Pass everything in ${LDADD} directly to the linker for `make depend'
to prevent complaints from the compiler about nonexistent libraries.
1997-04-23 18:47:42 +00:00
Bruce Evans 25070303ca Removed unused (and almost unusable) support for LDONLY. See ld/rtld
for how to use gcc to invoke the linker only.

Removed `.if 0'ed support for not creating intermediate object files.

Removed unused include of bsd.libnames.mk (LDONLY had the last reference
to it).

Removed stale misplaced comment about MANDEPEND.
1997-04-19 14:36:49 +00:00
Jordan K. Hubbard 6eb5e456f1 Support GLOBAL style tags. 1997-04-13 06:44:25 +00:00