]> rtime.felk.cvut.cz Git - omk.git/commitdiff
Added doxygen support to automatically generated files.
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 13 Sep 2007 14:52:00 +0000 (14:52 +0000)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 13 Sep 2007 14:52:00 +0000 (14:52 +0000)
darcs-hash:20070913145213-f2ef6-e0f4ccf79249fb8a80cf725ff05589a775e5039b.gz

snippets/config_h

index 70f45479f9fab1566f39def5bb2e5d8e104e49cb..4ca3783f7b763a9b20ac70b90fbee01be47ff638 100644 (file)
@@ -4,6 +4,9 @@
 #                     with subdirectories)
 # xxx_DEFINES      .. list of config directives to be included in
 #                     config header file of the name <somedir>/xxx.h
+# DOXYGEN          .. if non-empty, generated headers includes Doxygen's @file
+#                    command, so it is possible to document config
+#                    variables.
 
 # Syntax: $(call BUILD_CONFIG_H_template,<header_file_path>,<list_of_options_to_export>,<header_barrier>)
 define BUILD_CONFIG_H_template
@@ -14,6 +17,7 @@ $(1) : $(wildcard $(CONFIG_FILE)) $(wildcard $(CONFIG_FILE)-default)
                mkdir `dirname $(1).tmp` ; fi
        @echo "/* Automatically generated from */" > "$(1).tmp"
        @echo "/* config file: $$< */" >> "$(1).tmp"
+       $(if $(DOXYGEN),@echo "/** @file */" >> "$(1).tmp")
        @echo "#ifndef $(3)" >> "$(1).tmp"
        @echo "#define $(3)" >> "$(1).tmp"
        @( $(foreach x, $(shell echo '$($(2))' | sed -e 's/\<\([^ =]*\)\(=[^ ]\+\|\)\>/\1/g' ), \