1 ;;; Copyright (c) 2016 Cisco and/or its affiliates.
2 ;;; Licensed under the Apache License, Version 2.0 (the "License");
3 ;;; you may not use this file except in compliance with the License.
4 ;;; You may obtain a copy of the License at:
6 ;;; http://www.apache.org/licenses/LICENSE-2.0
8 ;;; Unless required by applicable law or agreed to in writing, software
9 ;;; distributed under the License is distributed on an "AS IS" BASIS,
10 ;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 ;;; See the License for the specific language governing permissions and
12 ;;; limitations under the License.
18 (let (cd-args cmd-args start-dir)
19 (setq start-dir default-directory)
20 (makunbound 'plugin-name)
21 (makunbound 'PLUGIN-NAME)
22 (setq plugin-name (read-string "Plugin name: "))
23 (setq PLUGIN-NAME (upcase plugin-name))
24 (find-file (concat plugin-name ".am"))
25 (skel-plugin-makefile-am-fragment)
26 (setq cmd-args (concat "mkdir -p " plugin-name))
27 (shell-command cmd-args)
28 (setq cd-args (concat start-dir "/" plugin-name))
29 (setq default-directory cd-args)
30 (find-file (concat plugin-name ".api"))
32 (find-file (concat plugin-name "_all_api_h.h"))
33 (skel-plugin-all-apih)
34 (find-file (concat plugin-name ".h"))
36 (find-file (concat plugin-name ".c"))
38 (find-file (concat plugin-name "_msg_enum.h"))
39 (skel-plugin-msg-enum)
42 (find-file (concat plugin-name "_test.c"))