Skip to content

Commit

Permalink
Add headers to noinst_HEADERS so they continue to be linted
Browse files Browse the repository at this point in the history
  • Loading branch information
sethfowler committed Dec 16, 2016
1 parent f6931b1 commit 0574274
Show file tree
Hide file tree
Showing 9 changed files with 170 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ GEN_UNIFIED_CPP=$(TOOLSDIR)/gen-unified-sources.py
# The first 7 are standard automake variables
CLEANFILES = # Files to remove on clean
bin_PROGRAMS = # Binaries built
noinst_HEADERS = # Headers that are not installed
noinst_LIBRARIES = # Static libraries built
noinst_PROGRAMS = # Binaries built that are not installed
BUILT_SOURCES = # Generated source files
Expand All @@ -55,7 +56,6 @@ include $(srcdir)/unified-compilation.am
$(srcdir)/otherMakefiles.am: $(srcdir)/backends $(srcdir)/extensions $(wildcard $(srcdir)/backends/*/Makefile.am $(srcdir)/extensions/*/Makefile.am)
cd $(srcdir); ./find-makefiles.sh


######## Generate C++ IR files from *.def files using ir-generator

# make is very stupid regarding multiple files generated from the same source
Expand Down Expand Up @@ -92,6 +92,9 @@ libfrontend_a_SOURCES = \
# unit tests
include $(srcdir)/test/Makefile.am

# Lint all header files.
cpplint_FILES += $(noinst_HEADERS)

################ Misc custom targets

install:
Expand Down
8 changes: 8 additions & 0 deletions backends/bmv2/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ p4c_bm2_ss_UNIFIED = \
backends/bmv2/lower.cpp \
backends/bmv2/eliminateVerify.cpp

noinst_HEADERS += \
backends/bmv2/analyzer.h \
backends/bmv2/eliminateVerify.h \
backends/bmv2/inlining.h \
backends/bmv2/jsonconverter.h \
backends/bmv2/lower.h \
backends/bmv2/midend.h

cpplint_FILES += $(p4c_bm2_ss_UNIFIED) $(p4c_bm2_ss_NONUNIFIED)

ir_DEF_FILES += $(srcdir)/backends/bmv2/bmv2.def
Expand Down
13 changes: 13 additions & 0 deletions backends/ebpf/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@ p4c_ebpf_UNIFIED = \
backends/ebpf/ebpfModel.cpp \
backends/ebpf/midend.cpp

noinst_HEADERS += \
backends/ebpf/codeGen.h \
backends/ebpf/ebpfBackend.h \
backends/ebpf/ebpfControl.h \
backends/ebpf/ebpfModel.h \
backends/ebpf/ebpfObject.h \
backends/ebpf/ebpfOptions.h \
backends/ebpf/ebpfParser.h \
backends/ebpf/ebpfTable.h \
backends/ebpf/ebpfType.h \
backends/ebpf/midend.h \
backends/ebpf/target.h

cpplint_FILES += $(p4c_ebpf_UNIFIED) $(p4c_ebpf_NONUNIFIED)

# Generated by the targets below
Expand Down
2 changes: 2 additions & 0 deletions backends/p4test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ p4test_UNIFIED = \
backends/p4test/p4test.cpp \
backends/p4test/midend.cpp

noinst_HEADERS += backends/p4test/midend.h

cpplint_FILES += $(p4test_UNIFIED) $(p4test_NONUNIFIED)

# Tests
Expand Down
59 changes: 59 additions & 0 deletions frontends/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,48 @@ BUILT_SOURCES += \
frontends/p4/p4-lex.c \
frontends/p4/p4-parse.cpp

noinst_HEADERS += \
frontends/p4/callGraph.h \
frontends/p4/cloner.h \
frontends/p4/coreLibrary.h \
frontends/p4/createBuiltins.h \
frontends/p4/def_use.h \
frontends/p4/enumInstance.h \
frontends/p4/evaluator/evaluator.h \
frontends/p4/evaluator/substituteParameters.h \
frontends/p4/fromv1.0/converters.h \
frontends/p4/fromv1.0/programStructure.h \
frontends/p4/fromv1.0/v1model.h \
frontends/p4/frontend.h \
frontends/p4/methodInstance.h \
frontends/p4/moveDeclarations.h \
frontends/p4/p4-parse.h \
frontends/p4/parameterSubstitution.h \
frontends/p4/parserCallGraph.h \
frontends/p4/parserControlFlow.h \
frontends/p4/reservedWords.h \
frontends/p4/resetHeaders.h \
frontends/p4/sideEffects.h \
frontends/p4/simplify.h \
frontends/p4/simplifyDefUse.h \
frontends/p4/simplifyParsers.h \
frontends/p4/specialize.h \
frontends/p4/strengthReduction.h \
frontends/p4/substitution.h \
frontends/p4/substitutionVisitor.h \
frontends/p4/symbol_table.h \
frontends/p4/tableApply.h \
frontends/p4/toP4/toP4.h \
frontends/p4/typeChecking/bindVariables.h \
frontends/p4/typeChecking/syntacticEquivalence.h \
frontends/p4/typeChecking/typeChecker.h \
frontends/p4/typeChecking/typeConstraints.h \
frontends/p4/typeChecking/typeUnification.h \
frontends/p4/typeMap.h \
frontends/p4/uniqueNames.h \
frontends/p4/unusedDeclarations.h \
frontends/p4/validateParsedProgram.h

cpplint_FILES += frontends/p4/p4-lex.l \
$(p4_frontend_UNIFIED) \
$(p4_frontend_NONUNIFIED)
Expand All @@ -70,6 +112,17 @@ common_frontend_UNIFIED = \
frontends/common/parseInput.cpp \
frontends/common/constantParsing.cpp

noinst_HEADERS += \
frontends/common/constantFolding.h \
frontends/common/constantParsing.h \
frontends/common/model.h \
frontends/common/name_gateways.h \
frontends/common/options.h \
frontends/common/parseInput.h \
frontends/common/programMap.h \
frontends/common/resolveReferences/referenceMap.h \
frontends/common/resolveReferences/resolveReferences.h

cpplint_FILES += $(common_frontend_UNIFIED) $(common_frontend_NONUNIFIED)


Expand All @@ -87,6 +140,12 @@ BUILT_SOURCES += \
frontends/p4-14/p4-14-lex.c \
frontends/p4-14/p4-14-parse.cpp

noinst_HEADERS += \
frontends/p4-14/header_type.h \
frontends/p4-14/inline_control_flow.h \
frontends/p4-14/p4-14-parse.h \
frontends/p4-14/typecheck.h

cpplint_FILES += frontends/p4-14/p4-14-lex.l \
$(v1_frontend_UNIFIED) \
$(v1_frontend_NONUNIFIED)
Expand Down
20 changes: 20 additions & 0 deletions ir/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,26 @@ ir_UNIFIED = \
ir/visitor.cpp \
ir/write_context.cpp

noinst_HEADERS += \
ir/configuration.h \
ir/dbprint.h \
ir/dump.h \
ir/id.h \
ir/indexed_vector.h \
ir/ir-inline.h \
ir/ir-tree-macros.h \
ir/ir.h \
ir/json_generator.h \
ir/json_loader.h \
ir/json_parser.h \
ir/namemap.h \
ir/node.h \
ir/nodemap.h \
ir/pass_manager.h \
ir/std.h \
ir/vector.h \
ir/visitor.h

ir_DEF_FILES += \
$(srcdir)/ir/base.def \
$(srcdir)/ir/type.def \
Expand Down
36 changes: 36 additions & 0 deletions lib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,40 @@ libp4ctoolkit_a_UNIFIED = \
lib/source_file.cpp \
lib/stringify.cpp

noinst_HEADERS += \
lib/algorithm.h \
lib/alloc.h \
lib/bitops.h \
lib/bitrange.h \
lib/bitvec.h \
lib/crash.h \
lib/cstring.h \
lib/default.h \
lib/enumerator.h \
lib/error.h \
lib/exceptions.h \
lib/gc.h \
lib/gmputil.h \
lib/hex.h \
lib/indent.h \
lib/json.h \
lib/log.h \
lib/ltbitmatrix.h \
lib/map.h \
lib/match.h \
lib/n4.h \
lib/null.h \
lib/nullstream.h \
lib/options.h \
lib/ordered_map.h \
lib/ordered_set.h \
lib/path.h \
lib/range.h \
lib/set.h \
lib/source_file.h \
lib/sourceCodeBuilder.h \
lib/stringify.h \
lib/stringref.h \
lib/symbitmatrix.h

cpplint_FILES += $(libp4ctoolkit_a_UNIFIED) $(libp4ctoolkit_a_NONUNIFIED)
23 changes: 23 additions & 0 deletions midend/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,27 @@ midend_UNIFIED = \
midend/simplifySelect.cpp \
midend/validateProperties.cpp

noinst_HEADERS += \
midend/actionsInlining.h \
midend/actionSynthesis.h \
midend/compileTimeOps.h \
midend/convertEnums.h \
midend/copyStructures.h \
midend/eliminateTuples.h \
midend/expr_uses.h \
midend/has_side_effects.h \
midend/inlining.h \
midend/interpreter.h \
midend/local_copyprop.h \
midend/localizeActions.h \
midend/moveConstructors.h \
midend/nestedStructs.h \
midend/parserUnroll.h \
midend/removeLeftSlices.h \
midend/removeParameters.h \
midend/removeReturns.h \
midend/simplifyKey.h \
midend/simplifySelect.h \
midend/validateProperties.h

cpplint_FILES += $(midend_UNIFIED) $(midend_NONUNIFIED)
5 changes: 5 additions & 0 deletions tools/ir-generator/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ irgenerator_UNIFIED = \
irgenerator_NONUNIFIED = \
tools/ir-generator/ir-generator.ypp

noinst_HEADERS += \
tools/ir-generator/ir-generator.h \
tools/ir-generator/irclass.h \
tools/ir-generator/type.h

BUILT_SOURCES += \
tools/ir-generator/ir-generator-lex.c

Expand Down

0 comments on commit 0574274

Please sign in to comment.