Skip to content
This repository has been archived by the owner on Feb 19, 2018. It is now read-only.

Commit

Permalink
Avoid makefile error and change ucontext.h to sys/ucontext.h.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rolf Timmermans committed Jun 2, 2010
1 parent c858662 commit 5df0f42
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ namespace :driver do
%x(rm -rf #{target} && mkdir -p #{target}/driver && mkdir -p #{target}/kernel)

%x(cp -r #{source}/{AUTHORS,COPYRIGHT,LICENSE} #{target})
%x(cp -r #{source}/{depend.sed,ver,Makefile.include,Makefile.platform} #{target})
%x(cp -r #{source}/{depend.sed,ver,Makefile.include,Makefile.platform,Makefile.pseudolib} #{target})
%x(cp -r #{source}/driver/c #{target}/driver/c)
%x(cp -r #{source}/kernel/common #{target}/kernel/common)

u_h = File.read("#{target}/kernel/common/u/u.h")
u_h.gsub!("#include <ucontext.h>", "")
u_h.gsub!("#include <ucontext.h>", "#include <sys/ucontext.h>")
File.open("#{target}/kernel/common/u/u.h", "w") do |f|
f.write u_h
end
Expand Down
74 changes: 74 additions & 0 deletions vendor/sedna/Makefile.pseudolib
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#
# Common part for all pseudo libs
#

#No target is removed because it is considered intermediate
.SECONDARY:

FOLDER = $(shell basename `pwd`)
SUBDIROBJS= $(foreach dir,$(SUBDIRS),$(dir)/$(dir)$(LIST_EXT))

all: $(FOLDER)$(LIST_EXT)
@echo ===================================================================
@echo $(FOLDER) DONE
@echo ===================================================================

ifneq ($(findstring clean, $(MAKECMDGOALS)), clean)
ifndef NO_DEP

ifdef GENERATED
include generated
endif

include $(OBJS:$(OBJ_EXT)=.d)

ifdef GENERATED
$(OBJS:$(OBJ_EXT)=.d): generated
endif

else

ifdef GENERATED
include generated
endif

ifdef GENERATED
$(OBJS): generated
endif

endif
endif


################################################################################
# $(FOLDER) #
################################################################################
$(FOLDER)$(LIST_EXT): $(OBJS) $(SUBDIROBJS)
echo $(foreach obj,$(foreach dirobj,$(SUBDIROBJS),$(shell cat $(dirobj))) $(OBJS),$(FOLDER)/$(obj)) >$@


$(SUBDIROBJS): $(SUBDIRS:%=%-recursive) ;

.PHONY: $(SUBDIRS:%=%-recursive)
$(SUBDIRS:%=%-recursive):
$(MAKE) -C $(subst -recursive,,$@)


ifdef GENERATED
$(GENERATED): generated
endif


################################################################################
# Clean #
################################################################################
.PHONY: clean Makefile $(CUSTOM_CLEAN)

Makefile: ;

clean: generic_clean $(CUSTOM_CLEAN)
-rm -f $(FOLDER)$(LIST_EXT)
ifdef SUBDIRS
for dir in $(SUBDIRS); do $(MAKE) -C $$dir $@ || exit; done
endif

2 changes: 1 addition & 1 deletion vendor/sedna/kernel/common/u/u.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
#include <signal.h>

#ifndef __cygwin__

#include <sys/ucontext.h>
#endif

#include <setjmp.h>
Expand Down

0 comments on commit 5df0f42

Please sign in to comment.