summaryrefslogtreecommitdiffstats
path: root/cpukit/ftpd
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2017-12-23 18:18:56 +1100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-01-25 08:45:26 +0100
commit2afb22b7e1ebcbe40373ff7e0efae7d207c655a9 (patch)
tree44759efe9374f13200a97e96d91bd9a2b7e5ce2a /cpukit/ftpd
parentMAINTAINERS: Add myself to Write After Approval. (diff)
downloadrtems-2afb22b7e1ebcbe40373ff7e0efae7d207c655a9.tar.bz2
Remove make preinstall
A speciality of the RTEMS build system was the make preinstall step. It copied header files from arbitrary locations into the build tree. The header files were included via the -Bsome/build/tree/path GCC command line option. This has at least seven problems: * The make preinstall step itself needs time and disk space. * Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error. * There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult. * The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit. * An introduction of a new build system is difficult. * Include paths specified by the -B option are system headers. This may suppress warnings. * The parallel build had sporadic failures on some hosts. This patch removes the make preinstall step. All installed header files are moved to dedicated include directories in the source tree. Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc, etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g. erc32, imx, qoriq, etc. The new cpukit include directories are: * cpukit/include * cpukit/score/cpu/@RTEMS_CPU@/include * cpukit/libnetworking The new BSP include directories are: * bsps/include * bsps/@RTEMS_CPU@/include * bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include There are build tree include directories for generated files. The include directory order favours the most general header file, e.g. it is not possible to override general header files via the include path order. The "bootstrap -p" option was removed. The new "bootstrap -H" option should be used to regenerate the "headers.am" files. Update #3254.
Diffstat (limited to 'cpukit/ftpd')
-rw-r--r--cpukit/ftpd/Makefile.am6
-rw-r--r--cpukit/ftpd/ftpd.h74
-rw-r--r--cpukit/ftpd/preinstall.am25
3 files changed, 5 insertions, 100 deletions
diff --git a/cpukit/ftpd/Makefile.am b/cpukit/ftpd/Makefile.am
index 24a2815a97..fbb78650d6 100644
--- a/cpukit/ftpd/Makefile.am
+++ b/cpukit/ftpd/Makefile.am
@@ -2,8 +2,12 @@ include $(top_srcdir)/automake/compile.am
if LIBNETWORKING
project_lib_LIBRARIES = libftpd.a
+
+$(PROJECT_LIB)/libftpd.a: libftpd.a
+ $(INSTALL_DATA) $< $(PROJECT_LIB)/libftpd.a
+TMPINSTALL_FILES = $(PROJECT_LIB)/libftpd.a
+
libftpd_a_SOURCES = ftpd.c ftpd.h
endif
-include $(srcdir)/preinstall.am
include $(top_srcdir)/automake/local.am
diff --git a/cpukit/ftpd/ftpd.h b/cpukit/ftpd/ftpd.h
deleted file mode 100644
index f33ca59d3a..0000000000
--- a/cpukit/ftpd/ftpd.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * FTP Server Information
- */
-
-#ifndef _RTEMS_FTPD_H
-#define _RTEMS_FTPD_H
-
-#include <rtems/rtems/tasks.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define FTPD_CONTROL_PORT 21
-
-/* Various buffer sizes */
-enum {
- FTPD_BUFSIZE = 256, /* Size for temporary buffers */
- FTPD_DATASIZE = 4 * 1024, /* Size for file transfer buffers */
- FTPD_STACKSIZE = RTEMS_MINIMUM_STACK_SIZE + FTPD_DATASIZE /* Tasks stack size */
-};
-
-/* FTPD access control flags */
-enum
-{
- FTPD_NO_WRITE = 0x1,
- FTPD_NO_READ = 0x2,
- FTPD_NO_RW = FTPD_NO_WRITE | FTPD_NO_READ
-};
-
-typedef int (*rtems_ftpd_hookfunction)(char *, size_t);
-
-#include <rtems/shell.h>
-
-struct rtems_ftpd_hook
-{
- char *filename;
- rtems_ftpd_hookfunction hook_function;
-};
-
-struct rtems_ftpd_configuration
-{
- rtems_task_priority priority; /* FTPD task priority */
- unsigned long max_hook_filesize; /* Maximum buffersize */
- /* for hooks */
- int port; /* Well-known port */
- struct rtems_ftpd_hook *hooks; /* List of hooks */
- char const *root; /* Root for FTPD or 0 for / */
- int tasks_count; /* Max. connections */
- int idle; /* Idle timeout in seoconds
- or 0 for no (inf) timeout */
- int access; /* 0 - r/w, 1 - read-only,
- 2 - write-only,
- 3 - browse-only */
- rtems_shell_login_check_t login; /* Login check or 0 to ignore
- user/passwd. */
-};
-
-/*
- * Reply codes.
- */
-#define PRELIM 1 /* positive preliminary */
-#define COMPLETE 2 /* positive completion */
-#define CONTINUE 3 /* positive intermediate */
-#define TRANSIENT 4 /* transient negative completion */
-#define ERROR 5 /* permanent negative completion */
-
-int rtems_initialize_ftpd(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _RTEMS_FTPD_H */
diff --git a/cpukit/ftpd/preinstall.am b/cpukit/ftpd/preinstall.am
deleted file mode 100644
index 85ae87d6db..0000000000
--- a/cpukit/ftpd/preinstall.am
+++ /dev/null
@@ -1,25 +0,0 @@
-## Automatically generated by ampolish3 - Do not edit
-
-if AMPOLISH3
-$(srcdir)/preinstall.am: Makefile.am
- $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am
-endif
-
-PREINSTALL_DIRS =
-DISTCLEANFILES = $(PREINSTALL_DIRS)
-
-all-local: $(TMPINSTALL_FILES)
-
-TMPINSTALL_FILES =
-CLEANFILES = $(TMPINSTALL_FILES)
-
-$(PROJECT_LIB)/$(dirstamp):
- @$(MKDIR_P) $(PROJECT_LIB)
- @: > $(PROJECT_LIB)/$(dirstamp)
-PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp)
-
-if LIBNETWORKING
-$(PROJECT_LIB)/libftpd.a: libftpd.a $(PROJECT_LIB)/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_LIB)/libftpd.a
-TMPINSTALL_FILES += $(PROJECT_LIB)/libftpd.a
-endif