Alex Chi avatar Alex Chi committed 1112f6d

[TASK] update the README.md, define and setting

Comments (0)

Files changed (5)

 
 Copyright 2013 Alex Chi
 
-NaCl Automake by Alex Chi is licensed under a [Creative Commons Attribution 3.0 Unported License](http://creativecommons.org/licenses/by/3.0/).
+NaCl Automake is licensed under a [Creative Commons Attribution 3.0 Unported License](http://creativecommons.org/licenses/by/3.0/).
 
Add a comment to this file

naclautomake/common.pyc

Binary file removed.

naclautomake/define.py

         res = '# All defines'
         res = '\n'.join([res, 'THIS_MAKEFILE:=$(abspath $(lastword $(MAKEFILE_LIST)))'])
         res = '\n'.join([res, 'THIS_MAKEFILE_PATH:=$(abspath $(dir $(THIS_MAKEFILE)))'])
-        res = '\n'.join([res, 'NACL_SDK_ROOT?=' + self.__setting__.naclsdkPath])
-        res = '\n'.join([res, 'CHROME_PATH?=' + self.__setting__.chromePath])
         res = '\n'.join([res, 'SOLUTION_PATH?=' + self.__setting__.solutionPath])
         res = '\n'.join([res, 'OUTPUT_PATH?=' + self.__setting__.outputPath])
+        if len(self.__setting__.naclsdkPath) > 0:
+            res = '\n'.join([res, 'NACL_SDK_ROOT?=' + self.__setting__.naclsdkPath])
+        if len(self.__setting__.chromePath) > 0:
+            res = '\n'.join([res, 'CHROME_PATH?=' + self.__setting__.chromePath])
         res = '\n'.join([res, ''])
         res = '\n'.join([res, '# the command'])
         res = '\n'.join([res, 'CP:=python $(NACL_SDK_ROOT)/tools/oshelpers.py cp'])
         res = '\n'.join([res, 'RM:=python $(NACL_SDK_ROOT)/tools/oshelpers.py rm'])
         return res
 
-ncs = NaClSetting('naclsdkpath', 'chromepath', 'solutionpath', 'outputpath')
-ncd = NaClDefine(ncs)
-print ncd.mkLicense()
-print ncd.mkDefine()
+# test
+if __name__ == '__main__':
+    ncs = NaClSetting('solutionpath', 'outputpath', 'naclsdkpath', 'chromepath')
+    ncd = NaClDefine(ncs)
+    print ncd.mkLicense()
+    print ncd.mkDefine()

naclautomake/setting.py

     '''
     '''
 
-    def __init__(self, naclsdkpath, chromepath, solutionpath, outputpath, toolchains = (EToolChain.NEWLIB), maketypes = (EMakeType.DEBUG)):
-        self.__naclsdkPath__ = naclsdkpath
-        self.__chromePath__ = chromepath
+    def __init__(self, solutionpath, outputpath, naclsdkpath = '', chromepath = '', toolchains = (EToolChain.NEWLIB), maketypes = (EMakeType.DEBUG)):
         self.__solutionPath__ = solutionpath
         self.__outputPath__ = outputpath
+        self.__naclsdkPath__ = naclsdkpath
+        self.__chromePath__ = chromepath
         self.__toolchains__ = UniqueSet(toolchains)
         self.__maketypes__ = UniqueSet(maketypes)
 
Add a comment to this file

naclautomake/setting.pyc

Binary file removed.

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.