Commit Graph

120 Commits

Author SHA1 Message Date
Ruslan Ermilov
5d86203733 Rename includes' to buildincludes'.
Rename `incsinstall' to `installincludes'.
Make `includes' a -j safe shortcut for `buildincludes' + `installincludes'.
`buildincludes' and `installincludes' are SUBDIR friendly, if run directly.
2002-05-15 16:19:54 +00:00
Ruslan Ermilov
c7b111cba8 Added new bsd.incs.mk which handles installing of header files
via INCS.  Implemented INCSLINKS (equivalent to SYMLINKS) to
handle symlinking include files.  Allow for multiple groups of
include files to be installed, with the powerful INCSGROUPS knob.
Documentation to follow.

Added standard `includes' and `incsinstall' targets, use them
in Makefile.inc1.  Headers from the following makefiles were
not installed before (during `includes' in Makefile.inc1):

	kerberos5/lib/libtelnet/Makefile
	lib/libbz2/Makefile
	lib/libdevinfo/Makefile
	lib/libform/Makefile
	lib/libisc/Makefile
	lib/libmenu/Makefile
	lib/libmilter/Makefile
	lib/libpanel/Makefile

Replaced all `beforeinstall' targets for installing includes
with the INCS stuff.

Renamed INCDIR to INCSDIR, for consistency with FILES and SCRIPTS,
and for compatibility with NetBSD.  Similarly for INCOWN, INCGRP,
and INCMODE.

Consistently use INCLUDEDIR instead of /usr/include.

gnu/lib/libstdc++/Makefile and gnu/lib/libsupc++/Makefile changes
were only lightly tested due to the missing contrib/libstdc++-v3.
I fully tested the pre-WIP_GCC31 version of this patch with the
contrib/libstdc++.295 stuff.

These changes have been tested on i386 with the -DNO_WERROR "make
world" and "make release".
2002-05-12 16:01:00 +00:00
Ruslan Ermilov
afeaaa846c Added internal, non-recursive (SUBDIR) versions of the `all-man'
and `maninstall' targets.  This fixes the issue where each subdir
was descended into twice during "make all", and also resurrects
the standardization of `maninstall'.

Urged by:	bde
2002-05-07 15:42:56 +00:00
Ruslan Ermilov
8782938772 Install PROG before SCRIPTS and FILES, but make sure
LINKS are still processed last.  This backs out part
of the backout in previous revision.

Install the manpages before descending into SUBDIRs.
2002-05-07 15:30:49 +00:00
Ruslan Ermilov
9e84c09c36 Splitting "realinstall" into parts was a (failed) part of the work
in progress, and should not have been committed in revision 1.114.
This broke gnu/usr.bin/binutils/strip and usr.bin/strip makefiles;
they were now attempting to install and strip "strip" from objdir.

Pointed out by:	bde

This has nothing to do with PR misc/37516.
2002-04-29 16:00:30 +00:00
Ruslan Ermilov
c5234b56b6 Abuse bsd.obj.mk for defining default distribute target. 2002-04-24 13:29:34 +00:00
David E. O'Brien
01df2ec328 Change the name of the 'bin' distribution to 'base'.
This is done since it contains much more than /bin, and also gets in the
way when making a combined install+fixit CD.

OK'ed by:	jkh
2002-04-23 22:16:41 +00:00
Ruslan Ermilov
b25a566d47 Merge bsd.obj.mk's version of the _SUBDIR target with bsd.subdir.mk.
Ensure all standard targets honor SUBDIR.  Now `make obj' descends into
SUBDIRs even if NOOBJ is set (some descendants may still need an object
directory, but we do not have such precedents).  Now `make install' in
non-bsd.subdir.mk makefiles runs `afterinstall' target _after_ `install'
in SUBDIRs, like we do in bsd.subdir.mk.  Nothing depended on the wrong
order anyway.

Fixed `distribute' targets (except for the bsd.subdir.mk version) so that
they do not depend on _SUBDIR; `distribute' calls `install' which already
depends on _SUBDIR.

De-standardize `maninstall', otherwise manpages would be installed twice.
(To be revised later.)
2002-04-23 09:03:56 +00:00
David E. O'Brien
e517d11e8d Add .asm as an alias for .s. .asm is common in contribed sources.
Helps with:	gcc31 build.
2002-04-19 18:01:03 +00:00
Ruslan Ermilov
4367bda680 ${INSTALLFLAGS} aren't suitable for installing ${SCRIPTS} and ${FILES}. 2002-04-17 16:29:02 +00:00
Ruslan Ermilov
2bdaf7e81c Don't include bsd.own.mk from sys.mk, this makes it impossible
to use ``.if defined()'' inside bsd.own.mk to test for defines
in individual makefiles.  For example, setting DEBUG_FLAGS in
Makefile didn't take the desired effect on the STRIP assignment.

Added bsd.init.mk (like in NetBSD) that handles the inclusion
of ../Makefile.inc and bsd.own.mk from all bsd.*.mk files that
"build something".

Back out bsd.own.mk,v 1.15: moved OBJFORMAT initialization back
to sys.mk (several source tree makefiles want to check it early)
and removed MACHINE_ARCH initialization (it's hard to see from
looking at the commitlogs what the problem was at the time, but
now it serves no purpose).

Prohibit the direct inclusion of bsd.man.mk and bsd.libnames.mk.

Protect bsd.obj.mk from repetitive inclusion.  Prohibiting the
direct inclusion of bsd.obj.mk might be a good idea too.
2002-04-17 13:49:29 +00:00
Ruslan Ermilov
5d68012a54 Back out second part of the previous change. While this was
indeed a good change, I shouldn't have made it after testing
with the -DNOCLEAN buildworld.  There are far too many users
of this misfeature under sys/boot/.  I will reapply the change
after I fix these.

This change has been tested with the clean buildworld.
2002-04-12 16:25:13 +00:00
Ruslan Ermilov
d8d5898fff Fixed the fatal breakage I introduced in the last commit.
Make the defined(SRCS) case similar to the !defined(SRCS)
case - only define ${PROG}: ${OBJS} if the ${PROG} target
does not exist.  This has only one precedence in the entire
source tree, usr.bin/doscmd, and its Makefile is horribly
broken.  I will temporarily unconnect it from build until
I'm working on the fix.
2002-04-12 11:21:09 +00:00
Ruslan Ermilov
f8ba15551d Don't add -lstdc++ to LDADD, just let c++(1) link C++ programs.
Record the dependency on ${LIBSTDCPLUSPLUS} similar to ${LIBC}.

Suggested by:	imp, obrien, peter
2002-04-12 08:17:24 +00:00
Ruslan Ermilov
47bf8a5c3b Implement PROG_CXX for <bsd.prog.mk>.
Obtained from:	NetBSD (with some mods)
Reviewed by:	peter
2002-04-11 10:44:30 +00:00
Ruslan Ermilov
de0d6977f9 Really finish the removal of ${LDDESTDIR} in bsd.lib.mk,v 1.55.
bsd.lib.mk,v 1.101 only did that partly.
2002-04-11 08:54:21 +00:00
Ruslan Ermilov
88505e11bc Fixed the nasty bug where .depend file that exists somewhere in
the .PATH (but not in the ${.OBJDIR}) would result in a leak of
the ${OBJS}: ${SRCS:M*.h} dependency hint.

Spotted by:	fixing the broken gnu/usr.bin/cc/cc1obj build
MFC after:	1 day
2002-04-07 14:58:12 +00:00
Ruslan Ermilov
ea5c0da93b Obviate the need to set the COMPILER_PATH and LIBRARY_PATH in Makefile.inc1
to pick up the correct cross-tools (the compiler executables and binutils)
and special linker files (crt*.o).  This is now controlled by a single knob,
TOOLS_PREFIX, when building cross-tools.

Fixed regression in Makefile.inc1,v 1.203 (-nostdinc).  This clobbered target
architecture's CFLAGS with building host's CPUTYPE setting in /etc/make.conf,
and had a nice but nasty side effect of exposing some (normally hidden) bugs
in system headers.

(Attempt to move the "-nostdinc -I..." part of CFLAGS into the new CINCLUDES
(modeled after a similar CXXINCLUDES) eventually failed because hard-coding
${WORLDTMP}/usr/include to be the first in the include list does not always
work, e.g. lib/libbind.)

Compensate the -nostdinc removal by making cpp(1) built in the cross-tools
stage to not look for <> header files in the building host's /usr/include
(already committed as gnu/usr.bin/cc/cc_tools/freebsd-native.h, revisions
1.10-1.12, STANDARD_INCLUDE_DIR).

: $ /usr/obj/usr/src/i386/usr/bin/cpp -v /dev/null
:
: Before:
:
: #include <...> search starts here:
:  /usr/obj/usr/src/i386/usr/include
:  /usr/include
: End of search list.
:
: After:
:
: #include <...> search starts here:
:  /usr/obj/usr/src/i386/usr/include
:  /usr/obj/usr/src/i386/usr/include

(Disabling the use of GCC_INCLUDE_DIR in the FREEBSD_NATIVE case would fix
the duplicate above.)

Get rid of the (now unneeded) -I${DESTDIR}/usr/include magic in bsd.prog.mk
and bsd.lib.mk.  Finish the removal of LDDESTDIR in bsd.lib.mk,v 1.55 -- we
no longer have users of it.

The required changes to gcc were already committed as contrib/gcc.295/gcc.c,
revisions 1.23 and 1.24.

Basically, this allows for the changes above plus makes gcc(1) persistent
about path configuration, whether it's configured as a native or a cross
compiler:

: $ /usr/obj/usr/src/i386/usr/bin/cc -print-search-dirs
: install: /usr/obj/usr/src/i386/usr/libexec/(null)
: programs: /usr/obj/usr/src/i386/usr/libexec/elf/:/usr/obj/usr/src/i386/usr/libexec/
: libraries: /usr/obj/usr/src/i386/usr/lib/
:
: $ /usr/obj/alpha/usr/src/i386/usr/bin/cc -print-search-dirs
: install: /usr/obj/alpha/usr/src/i386/usr/libexec/(null)
: programs: /usr/obj/alpha/usr/src/i386/usr/libexec/elf/:/usr/obj/alpha/usr/src/i386/usr/libexec/
: libraries: /usr/obj/alpha/usr/src/i386/usr/lib/

Reviewed by:	bde, obrien
2002-02-21 10:23:41 +00:00
Ruslan Ermilov
a7aaf57e4a FILES support for bsd.prog.mk. See bsd.README for details.
Stolen from:	NetBSD
2001-12-17 13:59:35 +00:00
Bruce Evans
08b443022e Unbreak "make lint" for programs and "make llib-l${LIB}.ln" for
libraries a little by not passing all of ${CFLAGS} to lint.  Pass
only options matching -[DIU]*.  The important -nostdinc option can't
be passed like I first thought because lint misinterprets as
"-n -o stdinc".  The unimportant -B* option can't be passed because
lint doesn't support it.  Otherwise, we pass the same options as
to mkdep, exept for a bug in the latter: -U* is not passed.  All
this depends on option args not being separated from option flags
by a space.
2001-12-03 22:31:09 +00:00
Ruslan Ermilov
9222e100d6 When bootstrapping (build-tools and cross-tools), avoid
including the ${WORLDTMP}/usr/include headers that may
not match the installed host libraries.

This should fix the 20010919 UPDATING entry.
2001-09-21 08:17:48 +00:00
Ruslan Ermilov
dfcf88a3a0 Style nits:
GBINDIR -> ORIGBINDIR
GBINGRP -> ORIGBINGRP

Submitted by:	bde
2001-06-14 06:08:02 +00:00
Ruslan Ermilov
ecce24742d Games ownership cleanup.
Urged by:	bde
2001-06-13 15:26:31 +00:00
Ruslan Ermilov
e010799732 Change the ownership of the symbolic link for hidden game
rather than /usr/games/dm wrapper.

Spotted by:	bde
Reviewed by:	bde
2001-05-31 15:05:05 +00:00
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