in the [.filename]#Makefile# and use `%%OCTAVE_VERSION%%` wherever the version shows up in [.filename]#pkg-plist#.
When the port is upgraded, it will not be necessary to edit dozens (or in some cases, hundreds) of lines in [.filename]#pkg-plist#.
+If files are installed conditionally on the flavors set in the port, the usual way of handling it is prefixing [.filename]#pkg-plist# lines with a `%%FLAV%%` for lines needed when the flavor is enabled, or `%%NO_FLAV%%` when the flavor is disabled, and adding `FLAVORS_SUB=yes` to the [.filename]#Makefile#.
+See crossref:makefiles[flavors_sub,`FLAVORS_SUB`] for more information.
+
+For instance, if there arefiles that are only installed when the `X11` flavor is enabled, and [.filename]#Makefile has:
+
+[.programlisting]
+....
+FLAVORS= X11 console
+FLAVORS_SUB= yes
+....
+
+In [.filename]#pkg-plist#, `%%X11%%` in front of the lines only being installed when the flavor is enabled, like this:
+
+[.programlisting]
+....
+%%X11%%bin/foo-gui
+....
+
If files are installed conditionally on the options set in the port, the usual way of handling it is prefixing [.filename]#pkg-plist# lines with a `%%OPT%%` for lines needed when the option is enabled, or `%%NO_OPT%%` when the option is disabled, and adding `OPTIONS_SUB=yes` to the [.filename]#Makefile#.
See crossref:makefiles[options_sub,`OPTIONS_SUB`] for more information.