[hipl-commit] [tiny] Rev 3755: Get rid of Makefile.modules.

  • From: Tim Just <tim.just@xxxxxxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Wed, 31 Mar 2010 18:18:38 +0300

Committer: Tim Just <tim.just@xxxxxxxxxxxxxx>
Date: 31/03/2010 at 18:18:38
Revision: 3755
Revision-id: tim.just@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: tiny

Log:
  Get rid of Makefile.modules.
  
  The intermediate file Makefile.modules is not created anymore. This 
  simplifies the build system, because one indirection is removed.
  
  For now the module Makefile.am's are included into the central
  Makefile.am static. This will be fixed ASAP.

Modified:
  M  .bzrignore
  M  Makefile.am
  M  process_modules.py

=== modified file '.bzrignore'
--- .bzrignore  2010-03-12 17:27:35 +0000
+++ .bzrignore  2010-03-31 15:16:34 +0000
@@ -82,7 +82,6 @@
 doc/howto-html/
 test/dh_performance
 gmon.out
-Makefile.modules
 results
 modules/hipd_modules.h
 modules/hipfw_modules.h

=== modified file 'Makefile.am'
--- Makefile.am 2010-03-31 07:09:36 +0000
+++ Makefile.am 2010-03-31 15:16:34 +0000
@@ -203,7 +203,7 @@
 #lib_ipsec_la_LIBADD = $(LEXLIB)
 
 #DISTCLEANFILES = policy_parse.c policy_token.c policy_token.h
-DISTCLEANFILES = lib/ipsec/policy_token.h Makefile.modules $(wildcard 
modules/*.h)
+DISTCLEANFILES = lib/ipsec/policy_token.h $(wildcard modules/*.h)
 
 # don't use libipsec, but xfrmapi
 if HIP_PFKEY
@@ -215,16 +215,18 @@
 lib_performance_libperformance_la_SOURCES = lib/performance/performance.c
 
 ### *_LDADD ###
-# Initialize LDADD lists empty, because modules might add entries to LDADD in
-# Makefile.modules. This file needs to be included before the standard LDADDs,
-# because modules can depend on the core code.
+# Initialize LDADD lists empty, because modules might add entries to LDADD. The
+# module LDADDs need to be included before the standard LDADDs, because modules
+# can depend on the core code.
 hipd_hipd_LDADD =
 firewall_hipfw_LDADD =
 tools_hipconf_LDADD =
 
-##### START INCLUDE SECTION #####
-include Makefile.modules
-##### END INCLUDE SECTION #####
+# Include module Makefile.am's.
+# TODO: Make this inclusion dynamic
+include modules/heartbeat/Makefile.am
+include modules/heartbeat_update/Makefile.am
+include modules/update/Makefile.am
 
 test_certteststub_LDADD = lib/core/libhipcore.la \
                           lib/tool/libhiptool.la

=== modified file 'process_modules.py'
--- process_modules.py  2010-03-30 17:00:14 +0000
+++ process_modules.py  2010-03-31 15:16:34 +0000
@@ -248,25 +248,6 @@
         except IOError:
             sys.exit('Error on creating header files')
 
-# Creates a file at file_path and includes a Makefile.am from all given modules
-# sub directories.
-def create_makefile_modules(srcdir,
-                            module_info,
-                            disabled_modules):
-
-    file_path = 'Makefile.modules'
-    makefile_modules = open(file_path, 'w')
-    makefile_modules.write('# ' + WARNING_STRING + '\n')
-
-    # Include Makefile.am's from modules
-    for current in module_info.keys():
-        path = os.path.join(srcdir, MODULES_DIR, current, 'Makefile.am')
-        makefile_modules.write('include ' + path + '\n')
-
-    makefile_modules.write('\n')
-    makefile_modules.close()
-    print '|    created file: ' + file_path
-
 ### Main program ###
 def main():
     srcdir = None
@@ -304,9 +285,5 @@
                         module_info.keys(),
                         required_modules)
 
-    create_makefile_modules(srcdir,
-                            module_info,
-                            disabled_modules)
-
 if __name__ == "__main__":
     main()

Other related posts:

  • » [hipl-commit] [tiny] Rev 3755: Get rid of Makefile.modules. - Tim Just