On Mon, Dec 4, 2017 at 6:35 AM, Khaled Elsayed <[email protected]> wrote:
> Great to know I was not the only one who dislike scons. Never worked with > Bazel. Still think that make/autoconf are the greatest tools in software :) > I think that if a bold switch to make is done, it will be a great step > forward at least to break the barrier for a learning curve for another > build environment. > Check out bazel. See e.g. the query facility <https://docs.bazel.build/versions/master/query-how-to.html>. Very cool. I think make would work with OpenOCF due to the simplified code organization. I would not want to be tasked with writing Makefiles for Iotivity, though. > > Also, the re-organization of source code was much needed. > > I think usage of makeheaders is quite nice. Never used it though. So, how > does it resolve which auto-generated .h is used by a certain .c file. I > mean if somefile.c originally uses both somefile.h and another_file.h, how > does it make sure somefile.c dependencies are resolved? > Manually edited .h files are used by makeheaders to generate headers but otherwise are untouched. So somefile.c need not #include "another_file.h"; makeheaders will put anything needed by somefiles.c in somefiles.h, including stuff that is in another_file.h. OpenOCF has some header files like this, all prefixed with underscore, e.g. comm/_processing.h. Note they do not contain guards (e.g. #ifdef _PROCESSING_H... #endif). Generally speaking those files contain stuff for which I could not decide on a natural place in a source file. Going forward, with continuous auditing and refactoring, it will be easy to move it to a more appropriate place. > > So, how do you plan to maintain updates with iotivity releases. Would this > be a separate fork to evolve independently or when iotivity is updated, > openOCF will be updated? > The plan - or at least the hope - is to keep OpenOCF in sync with Iotivity. This was not such a terrible problem originally, when all I did is move files around and rename a few of them. I wrote a simple shell script to copy Iotivity files accordingly to a temp dir (upgrade.sh in the root dir), and then used a diff/merge tool to do the upgrade. I'm on OS X so I used opendiff, which worked nicely. See https://github.com/ OpenOCF/iochibity/blob/master/doc/UPGRADING.txt/. I used this procedure once to go from 1.1 to 1.3.x; it was tedious but it worked. Now that I've gone whole hog and started moving code around, within and across files, and renaming some functions, vars, etc., this is a bigger problem. What I need is a diff/merge tool that uses functions, vars, etc. as the unit of comparison, rather than whole files. I have some ideas about how to hack this, but suggestions are welcome. It might take me a few days the first time but I can live with that. Thanks, Gregg
_______________________________________________ iotivity-dev mailing list [email protected] https://lists.iotivity.org/mailman/listinfo/iotivity-dev
