Skip to content

Commit

Permalink
Jamrules: Add a hard requirement on the new Jambase.
Browse files Browse the repository at this point in the history
And remove the overridden rules that were migrated back to it.
  • Loading branch information
waddlesplash committed Nov 22, 2018
1 parent 32bcb26 commit 633e29a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 39 deletions.
5 changes: 0 additions & 5 deletions Jamfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
if ! [ Match "(.*)-haiku-(.*)" : $(JAMVERSION) ] {
Exit "You can only build Haiku with Haiku's Jam, not Perforce Jam or"
"some other variant (you are using $(JAMVERSION))." ;
}

SubDir HAIKU_TOP ;

NotFile doc_files ;
Expand Down
12 changes: 12 additions & 0 deletions Jamrules
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Haiku Jamrules

# Make sure we are on a sane version of Jam.
if ! [ Match "(.*)-haiku-(.*)" : $(JAMVERSION) ] {
Exit "You can only build Haiku with Haiku's Jam, not Perforce Jam or"
"some other variant (you are using $(JAMVERSION))." ;
}

# Make sure we are on a recent Jambase.
if $(JAMBASEDATE) < 2018 {
Exit "Your Jambase is too old ($(JAMBASEDATE)); please update it (likely"
"by updating Jam itself.)" ;
}

# Make sure HAIKU_TOP is a relative path (and prefer it to be the current or
# parent directory.)
#
Expand Down
39 changes: 5 additions & 34 deletions build/jam/OverriddenJamRules
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
# Overridden to allow spaces in file names.
actions Chmod1
{
$(CHMOD) "$(MODE)" "$(1)"
}

# Overridden to allow spaces in file names.
actions piecemeal together existing Clean
{
$(RM) "$(>)"
}

#-------------------------------------------------------------------------------
# Link rule/action are overwritten as they don't handle linking files who's name
# contain spaces very well. Also adds resources and version to executable.
Expand Down Expand Up @@ -196,7 +184,6 @@ rule As
includesSeparator = $(HOST_INCLUDES_SEPARATOR) ;
localIncludesOption = $(HOST_LOCAL_INCLUDES_OPTION) ;
systemIncludesOption = $(HOST_SYSTEM_INCLUDES_OPTION) ;

} else {
flags = [ on $(1) return $(TARGET_ASFLAGS_$(TARGET_PACKAGING_ARCH))
$(ASFLAGS) ] ;
Expand Down Expand Up @@ -380,7 +367,6 @@ rule C++
includesSeparator = $(HOST_INCLUDES_SEPARATOR) ;
localIncludesOption = $(HOST_LOCAL_INCLUDES_OPTION) ;
systemIncludesOption = $(HOST_SYSTEM_INCLUDES_OPTION) ;

} else {
# warning flags
if $(WARNINGS) != 0 {
Expand Down Expand Up @@ -462,8 +448,7 @@ rule LibraryFromObjects

# library depends on its member objects

if $(KEEPOBJS)
{
if $(KEEPOBJS) {
LocalDepends obj : $(_s) ;
}

Expand All @@ -474,8 +459,7 @@ rule LibraryFromObjects
# For compatibility, we only do this if the library doesn't
# already have a path.

if ! $(_l:D)
{
if ! $(_l:D) {
# locate the library only, if it hasn't been located yet
local dir = $(LOCATE[1]) ;
if ! $(dir) {
Expand All @@ -487,16 +471,13 @@ rule LibraryFromObjects
MakeLocate $(_l)($(_s:BS)) : $(dir) ;
}

if $(NOARSCAN)
{
if $(NOARSCAN) {
# If we can't scan the library to timestamp its contents,
# we have to just make the library depend directly on the
# on-disk object files.

Depends $(_l) : $(_s) ;
}
else
{
} else {
# If we can scan the library, we make the library depend
# on its members and each member depend on the on-disk
# object file.
Expand All @@ -511,9 +492,6 @@ rule LibraryFromObjects

LocalClean clean : $(_l) ;

# bonefish: Not needed on the supported platforms. Maybe later...
# if $(CRELIB) { CreLib $(_l) : $(_s[1]) ; }

Archive $(_l) : $(_s) ;

if $(RANLIB) { Ranlib $(_l) ; }
Expand Down Expand Up @@ -573,8 +551,7 @@ rule MakeLocate
{
local dir = $(2[1]) ;

if $(dir)
{
if $(dir) {
if ! $(dir:G) {
dir = $(dir:G=dir) ;
}
Expand Down Expand Up @@ -740,9 +717,3 @@ rule SubInclude
# restore SUBDIR_TOKENS
SUBDIR_TOKENS = $(oldSubDirTokens) ;
}


actions File
{
$(CP) "$(>)" "$(<)"
}

0 comments on commit 633e29a

Please sign in to comment.