aboutsummaryrefslogtreecommitdiff
path: root/bpkg/buildfile
blob: b7ae6f2e50067b7bf6e6df40dda878371b44aced (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# file      : bpkg/buildfile
# copyright : Copyright (c) 2014-2016 Code Synthesis Ltd
# license   : MIT; see accompanying LICENSE file

import libs  = libbpkg%lib{bpkg}
import libs += libbutl%lib{butl}
import libs += libodb%lib{odb}
import libs += libodb-sqlite%lib{odb-sqlite}

exe{bpkg}:                                                                    \
{hxx         cxx}{ archive           }                                        \
{hxx         cxx}{ auth              }                                        \
{hxx            }{ bpkg-version      }                                        \
{            cxx}{ bpkg              } {hxx ixx cxx}{ bpkg-options          } \
{hxx         cxx}{ cfg-create        } {hxx ixx cxx}{ cfg-create-options    } \
{hxx         cxx}{ checksum          }                                        \
                                       {hxx ixx cxx}{ common-options        } \
                                       {hxx ixx cxx}{ configuration-options } \
{hxx         cxx}{ database          }                                        \
{hxx         cxx}{ diagnostics       }                                        \
{hxx         cxx}{ fetch             }                                        \
{hxx            }{ forward           }                                        \
{hxx         cxx}{ help              } {hxx ixx cxx}{ help-options          } \
{hxx         cxx}{ manifest-utility  }                                        \
{hxx         cxx}{ openssl           }                                        \
{hxx            }{ options-types     }                                        \
{hxx ixx     cxx}{ package           }                                        \
{hxx ixx     cxx}{ package-odb       }          file{ package.xml           } \
{hxx         cxx}{ pkg-build         } {hxx ixx cxx}{ pkg-build-options     } \
{hxx            }{ pkg-clean         } {hxx ixx cxx}{ pkg-clean-options     } \
{hxx         cxx}{ pkg-drop          } {hxx ixx cxx}{ pkg-drop-options      } \
{hxx         cxx}{ pkg-command       }                                        \
{hxx         cxx}{ pkg-configure     } {hxx ixx cxx}{ pkg-configure-options } \
{hxx         cxx}{ pkg-disfigure     } {hxx ixx cxx}{ pkg-disfigure-options } \
{hxx         cxx}{ pkg-fetch         } {hxx ixx cxx}{ pkg-fetch-options     } \
{hxx            }{ pkg-install       } {hxx ixx cxx}{ pkg-install-options   } \
{hxx         cxx}{ pkg-purge         } {hxx ixx cxx}{ pkg-purge-options     } \
{hxx         cxx}{ pkg-status        } {hxx ixx cxx}{ pkg-status-options    } \
{hxx            }{ pkg-test          } {hxx ixx cxx}{ pkg-test-options      } \
{hxx            }{ pkg-uninstall     } {hxx ixx cxx}{ pkg-uninstall-options } \
{hxx         cxx}{ pkg-unpack        } {hxx ixx cxx}{ pkg-unpack-options    } \
{hxx            }{ pkg-update        } {hxx ixx cxx}{ pkg-update-options    } \
{hxx         cxx}{ pkg-verify        } {hxx ixx cxx}{ pkg-verify-options    } \
{hxx         cxx}{ rep-add           } {hxx ixx cxx}{ rep-add-options       } \
{hxx         cxx}{ rep-create        } {hxx ixx cxx}{ rep-create-options    } \
{hxx         cxx}{ rep-fetch         } {hxx ixx cxx}{ rep-fetch-options     } \
{hxx         cxx}{ rep-info          } {hxx ixx cxx}{ rep-info-options      } \
                                       {hxx     cxx}{ repository-signing    } \
{hxx         cxx}{ satisfaction      }                                        \
{hxx         cxx}{ system-repository }                                        \
{hxx            }{ types             }                                        \
{hxx         cxx}{ types-parsers     }                                        \
{hxx         cxx}{ utility           }                                        \
{hxx            }{ wrapper-traits    }                                        \
                   $libs

# Disable "unknown pragma" warnings.
#
if ($cxx.id == "msvc")
  cxx.coptions += /wd4068
elif ($cxx.id == "icc")
  cxx.coptions += -Wno-unknown-pragmas

obj{utility}: cxx.poptions += -DBPKG_EXE_SUFFIX='"'$bin.exe.suffix'"'

# General topics and common options.
#
{hxx ixx cxx}{common-options}:        cli{common}
{hxx ixx cxx}{configuration-options}: cli{configuration}
{hxx ixx cxx}{bpkg-options}:          cli{bpkg}

# Help command.
#
{hxx ixx cxx}{help-options}: cli{help}

# pkg-* command.
#
{hxx ixx cxx}{pkg-build-options}:     cli{pkg-build}
{hxx ixx cxx}{pkg-clean-options}:     cli{pkg-clean}
{hxx ixx cxx}{pkg-configure-options}: cli{pkg-configure}
{hxx ixx cxx}{pkg-disfigure-options}: cli{pkg-disfigure}
{hxx ixx cxx}{pkg-drop-options}:      cli{pkg-drop}
{hxx ixx cxx}{pkg-fetch-options}:     cli{pkg-fetch}
{hxx ixx cxx}{pkg-install-options}:   cli{pkg-install}
{hxx ixx cxx}{pkg-purge-options}:     cli{pkg-purge}
{hxx ixx cxx}{pkg-test-options}:      cli{pkg-test}
{hxx ixx cxx}{pkg-status-options}:    cli{pkg-status}
{hxx ixx cxx}{pkg-uninstall-options}: cli{pkg-uninstall}
{hxx ixx cxx}{pkg-unpack-options}:    cli{pkg-unpack}
{hxx ixx cxx}{pkg-update-options}:    cli{pkg-update}
{hxx ixx cxx}{pkg-verify-options}:    cli{pkg-verify}

# cfg-* command.
#
{hxx ixx cxx}{cfg-create-options}: cli{cfg-create}

# rep-* command.
#
{hxx ixx cxx}{rep-add-options}:    cli{rep-add}
{hxx ixx cxx}{rep-fetch-options}:  cli{rep-fetch}
{hxx ixx cxx}{rep-info-options}:   cli{rep-info}
{hxx ixx cxx}{rep-create-options}: cli{rep-create}

# Help topics.
#
{hxx cxx}{repository-signing}: cli{repository-signing}
{hxx cxx}{repository-signing}: dist = true

if $cli.configured
{
  # Option length must be the same to get commands/topics/options aligned.
  #
  cli.options += -I $src_root --include-with-brackets --include-prefix bpkg \
--guard-prefix BPKG --cxx-prologue "#include <bpkg/types-parsers>" \
--cli-namespace bpkg::cli --generate-vector-scanner --generate-file-scanner \
--generate-specifier --generate-parse --page-usage 'bpkg::print_$name$_' \
--ansi-color --include-base-last --option-length 23

  cli.cxx{common-options}: cli.options += --short-usage --long-usage # Both.
  cli.cxx{bpkg-options}: cli.options += --short-usage --suppress-undocumented

  cli.options += --long-usage # All other pages -- long usage.

  # Avoid generating CLI runtime and empty inline file for help topics.
  #
  cli.cxx{repository-signing}: cli.options += --suppress-cli --suppress-inline
}

# Include generated cli files into the distribution.
#
hxx{*-options}: dist = true
ixx{*-options}: dist = true
cxx{*-options}: dist = true