PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
+PKG_BUILD_DEPENDS:=tcsh/host
PKG_BUILD_PARALLEL:=1
+include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
mechanism, job control and a C-like syntax.
endef
+
+define Host/Compile
+ $(call Host/Compile/Default,gethost)
+endef
+
+define Host/Install
+ mkdir -p $(STAGING_DIR_HOSTPKG)/usr/bin
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/gethost $(STAGING_DIR_HOSTPKG)/usr/bin/tcsh-gethost
+endef
+
+define Build/Compile
+ #Build sh.err.h and tc.const.h for target build
+ $(call Build/Compile/Default,sh.err.h)
+ $(call Build/Compile/Default,tc.const.h)
+ #Copy gethost (host tool to generate header file) from hostpkg dir
+ $(CP) $(STAGING_DIR_HOSTPKG)/usr/bin/tcsh-gethost $(PKG_BUILD_DIR)/gethost
+ #Make-touch header generator binary to prevent recompiling during target build
+ $(call Build/Compile/Default,-t gethost)
+ #Build tcsh for target
+ $(call Build/Compile/Default)
+endef
+
define Package/tcsh/postinst
#!/bin/sh
grep tcsh $${IPKG_INSTROOT}/etc/shells || { \
ln -sf tcsh $(1)/bin/csh
endef
+$(eval $(call HostBuild))
$(eval $(call BuildPackage,tcsh))
+++ /dev/null
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -448,7 +448,7 @@ pure:$(P) ${OBJS}
-
- gethost: gethost.c sh.err.h tc.const.h sh.h
- rm -f gethost
-- ${CC_FOR_GETHOST} -o gethost ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} $(srcdir)/gethost.c
-+ ${CC_FOR_GETHOST} -o gethost $(srcdir)/gethost.c
-
- tc.defs.c: gethost host.defs
- @rm -f $@.tmp