Changeset 2683
- Timestamp:
- Mar 21, 2006, 4:28:58 AM (19 years ago)
- Location:
- trunk/libc
- Files:
-
- 1 added
- 1 edited
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/libc/Makefile.kmk
r2681 r2683 36 36 arithchk 37 37 38 LIBRARIES = \38 xLIBRARIES = \ 39 39 msun \ 40 40 glibc \ … … 49 49 INSTALLS = \ 50 50 headers \ 51 startupobjs 51 startupobjs \ 52 libc_alias 52 53 53 54 # … … 68 69 IN_INNOTEK_LIBC \ 69 70 __IN_INNOTEK_LIBC__ 70 71 71 72 72 # 73 73 # The source files making up the libc part. … … 1716 1716 $(foreach hdr, $(wildcard include/sys/*.h), $(hdr)=>$(subst include/,,$(hdr))) \ 1717 1717 1718 1718 1719 # 1720 # libc_alias - The alias lib is special, see alias.kmk. 1721 # 1722 libc_alias_TEMPLATE = usr.lib 1723 libc_alias_SOURCES = \ 1724 $(PATH_TARGET)/libc_alias/libc_alias.a 1725 1726 1727 # Let kBuild generate rules. 1719 1728 include $(PATH_KBUILD)/footer.kmk 1720 1729 1721 1722 #1723 # Generate the STD wrappers.1724 #1725 $(PATH_TARGET)/libc-std.h:1726 > $@1727 1730 1728 1731 # … … 1738 1741 $< $@ 1739 1742 1743 # 1744 # Generate the STD wrappers. 1745 # 1746 _STD_SOURCE_EXTRAS := \ 1747 src/msun/std-complex.c \ 1748 src/msun/std-math.c 1749 _STD_SOURCE_VARS := \ 1750 libclibc_SOURCES \ 1751 libclibc_SOURCES.$(BUILD_TARGET) \ 1752 libclibc_SOURCES.$(BUILD_TARGET_ARCH) \ 1753 libclibc_SOURCES.$(BUILD_TARGET_CPU) \ 1754 \ 1755 fbsdlibc_SOURCES \ 1756 fbsdlibc_SOURCES.$(BUILD_TARGET) \ 1757 fbsdlibc_SOURCES.$(BUILD_TARGET_ARCH) \ 1758 fbsdlibc_SOURCES.$(BUILD_TARGET_CPU) \ 1759 \ 1760 glibc_SOURCES \ 1761 glibc_SOURCES.$(BUILD_TARGET) \ 1762 glibc_SOURCES.$(BUILD_TARGET_ARCH) \ 1763 glibc_SOURCES.$(BUILD_TARGET_CPU) \ 1764 \ 1765 msun_SOURCES \ 1766 \ 1767 b_knix_os2_SOURCES \ 1768 b_knix_os2_SOURCES.$(BUILD_TARGET) \ 1769 b_knix_os2_SOURCES.$(BUILD_TARGET_ARCH) \ 1770 b_knix_os2_SOURCES.$(BUILD_TARGET_CPU) 1771 ## @todo the backend must be removed! 1772 # We're creating a timestamp file early on in the build process. 1773 # (std-update is a phony target for doing this.) 1774 $(PATH_TARGET)/libc-std.ts std-update: $(foreach var, $(_STD_SOURCE_VARS), $($(var))) $(_STD_SOURCE_EXTRAS) 1775 $(RM) -f $(PATH_TARGET)/libc-std.ts $(PATH_TARGET)/libc-std.files $(PATH_TARGET)/libc-std.tmp.h 1776 $(foreach src, $^\ 1777 ,$(NL)$(TAB)@$(APPEND) $(PATH_TARGET)/libc-std.files "$(src)") 1778 gawk -f ./mkstd.awk @$(PATH_TARGET)/libc-std.files > $(PATH_TARGET)/libc-std.tmp.h 1779 if diff $(PATH_TARGET)/libc-std.tmp.h $(PATH_TARGET)/libc-std.h > /dev/null 2> /dev/null; then \ 1780 cp $(PATH_TARGET)/libc-std.tmp.h $(PATH_TARGET)/libc-std.h; \ 1781 echo "* libc-std.h updated"; \ 1782 else \ 1783 echo "* libc-std.h unchanged"; \ 1784 fi 1785 $(APPEND) $(PATH_TARGET)/libc-std.ts done 1786 1787 # 1788 # Create non-existing libc-std.h. 1789 # 1790 $(PATH_TARGET)/libc-std.h: 1791 $(MAKE) std-update 1792 1793 # 1794 # Generate the aliases. 1795 # 1796 $(PATH_TARGET)/libc_alias.a: $(PATH_TARGET)/libc-std.h 1797 $(MAKE) -f alias.kmk libraries 1798 -
trunk/libc/aliasbsdfuncs.awk
r2668 r2683 4 4 # 5 5 # ARG1: path to libc-std.h 6 # ARG2: "" or "_".7 6 # 8 7 9 8 BEGIN { 10 fn = ARGV [1]"libc-std.h"; 11 want_underscore = (ARGV [2] == "_"); 9 fn = ARGV [1]; 12 10 13 11 while ((getline < fn) > 0) … … 26 24 fun2 = substr(fun2, 1, par - 1); 27 25 28 print fun " 26 print fun "=" fun2 " " 29 27 } 30 28 -
trunk/libc/aliasfuncs.awk
r2668 r2683 8 8 9 9 BEGIN { 10 fn = ARGV [1] "libc-std.h";10 fn = ARGV [1]; 11 11 want_underscore = (ARGV [2] == "_"); 12 12 … … 22 22 has_underscore = (substr(fun, 1, 1) == "_"); 23 23 if (has_underscore == want_underscore) 24 print has_underscore ? substr(fun, 2) : fun; 24 { 25 if (has_underscore) 26 fun = substr(fun, 2); 27 if (want_underscore) 28 print "_" fun "=_std_" fun; 29 else 30 print "" fun "=_std_" fun; 31 } 25 32 } 26 33 -
trunk/libc/aliasgnufuncs.awk
r2668 r2683 8 8 9 9 BEGIN { 10 fn = ARGV [1] "libc-std.h";10 fn = ARGV [1]; 11 11 want_underscore = (ARGV [2] == "_"); 12 12 … … 26 26 fun2 = substr(fun2, 1, par - 1); 27 27 28 print fun " 28 print fun "=" fun2 " " 29 29 } 30 30
Note:
See TracChangeset
for help on using the changeset viewer.