summaryrefslogtreecommitdiffstats
path: root/cpukit/pppd
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/pppd
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/pppd')
-rw-r--r--cpukit/pppd/Makefile.am9
-rw-r--r--cpukit/pppd/preinstall.am43
-rw-r--r--cpukit/pppd/rtemsdialer.h24
-rw-r--r--cpukit/pppd/rtemspppd.h49
4 files changed, 5 insertions, 120 deletions
diff --git a/cpukit/pppd/Makefile.am b/cpukit/pppd/Makefile.am
index 2cf38edc69..53a05761f4 100644
--- a/cpukit/pppd/Makefile.am
+++ b/cpukit/pppd/Makefile.am
@@ -1,10 +1,12 @@
include $(top_srcdir)/automake/compile.am
if LIBNETWORKING
-include_rtemsdir = $(includedir)/rtems
-include_rtems_HEADERS = rtemspppd.h rtemsdialer.h
-
project_lib_LIBRARIES = libpppd.a
+
+$(PROJECT_LIB)/libpppd.a: libpppd.a
+ $(INSTALL_DATA) $< $(PROJECT_LIB)/libpppd.a
+TMPINSTALL_FILES = $(PROJECT_LIB)/libpppd.a
+
libpppd_a_SOURCES = auth.c ccp.c ccp.h chap.c chap.h chap_ms.c chap_ms.h \
chat.c demand.c fsm.c fsm.h ipcp.c ipcp.h lcp.c lcp.h magic.c magic.h \
options.c upap.c upap.h utils.c sys-rtems.c \
@@ -13,5 +15,4 @@ libpppd_a_SOURCES = auth.c ccp.c ccp.h chap.c chap.h chap_ms.c chap_ms.h \
libpppd_a_CPPFLAGS = $(AM_CPPFLAGS) -D__BSD_VISIBLE -I$(srcdir)/../libmd
endif
-include $(srcdir)/preinstall.am
include $(top_srcdir)/automake/local.am
diff --git a/cpukit/pppd/preinstall.am b/cpukit/pppd/preinstall.am
deleted file mode 100644
index 19f4bc1dda..0000000000
--- a/cpukit/pppd/preinstall.am
+++ /dev/null
@@ -1,43 +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-am: $(PREINSTALL_FILES)
-
-PREINSTALL_FILES =
-CLEANFILES = $(PREINSTALL_FILES)
-
-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_INCLUDE)/rtems/$(dirstamp):
- @$(MKDIR_P) $(PROJECT_INCLUDE)/rtems
- @: > $(PROJECT_INCLUDE)/rtems/$(dirstamp)
-PREINSTALL_DIRS += $(PROJECT_INCLUDE)/rtems/$(dirstamp)
-
-$(PROJECT_INCLUDE)/rtems/rtemspppd.h: rtemspppd.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtemspppd.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtemspppd.h
-
-$(PROJECT_INCLUDE)/rtems/rtemsdialer.h: rtemsdialer.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtemsdialer.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtemsdialer.h
-
-$(PROJECT_LIB)/libpppd.a: libpppd.a $(PROJECT_LIB)/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_LIB)/libpppd.a
-TMPINSTALL_FILES += $(PROJECT_LIB)/libpppd.a
-endif
diff --git a/cpukit/pppd/rtemsdialer.h b/cpukit/pppd/rtemsdialer.h
deleted file mode 100644
index 611986b802..0000000000
--- a/cpukit/pppd/rtemsdialer.h
+++ /dev/null
@@ -1,24 +0,0 @@
-
-#ifndef DIALER_H
-#define DIALER_H
-
-/* define constant mode values */
-#define DIALER_INIT 0
-#define DIALER_CONNECT 1
-#define DIALER_WELCOME 2
-#define DIALER_DISCONNECT 3
-
-/* define constant return values */
-#define DIALER_SUCCESS 0
-#define DIALER_INVALIDARG 1
-#define DIALER_UNEXPECTED 2
-#define DIALER_TIMEOUT 3
-#define DIALER_CMDFAILED 4
-
-/* define typedef for dialer function prototype */
-typedef int (*dialerfp)(int tty, int mode, char *pScript);
-
-/* declare default chat program dialer */
-extern int chatmain(int tty, int mode, char *pScript);
-
-#endif
diff --git a/cpukit/pppd/rtemspppd.h b/cpukit/pppd/rtemspppd.h
deleted file mode 100644
index a6c8d0b398..0000000000
--- a/cpukit/pppd/rtemspppd.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * COPYRIGHT (c) 2001, Michael Siers <mikes@poliac.com>.
- * Poliac Research, Burnsville, Minnesota USA.
- * COPYRIGHT (c) 2001, On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#ifndef RTEMSPPPD_H
-#define RTEMSPPPD_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/* define hook function identifiers */
-#define RTEMS_PPPD_LINKUP_HOOK 1
-#define RTEMS_PPPD_LINKDOWN_HOOK 2
-#define RTEMS_PPPD_IPUP_HOOK 3
-#define RTEMS_PPPD_IPDOWN_HOOK 4
-#define RTEMS_PPPD_ERROR_HOOK 5
-#define RTEMS_PPPD_EXIT_HOOK 6
-
-/* define hook function pointer prototype */
-typedef void (*rtems_pppd_hookfunction)(void);
-typedef int (*rtems_pppd_dialerfunction)(int tty, int mode, char *pScript);
-
-
-/* define pppd function prototyes */
-int rtems_pppd_initialize(void);
-int rtems_pppd_terminate(void);
-int rtems_pppd_reset_options(void);
-int rtems_pppd_set_hook(int id, rtems_pppd_hookfunction hookfp);
-int rtems_pppd_set_dialer(rtems_pppd_dialerfunction dialerfp);
-int rtems_pppd_set_option(const char *pOption, const char *pValue);
-int rtems_pppd_connect(void);
-int rtems_pppd_disconnect(void);
-
-struct rtems_bsdnet_ifconfig;
-
-int rtems_ppp_driver_attach(struct rtems_bsdnet_ifconfig *config, int attaching);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif